Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
19973 amit.gupta 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 SellerInfo implements org.apache.thrift.TBase<SellerInfo, SellerInfo._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SellerInfo");
25
 
26
  private static final org.apache.thrift.protocol.TField SELLER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sellerId", org.apache.thrift.protocol.TType.I64, (short)1);
27
  private static final org.apache.thrift.protocol.TField ORGANISATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("organisationName", org.apache.thrift.protocol.TType.STRING, (short)2);
28
  private static final org.apache.thrift.protocol.TField REGISTERED_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("registeredAddress", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField REG_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("regId", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField CIN_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("cinNumber", org.apache.thrift.protocol.TType.STRING, (short)5);
31
  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)6);
20025 amit.gupta 32
  private static final org.apache.thrift.protocol.TField STATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("stateId", org.apache.thrift.protocol.TType.I64, (short)7);
21844 amit.gupta 33
  private static final org.apache.thrift.protocol.TField GSTIN_FIELD_DESC = new org.apache.thrift.protocol.TField("gstin", org.apache.thrift.protocol.TType.STRING, (short)8);
19973 amit.gupta 34
 
35
  private long sellerId; // required
36
  private String organisationName; // required
37
  private String registeredAddress; // required
38
  private String regId; // required
39
  private String cinNumber; // required
40
  private String tin; // required
20025 amit.gupta 41
  private long stateId; // required
21844 amit.gupta 42
  private String gstin; // required
19973 amit.gupta 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
    SELLER_ID((short)1, "sellerId"),
47
    ORGANISATION_NAME((short)2, "organisationName"),
48
    REGISTERED_ADDRESS((short)3, "registeredAddress"),
49
    REG_ID((short)4, "regId"),
50
    CIN_NUMBER((short)5, "cinNumber"),
20025 amit.gupta 51
    TIN((short)6, "tin"),
21844 amit.gupta 52
    STATE_ID((short)7, "stateId"),
53
    GSTIN((short)8, "gstin");
19973 amit.gupta 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: // SELLER_ID
69
          return SELLER_ID;
70
        case 2: // ORGANISATION_NAME
71
          return ORGANISATION_NAME;
72
        case 3: // REGISTERED_ADDRESS
73
          return REGISTERED_ADDRESS;
74
        case 4: // REG_ID
75
          return REG_ID;
76
        case 5: // CIN_NUMBER
77
          return CIN_NUMBER;
78
        case 6: // TIN
79
          return TIN;
20025 amit.gupta 80
        case 7: // STATE_ID
81
          return STATE_ID;
21844 amit.gupta 82
        case 8: // GSTIN
83
          return GSTIN;
19973 amit.gupta 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 __SELLERID_ISSET_ID = 0;
20025 amit.gupta 125
  private static final int __STATEID_ISSET_ID = 1;
126
  private BitSet __isset_bit_vector = new BitSet(2);
19973 amit.gupta 127
 
128
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
129
  static {
130
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
131
    tmpMap.put(_Fields.SELLER_ID, new org.apache.thrift.meta_data.FieldMetaData("sellerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
132
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
133
    tmpMap.put(_Fields.ORGANISATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("organisationName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
135
    tmpMap.put(_Fields.REGISTERED_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("registeredAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
136
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
137
    tmpMap.put(_Fields.REG_ID, new org.apache.thrift.meta_data.FieldMetaData("regId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
138
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
139
    tmpMap.put(_Fields.CIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("cinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
140
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
141
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
142
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
20025 amit.gupta 143
    tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
144
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21844 amit.gupta 145
    tmpMap.put(_Fields.GSTIN, new org.apache.thrift.meta_data.FieldMetaData("gstin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
146
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
19973 amit.gupta 147
    metaDataMap = Collections.unmodifiableMap(tmpMap);
148
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SellerInfo.class, metaDataMap);
149
  }
150
 
151
  public SellerInfo() {
152
  }
153
 
154
  public SellerInfo(
155
    long sellerId,
156
    String organisationName,
157
    String registeredAddress,
158
    String regId,
159
    String cinNumber,
20025 amit.gupta 160
    String tin,
21844 amit.gupta 161
    long stateId,
162
    String gstin)
19973 amit.gupta 163
  {
164
    this();
165
    this.sellerId = sellerId;
166
    setSellerIdIsSet(true);
167
    this.organisationName = organisationName;
168
    this.registeredAddress = registeredAddress;
169
    this.regId = regId;
170
    this.cinNumber = cinNumber;
171
    this.tin = tin;
20025 amit.gupta 172
    this.stateId = stateId;
173
    setStateIdIsSet(true);
21844 amit.gupta 174
    this.gstin = gstin;
19973 amit.gupta 175
  }
176
 
177
  /**
178
   * Performs a deep copy on <i>other</i>.
179
   */
180
  public SellerInfo(SellerInfo other) {
181
    __isset_bit_vector.clear();
182
    __isset_bit_vector.or(other.__isset_bit_vector);
183
    this.sellerId = other.sellerId;
184
    if (other.isSetOrganisationName()) {
185
      this.organisationName = other.organisationName;
186
    }
187
    if (other.isSetRegisteredAddress()) {
188
      this.registeredAddress = other.registeredAddress;
189
    }
190
    if (other.isSetRegId()) {
191
      this.regId = other.regId;
192
    }
193
    if (other.isSetCinNumber()) {
194
      this.cinNumber = other.cinNumber;
195
    }
196
    if (other.isSetTin()) {
197
      this.tin = other.tin;
198
    }
20025 amit.gupta 199
    this.stateId = other.stateId;
21844 amit.gupta 200
    if (other.isSetGstin()) {
201
      this.gstin = other.gstin;
202
    }
19973 amit.gupta 203
  }
204
 
205
  public SellerInfo deepCopy() {
206
    return new SellerInfo(this);
207
  }
208
 
209
  @Override
210
  public void clear() {
211
    setSellerIdIsSet(false);
212
    this.sellerId = 0;
213
    this.organisationName = null;
214
    this.registeredAddress = null;
215
    this.regId = null;
216
    this.cinNumber = null;
217
    this.tin = null;
20025 amit.gupta 218
    setStateIdIsSet(false);
219
    this.stateId = 0;
21844 amit.gupta 220
    this.gstin = null;
19973 amit.gupta 221
  }
222
 
223
  public long getSellerId() {
224
    return this.sellerId;
225
  }
226
 
227
  public void setSellerId(long sellerId) {
228
    this.sellerId = sellerId;
229
    setSellerIdIsSet(true);
230
  }
231
 
232
  public void unsetSellerId() {
233
    __isset_bit_vector.clear(__SELLERID_ISSET_ID);
234
  }
235
 
236
  /** Returns true if field sellerId is set (has been assigned a value) and false otherwise */
237
  public boolean isSetSellerId() {
238
    return __isset_bit_vector.get(__SELLERID_ISSET_ID);
239
  }
240
 
241
  public void setSellerIdIsSet(boolean value) {
242
    __isset_bit_vector.set(__SELLERID_ISSET_ID, value);
243
  }
244
 
245
  public String getOrganisationName() {
246
    return this.organisationName;
247
  }
248
 
249
  public void setOrganisationName(String organisationName) {
250
    this.organisationName = organisationName;
251
  }
252
 
253
  public void unsetOrganisationName() {
254
    this.organisationName = null;
255
  }
256
 
257
  /** Returns true if field organisationName is set (has been assigned a value) and false otherwise */
258
  public boolean isSetOrganisationName() {
259
    return this.organisationName != null;
260
  }
261
 
262
  public void setOrganisationNameIsSet(boolean value) {
263
    if (!value) {
264
      this.organisationName = null;
265
    }
266
  }
267
 
268
  public String getRegisteredAddress() {
269
    return this.registeredAddress;
270
  }
271
 
272
  public void setRegisteredAddress(String registeredAddress) {
273
    this.registeredAddress = registeredAddress;
274
  }
275
 
276
  public void unsetRegisteredAddress() {
277
    this.registeredAddress = null;
278
  }
279
 
280
  /** Returns true if field registeredAddress is set (has been assigned a value) and false otherwise */
281
  public boolean isSetRegisteredAddress() {
282
    return this.registeredAddress != null;
283
  }
284
 
285
  public void setRegisteredAddressIsSet(boolean value) {
286
    if (!value) {
287
      this.registeredAddress = null;
288
    }
289
  }
290
 
291
  public String getRegId() {
292
    return this.regId;
293
  }
294
 
295
  public void setRegId(String regId) {
296
    this.regId = regId;
297
  }
298
 
299
  public void unsetRegId() {
300
    this.regId = null;
301
  }
302
 
303
  /** Returns true if field regId is set (has been assigned a value) and false otherwise */
304
  public boolean isSetRegId() {
305
    return this.regId != null;
306
  }
307
 
308
  public void setRegIdIsSet(boolean value) {
309
    if (!value) {
310
      this.regId = null;
311
    }
312
  }
313
 
314
  public String getCinNumber() {
315
    return this.cinNumber;
316
  }
317
 
318
  public void setCinNumber(String cinNumber) {
319
    this.cinNumber = cinNumber;
320
  }
321
 
322
  public void unsetCinNumber() {
323
    this.cinNumber = null;
324
  }
325
 
326
  /** Returns true if field cinNumber is set (has been assigned a value) and false otherwise */
327
  public boolean isSetCinNumber() {
328
    return this.cinNumber != null;
329
  }
330
 
331
  public void setCinNumberIsSet(boolean value) {
332
    if (!value) {
333
      this.cinNumber = null;
334
    }
335
  }
336
 
337
  public String getTin() {
338
    return this.tin;
339
  }
340
 
341
  public void setTin(String tin) {
342
    this.tin = tin;
343
  }
344
 
345
  public void unsetTin() {
346
    this.tin = null;
347
  }
348
 
349
  /** Returns true if field tin is set (has been assigned a value) and false otherwise */
350
  public boolean isSetTin() {
351
    return this.tin != null;
352
  }
353
 
354
  public void setTinIsSet(boolean value) {
355
    if (!value) {
356
      this.tin = null;
357
    }
358
  }
359
 
20025 amit.gupta 360
  public long getStateId() {
361
    return this.stateId;
362
  }
363
 
364
  public void setStateId(long stateId) {
365
    this.stateId = stateId;
366
    setStateIdIsSet(true);
367
  }
368
 
369
  public void unsetStateId() {
370
    __isset_bit_vector.clear(__STATEID_ISSET_ID);
371
  }
372
 
373
  /** Returns true if field stateId is set (has been assigned a value) and false otherwise */
374
  public boolean isSetStateId() {
375
    return __isset_bit_vector.get(__STATEID_ISSET_ID);
376
  }
377
 
378
  public void setStateIdIsSet(boolean value) {
379
    __isset_bit_vector.set(__STATEID_ISSET_ID, value);
380
  }
381
 
21844 amit.gupta 382
  public String getGstin() {
383
    return this.gstin;
384
  }
385
 
386
  public void setGstin(String gstin) {
387
    this.gstin = gstin;
388
  }
389
 
390
  public void unsetGstin() {
391
    this.gstin = null;
392
  }
393
 
394
  /** Returns true if field gstin is set (has been assigned a value) and false otherwise */
395
  public boolean isSetGstin() {
396
    return this.gstin != null;
397
  }
398
 
399
  public void setGstinIsSet(boolean value) {
400
    if (!value) {
401
      this.gstin = null;
402
    }
403
  }
404
 
19973 amit.gupta 405
  public void setFieldValue(_Fields field, Object value) {
406
    switch (field) {
407
    case SELLER_ID:
408
      if (value == null) {
409
        unsetSellerId();
410
      } else {
411
        setSellerId((Long)value);
412
      }
413
      break;
414
 
415
    case ORGANISATION_NAME:
416
      if (value == null) {
417
        unsetOrganisationName();
418
      } else {
419
        setOrganisationName((String)value);
420
      }
421
      break;
422
 
423
    case REGISTERED_ADDRESS:
424
      if (value == null) {
425
        unsetRegisteredAddress();
426
      } else {
427
        setRegisteredAddress((String)value);
428
      }
429
      break;
430
 
431
    case REG_ID:
432
      if (value == null) {
433
        unsetRegId();
434
      } else {
435
        setRegId((String)value);
436
      }
437
      break;
438
 
439
    case CIN_NUMBER:
440
      if (value == null) {
441
        unsetCinNumber();
442
      } else {
443
        setCinNumber((String)value);
444
      }
445
      break;
446
 
447
    case TIN:
448
      if (value == null) {
449
        unsetTin();
450
      } else {
451
        setTin((String)value);
452
      }
453
      break;
454
 
20025 amit.gupta 455
    case STATE_ID:
456
      if (value == null) {
457
        unsetStateId();
458
      } else {
459
        setStateId((Long)value);
460
      }
461
      break;
462
 
21844 amit.gupta 463
    case GSTIN:
464
      if (value == null) {
465
        unsetGstin();
466
      } else {
467
        setGstin((String)value);
468
      }
469
      break;
470
 
19973 amit.gupta 471
    }
472
  }
473
 
474
  public Object getFieldValue(_Fields field) {
475
    switch (field) {
476
    case SELLER_ID:
477
      return Long.valueOf(getSellerId());
478
 
479
    case ORGANISATION_NAME:
480
      return getOrganisationName();
481
 
482
    case REGISTERED_ADDRESS:
483
      return getRegisteredAddress();
484
 
485
    case REG_ID:
486
      return getRegId();
487
 
488
    case CIN_NUMBER:
489
      return getCinNumber();
490
 
491
    case TIN:
492
      return getTin();
493
 
20025 amit.gupta 494
    case STATE_ID:
495
      return Long.valueOf(getStateId());
496
 
21844 amit.gupta 497
    case GSTIN:
498
      return getGstin();
499
 
19973 amit.gupta 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 SELLER_ID:
512
      return isSetSellerId();
513
    case ORGANISATION_NAME:
514
      return isSetOrganisationName();
515
    case REGISTERED_ADDRESS:
516
      return isSetRegisteredAddress();
517
    case REG_ID:
518
      return isSetRegId();
519
    case CIN_NUMBER:
520
      return isSetCinNumber();
521
    case TIN:
522
      return isSetTin();
20025 amit.gupta 523
    case STATE_ID:
524
      return isSetStateId();
21844 amit.gupta 525
    case GSTIN:
526
      return isSetGstin();
19973 amit.gupta 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 SellerInfo)
536
      return this.equals((SellerInfo)that);
537
    return false;
538
  }
539
 
540
  public boolean equals(SellerInfo that) {
541
    if (that == null)
542
      return false;
543
 
544
    boolean this_present_sellerId = true;
545
    boolean that_present_sellerId = true;
546
    if (this_present_sellerId || that_present_sellerId) {
547
      if (!(this_present_sellerId && that_present_sellerId))
548
        return false;
549
      if (this.sellerId != that.sellerId)
550
        return false;
551
    }
552
 
553
    boolean this_present_organisationName = true && this.isSetOrganisationName();
554
    boolean that_present_organisationName = true && that.isSetOrganisationName();
555
    if (this_present_organisationName || that_present_organisationName) {
556
      if (!(this_present_organisationName && that_present_organisationName))
557
        return false;
558
      if (!this.organisationName.equals(that.organisationName))
559
        return false;
560
    }
561
 
562
    boolean this_present_registeredAddress = true && this.isSetRegisteredAddress();
563
    boolean that_present_registeredAddress = true && that.isSetRegisteredAddress();
564
    if (this_present_registeredAddress || that_present_registeredAddress) {
565
      if (!(this_present_registeredAddress && that_present_registeredAddress))
566
        return false;
567
      if (!this.registeredAddress.equals(that.registeredAddress))
568
        return false;
569
    }
570
 
571
    boolean this_present_regId = true && this.isSetRegId();
572
    boolean that_present_regId = true && that.isSetRegId();
573
    if (this_present_regId || that_present_regId) {
574
      if (!(this_present_regId && that_present_regId))
575
        return false;
576
      if (!this.regId.equals(that.regId))
577
        return false;
578
    }
579
 
580
    boolean this_present_cinNumber = true && this.isSetCinNumber();
581
    boolean that_present_cinNumber = true && that.isSetCinNumber();
582
    if (this_present_cinNumber || that_present_cinNumber) {
583
      if (!(this_present_cinNumber && that_present_cinNumber))
584
        return false;
585
      if (!this.cinNumber.equals(that.cinNumber))
586
        return false;
587
    }
588
 
589
    boolean this_present_tin = true && this.isSetTin();
590
    boolean that_present_tin = true && that.isSetTin();
591
    if (this_present_tin || that_present_tin) {
592
      if (!(this_present_tin && that_present_tin))
593
        return false;
594
      if (!this.tin.equals(that.tin))
595
        return false;
596
    }
597
 
20025 amit.gupta 598
    boolean this_present_stateId = true;
599
    boolean that_present_stateId = true;
600
    if (this_present_stateId || that_present_stateId) {
601
      if (!(this_present_stateId && that_present_stateId))
602
        return false;
603
      if (this.stateId != that.stateId)
604
        return false;
605
    }
606
 
21844 amit.gupta 607
    boolean this_present_gstin = true && this.isSetGstin();
608
    boolean that_present_gstin = true && that.isSetGstin();
609
    if (this_present_gstin || that_present_gstin) {
610
      if (!(this_present_gstin && that_present_gstin))
611
        return false;
612
      if (!this.gstin.equals(that.gstin))
613
        return false;
614
    }
615
 
19973 amit.gupta 616
    return true;
617
  }
618
 
619
  @Override
620
  public int hashCode() {
621
    return 0;
622
  }
623
 
624
  public int compareTo(SellerInfo other) {
625
    if (!getClass().equals(other.getClass())) {
626
      return getClass().getName().compareTo(other.getClass().getName());
627
    }
628
 
629
    int lastComparison = 0;
630
    SellerInfo typedOther = (SellerInfo)other;
631
 
632
    lastComparison = Boolean.valueOf(isSetSellerId()).compareTo(typedOther.isSetSellerId());
633
    if (lastComparison != 0) {
634
      return lastComparison;
635
    }
636
    if (isSetSellerId()) {
637
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sellerId, typedOther.sellerId);
638
      if (lastComparison != 0) {
639
        return lastComparison;
640
      }
641
    }
642
    lastComparison = Boolean.valueOf(isSetOrganisationName()).compareTo(typedOther.isSetOrganisationName());
643
    if (lastComparison != 0) {
644
      return lastComparison;
645
    }
646
    if (isSetOrganisationName()) {
647
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organisationName, typedOther.organisationName);
648
      if (lastComparison != 0) {
649
        return lastComparison;
650
      }
651
    }
652
    lastComparison = Boolean.valueOf(isSetRegisteredAddress()).compareTo(typedOther.isSetRegisteredAddress());
653
    if (lastComparison != 0) {
654
      return lastComparison;
655
    }
656
    if (isSetRegisteredAddress()) {
657
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registeredAddress, typedOther.registeredAddress);
658
      if (lastComparison != 0) {
659
        return lastComparison;
660
      }
661
    }
662
    lastComparison = Boolean.valueOf(isSetRegId()).compareTo(typedOther.isSetRegId());
663
    if (lastComparison != 0) {
664
      return lastComparison;
665
    }
666
    if (isSetRegId()) {
667
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regId, typedOther.regId);
668
      if (lastComparison != 0) {
669
        return lastComparison;
670
      }
671
    }
672
    lastComparison = Boolean.valueOf(isSetCinNumber()).compareTo(typedOther.isSetCinNumber());
673
    if (lastComparison != 0) {
674
      return lastComparison;
675
    }
676
    if (isSetCinNumber()) {
677
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cinNumber, typedOther.cinNumber);
678
      if (lastComparison != 0) {
679
        return lastComparison;
680
      }
681
    }
682
    lastComparison = Boolean.valueOf(isSetTin()).compareTo(typedOther.isSetTin());
683
    if (lastComparison != 0) {
684
      return lastComparison;
685
    }
686
    if (isSetTin()) {
687
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
688
      if (lastComparison != 0) {
689
        return lastComparison;
690
      }
691
    }
20025 amit.gupta 692
    lastComparison = Boolean.valueOf(isSetStateId()).compareTo(typedOther.isSetStateId());
693
    if (lastComparison != 0) {
694
      return lastComparison;
695
    }
696
    if (isSetStateId()) {
697
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
698
      if (lastComparison != 0) {
699
        return lastComparison;
700
      }
701
    }
21844 amit.gupta 702
    lastComparison = Boolean.valueOf(isSetGstin()).compareTo(typedOther.isSetGstin());
703
    if (lastComparison != 0) {
704
      return lastComparison;
705
    }
706
    if (isSetGstin()) {
707
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gstin, typedOther.gstin);
708
      if (lastComparison != 0) {
709
        return lastComparison;
710
      }
711
    }
19973 amit.gupta 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: // SELLER_ID
730
          if (field.type == org.apache.thrift.protocol.TType.I64) {
731
            this.sellerId = iprot.readI64();
732
            setSellerIdIsSet(true);
733
          } else { 
734
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
735
          }
736
          break;
737
        case 2: // ORGANISATION_NAME
738
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
739
            this.organisationName = iprot.readString();
740
          } else { 
741
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
742
          }
743
          break;
744
        case 3: // REGISTERED_ADDRESS
745
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
746
            this.registeredAddress = iprot.readString();
747
          } else { 
748
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
749
          }
750
          break;
751
        case 4: // REG_ID
752
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
753
            this.regId = iprot.readString();
754
          } else { 
755
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
756
          }
757
          break;
758
        case 5: // CIN_NUMBER
759
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
760
            this.cinNumber = iprot.readString();
761
          } else { 
762
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
763
          }
764
          break;
765
        case 6: // TIN
766
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
767
            this.tin = iprot.readString();
768
          } else { 
769
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
770
          }
771
          break;
20025 amit.gupta 772
        case 7: // STATE_ID
773
          if (field.type == org.apache.thrift.protocol.TType.I64) {
774
            this.stateId = iprot.readI64();
775
            setStateIdIsSet(true);
776
          } else { 
777
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
778
          }
779
          break;
21844 amit.gupta 780
        case 8: // GSTIN
781
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
782
            this.gstin = iprot.readString();
783
          } else { 
784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
785
          }
786
          break;
19973 amit.gupta 787
        default:
788
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
789
      }
790
      iprot.readFieldEnd();
791
    }
792
    iprot.readStructEnd();
793
    validate();
794
  }
795
 
796
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
797
    validate();
798
 
799
    oprot.writeStructBegin(STRUCT_DESC);
800
    oprot.writeFieldBegin(SELLER_ID_FIELD_DESC);
801
    oprot.writeI64(this.sellerId);
802
    oprot.writeFieldEnd();
803
    if (this.organisationName != null) {
804
      oprot.writeFieldBegin(ORGANISATION_NAME_FIELD_DESC);
805
      oprot.writeString(this.organisationName);
806
      oprot.writeFieldEnd();
807
    }
808
    if (this.registeredAddress != null) {
809
      oprot.writeFieldBegin(REGISTERED_ADDRESS_FIELD_DESC);
810
      oprot.writeString(this.registeredAddress);
811
      oprot.writeFieldEnd();
812
    }
813
    if (this.regId != null) {
814
      oprot.writeFieldBegin(REG_ID_FIELD_DESC);
815
      oprot.writeString(this.regId);
816
      oprot.writeFieldEnd();
817
    }
818
    if (this.cinNumber != null) {
819
      oprot.writeFieldBegin(CIN_NUMBER_FIELD_DESC);
820
      oprot.writeString(this.cinNumber);
821
      oprot.writeFieldEnd();
822
    }
823
    if (this.tin != null) {
824
      oprot.writeFieldBegin(TIN_FIELD_DESC);
825
      oprot.writeString(this.tin);
826
      oprot.writeFieldEnd();
827
    }
20025 amit.gupta 828
    oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
829
    oprot.writeI64(this.stateId);
830
    oprot.writeFieldEnd();
21844 amit.gupta 831
    if (this.gstin != null) {
832
      oprot.writeFieldBegin(GSTIN_FIELD_DESC);
833
      oprot.writeString(this.gstin);
834
      oprot.writeFieldEnd();
835
    }
19973 amit.gupta 836
    oprot.writeFieldStop();
837
    oprot.writeStructEnd();
838
  }
839
 
840
  @Override
841
  public String toString() {
842
    StringBuilder sb = new StringBuilder("SellerInfo(");
843
    boolean first = true;
844
 
845
    sb.append("sellerId:");
846
    sb.append(this.sellerId);
847
    first = false;
848
    if (!first) sb.append(", ");
849
    sb.append("organisationName:");
850
    if (this.organisationName == null) {
851
      sb.append("null");
852
    } else {
853
      sb.append(this.organisationName);
854
    }
855
    first = false;
856
    if (!first) sb.append(", ");
857
    sb.append("registeredAddress:");
858
    if (this.registeredAddress == null) {
859
      sb.append("null");
860
    } else {
861
      sb.append(this.registeredAddress);
862
    }
863
    first = false;
864
    if (!first) sb.append(", ");
865
    sb.append("regId:");
866
    if (this.regId == null) {
867
      sb.append("null");
868
    } else {
869
      sb.append(this.regId);
870
    }
871
    first = false;
872
    if (!first) sb.append(", ");
873
    sb.append("cinNumber:");
874
    if (this.cinNumber == null) {
875
      sb.append("null");
876
    } else {
877
      sb.append(this.cinNumber);
878
    }
879
    first = false;
880
    if (!first) sb.append(", ");
881
    sb.append("tin:");
882
    if (this.tin == null) {
883
      sb.append("null");
884
    } else {
885
      sb.append(this.tin);
886
    }
887
    first = false;
20025 amit.gupta 888
    if (!first) sb.append(", ");
889
    sb.append("stateId:");
890
    sb.append(this.stateId);
891
    first = false;
21844 amit.gupta 892
    if (!first) sb.append(", ");
893
    sb.append("gstin:");
894
    if (this.gstin == null) {
895
      sb.append("null");
896
    } else {
897
      sb.append(this.gstin);
898
    }
899
    first = false;
19973 amit.gupta 900
    sb.append(")");
901
    return sb.toString();
902
  }
903
 
904
  public void validate() throws org.apache.thrift.TException {
905
    // check for required fields
906
  }
907
 
908
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
909
    try {
910
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
911
    } catch (org.apache.thrift.TException te) {
912
      throw new java.io.IOException(te);
913
    }
914
  }
915
 
916
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
917
    try {
918
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
919
      __isset_bit_vector = new BitSet(1);
920
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
921
    } catch (org.apache.thrift.TException te) {
922
      throw new java.io.IOException(te);
923
    }
924
  }
925
 
926
}
927