Subversion Repositories SmartDukaan

Rev

Rev 20025 | Go to most recent revision | Details | 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);
32
 
33
  private long sellerId; // required
34
  private String organisationName; // required
35
  private String registeredAddress; // required
36
  private String regId; // required
37
  private String cinNumber; // required
38
  private String tin; // required
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
    SELLER_ID((short)1, "sellerId"),
43
    ORGANISATION_NAME((short)2, "organisationName"),
44
    REGISTERED_ADDRESS((short)3, "registeredAddress"),
45
    REG_ID((short)4, "regId"),
46
    CIN_NUMBER((short)5, "cinNumber"),
47
    TIN((short)6, "tin");
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: // SELLER_ID
63
          return SELLER_ID;
64
        case 2: // ORGANISATION_NAME
65
          return ORGANISATION_NAME;
66
        case 3: // REGISTERED_ADDRESS
67
          return REGISTERED_ADDRESS;
68
        case 4: // REG_ID
69
          return REG_ID;
70
        case 5: // CIN_NUMBER
71
          return CIN_NUMBER;
72
        case 6: // TIN
73
          return TIN;
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 __SELLERID_ISSET_ID = 0;
115
  private BitSet __isset_bit_vector = new BitSet(1);
116
 
117
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
118
  static {
119
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
120
    tmpMap.put(_Fields.SELLER_ID, new org.apache.thrift.meta_data.FieldMetaData("sellerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
121
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
122
    tmpMap.put(_Fields.ORGANISATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("organisationName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
123
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
124
    tmpMap.put(_Fields.REGISTERED_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("registeredAddress", org.apache.thrift.TFieldRequirementType.DEFAULT, 
125
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
126
    tmpMap.put(_Fields.REG_ID, new org.apache.thrift.meta_data.FieldMetaData("regId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
127
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
128
    tmpMap.put(_Fields.CIN_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("cinNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
129
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
130
    tmpMap.put(_Fields.TIN, new org.apache.thrift.meta_data.FieldMetaData("tin", org.apache.thrift.TFieldRequirementType.DEFAULT, 
131
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
132
    metaDataMap = Collections.unmodifiableMap(tmpMap);
133
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SellerInfo.class, metaDataMap);
134
  }
135
 
136
  public SellerInfo() {
137
  }
138
 
139
  public SellerInfo(
140
    long sellerId,
141
    String organisationName,
142
    String registeredAddress,
143
    String regId,
144
    String cinNumber,
145
    String tin)
146
  {
147
    this();
148
    this.sellerId = sellerId;
149
    setSellerIdIsSet(true);
150
    this.organisationName = organisationName;
151
    this.registeredAddress = registeredAddress;
152
    this.regId = regId;
153
    this.cinNumber = cinNumber;
154
    this.tin = tin;
155
  }
156
 
157
  /**
158
   * Performs a deep copy on <i>other</i>.
159
   */
160
  public SellerInfo(SellerInfo other) {
161
    __isset_bit_vector.clear();
162
    __isset_bit_vector.or(other.__isset_bit_vector);
163
    this.sellerId = other.sellerId;
164
    if (other.isSetOrganisationName()) {
165
      this.organisationName = other.organisationName;
166
    }
167
    if (other.isSetRegisteredAddress()) {
168
      this.registeredAddress = other.registeredAddress;
169
    }
170
    if (other.isSetRegId()) {
171
      this.regId = other.regId;
172
    }
173
    if (other.isSetCinNumber()) {
174
      this.cinNumber = other.cinNumber;
175
    }
176
    if (other.isSetTin()) {
177
      this.tin = other.tin;
178
    }
179
  }
180
 
181
  public SellerInfo deepCopy() {
182
    return new SellerInfo(this);
183
  }
184
 
185
  @Override
186
  public void clear() {
187
    setSellerIdIsSet(false);
188
    this.sellerId = 0;
189
    this.organisationName = null;
190
    this.registeredAddress = null;
191
    this.regId = null;
192
    this.cinNumber = null;
193
    this.tin = null;
194
  }
195
 
196
  public long getSellerId() {
197
    return this.sellerId;
198
  }
199
 
200
  public void setSellerId(long sellerId) {
201
    this.sellerId = sellerId;
202
    setSellerIdIsSet(true);
203
  }
204
 
205
  public void unsetSellerId() {
206
    __isset_bit_vector.clear(__SELLERID_ISSET_ID);
207
  }
208
 
209
  /** Returns true if field sellerId is set (has been assigned a value) and false otherwise */
210
  public boolean isSetSellerId() {
211
    return __isset_bit_vector.get(__SELLERID_ISSET_ID);
212
  }
213
 
214
  public void setSellerIdIsSet(boolean value) {
215
    __isset_bit_vector.set(__SELLERID_ISSET_ID, value);
216
  }
217
 
218
  public String getOrganisationName() {
219
    return this.organisationName;
220
  }
221
 
222
  public void setOrganisationName(String organisationName) {
223
    this.organisationName = organisationName;
224
  }
225
 
226
  public void unsetOrganisationName() {
227
    this.organisationName = null;
228
  }
229
 
230
  /** Returns true if field organisationName is set (has been assigned a value) and false otherwise */
231
  public boolean isSetOrganisationName() {
232
    return this.organisationName != null;
233
  }
234
 
235
  public void setOrganisationNameIsSet(boolean value) {
236
    if (!value) {
237
      this.organisationName = null;
238
    }
239
  }
240
 
241
  public String getRegisteredAddress() {
242
    return this.registeredAddress;
243
  }
244
 
245
  public void setRegisteredAddress(String registeredAddress) {
246
    this.registeredAddress = registeredAddress;
247
  }
248
 
249
  public void unsetRegisteredAddress() {
250
    this.registeredAddress = null;
251
  }
252
 
253
  /** Returns true if field registeredAddress is set (has been assigned a value) and false otherwise */
254
  public boolean isSetRegisteredAddress() {
255
    return this.registeredAddress != null;
256
  }
257
 
258
  public void setRegisteredAddressIsSet(boolean value) {
259
    if (!value) {
260
      this.registeredAddress = null;
261
    }
262
  }
263
 
264
  public String getRegId() {
265
    return this.regId;
266
  }
267
 
268
  public void setRegId(String regId) {
269
    this.regId = regId;
270
  }
271
 
272
  public void unsetRegId() {
273
    this.regId = null;
274
  }
275
 
276
  /** Returns true if field regId is set (has been assigned a value) and false otherwise */
277
  public boolean isSetRegId() {
278
    return this.regId != null;
279
  }
280
 
281
  public void setRegIdIsSet(boolean value) {
282
    if (!value) {
283
      this.regId = null;
284
    }
285
  }
286
 
287
  public String getCinNumber() {
288
    return this.cinNumber;
289
  }
290
 
291
  public void setCinNumber(String cinNumber) {
292
    this.cinNumber = cinNumber;
293
  }
294
 
295
  public void unsetCinNumber() {
296
    this.cinNumber = null;
297
  }
298
 
299
  /** Returns true if field cinNumber is set (has been assigned a value) and false otherwise */
300
  public boolean isSetCinNumber() {
301
    return this.cinNumber != null;
302
  }
303
 
304
  public void setCinNumberIsSet(boolean value) {
305
    if (!value) {
306
      this.cinNumber = null;
307
    }
308
  }
309
 
310
  public String getTin() {
311
    return this.tin;
312
  }
313
 
314
  public void setTin(String tin) {
315
    this.tin = tin;
316
  }
317
 
318
  public void unsetTin() {
319
    this.tin = null;
320
  }
321
 
322
  /** Returns true if field tin is set (has been assigned a value) and false otherwise */
323
  public boolean isSetTin() {
324
    return this.tin != null;
325
  }
326
 
327
  public void setTinIsSet(boolean value) {
328
    if (!value) {
329
      this.tin = null;
330
    }
331
  }
332
 
333
  public void setFieldValue(_Fields field, Object value) {
334
    switch (field) {
335
    case SELLER_ID:
336
      if (value == null) {
337
        unsetSellerId();
338
      } else {
339
        setSellerId((Long)value);
340
      }
341
      break;
342
 
343
    case ORGANISATION_NAME:
344
      if (value == null) {
345
        unsetOrganisationName();
346
      } else {
347
        setOrganisationName((String)value);
348
      }
349
      break;
350
 
351
    case REGISTERED_ADDRESS:
352
      if (value == null) {
353
        unsetRegisteredAddress();
354
      } else {
355
        setRegisteredAddress((String)value);
356
      }
357
      break;
358
 
359
    case REG_ID:
360
      if (value == null) {
361
        unsetRegId();
362
      } else {
363
        setRegId((String)value);
364
      }
365
      break;
366
 
367
    case CIN_NUMBER:
368
      if (value == null) {
369
        unsetCinNumber();
370
      } else {
371
        setCinNumber((String)value);
372
      }
373
      break;
374
 
375
    case TIN:
376
      if (value == null) {
377
        unsetTin();
378
      } else {
379
        setTin((String)value);
380
      }
381
      break;
382
 
383
    }
384
  }
385
 
386
  public Object getFieldValue(_Fields field) {
387
    switch (field) {
388
    case SELLER_ID:
389
      return Long.valueOf(getSellerId());
390
 
391
    case ORGANISATION_NAME:
392
      return getOrganisationName();
393
 
394
    case REGISTERED_ADDRESS:
395
      return getRegisteredAddress();
396
 
397
    case REG_ID:
398
      return getRegId();
399
 
400
    case CIN_NUMBER:
401
      return getCinNumber();
402
 
403
    case TIN:
404
      return getTin();
405
 
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 SELLER_ID:
418
      return isSetSellerId();
419
    case ORGANISATION_NAME:
420
      return isSetOrganisationName();
421
    case REGISTERED_ADDRESS:
422
      return isSetRegisteredAddress();
423
    case REG_ID:
424
      return isSetRegId();
425
    case CIN_NUMBER:
426
      return isSetCinNumber();
427
    case TIN:
428
      return isSetTin();
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 SellerInfo)
438
      return this.equals((SellerInfo)that);
439
    return false;
440
  }
441
 
442
  public boolean equals(SellerInfo that) {
443
    if (that == null)
444
      return false;
445
 
446
    boolean this_present_sellerId = true;
447
    boolean that_present_sellerId = true;
448
    if (this_present_sellerId || that_present_sellerId) {
449
      if (!(this_present_sellerId && that_present_sellerId))
450
        return false;
451
      if (this.sellerId != that.sellerId)
452
        return false;
453
    }
454
 
455
    boolean this_present_organisationName = true && this.isSetOrganisationName();
456
    boolean that_present_organisationName = true && that.isSetOrganisationName();
457
    if (this_present_organisationName || that_present_organisationName) {
458
      if (!(this_present_organisationName && that_present_organisationName))
459
        return false;
460
      if (!this.organisationName.equals(that.organisationName))
461
        return false;
462
    }
463
 
464
    boolean this_present_registeredAddress = true && this.isSetRegisteredAddress();
465
    boolean that_present_registeredAddress = true && that.isSetRegisteredAddress();
466
    if (this_present_registeredAddress || that_present_registeredAddress) {
467
      if (!(this_present_registeredAddress && that_present_registeredAddress))
468
        return false;
469
      if (!this.registeredAddress.equals(that.registeredAddress))
470
        return false;
471
    }
472
 
473
    boolean this_present_regId = true && this.isSetRegId();
474
    boolean that_present_regId = true && that.isSetRegId();
475
    if (this_present_regId || that_present_regId) {
476
      if (!(this_present_regId && that_present_regId))
477
        return false;
478
      if (!this.regId.equals(that.regId))
479
        return false;
480
    }
481
 
482
    boolean this_present_cinNumber = true && this.isSetCinNumber();
483
    boolean that_present_cinNumber = true && that.isSetCinNumber();
484
    if (this_present_cinNumber || that_present_cinNumber) {
485
      if (!(this_present_cinNumber && that_present_cinNumber))
486
        return false;
487
      if (!this.cinNumber.equals(that.cinNumber))
488
        return false;
489
    }
490
 
491
    boolean this_present_tin = true && this.isSetTin();
492
    boolean that_present_tin = true && that.isSetTin();
493
    if (this_present_tin || that_present_tin) {
494
      if (!(this_present_tin && that_present_tin))
495
        return false;
496
      if (!this.tin.equals(that.tin))
497
        return false;
498
    }
499
 
500
    return true;
501
  }
502
 
503
  @Override
504
  public int hashCode() {
505
    return 0;
506
  }
507
 
508
  public int compareTo(SellerInfo other) {
509
    if (!getClass().equals(other.getClass())) {
510
      return getClass().getName().compareTo(other.getClass().getName());
511
    }
512
 
513
    int lastComparison = 0;
514
    SellerInfo typedOther = (SellerInfo)other;
515
 
516
    lastComparison = Boolean.valueOf(isSetSellerId()).compareTo(typedOther.isSetSellerId());
517
    if (lastComparison != 0) {
518
      return lastComparison;
519
    }
520
    if (isSetSellerId()) {
521
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sellerId, typedOther.sellerId);
522
      if (lastComparison != 0) {
523
        return lastComparison;
524
      }
525
    }
526
    lastComparison = Boolean.valueOf(isSetOrganisationName()).compareTo(typedOther.isSetOrganisationName());
527
    if (lastComparison != 0) {
528
      return lastComparison;
529
    }
530
    if (isSetOrganisationName()) {
531
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.organisationName, typedOther.organisationName);
532
      if (lastComparison != 0) {
533
        return lastComparison;
534
      }
535
    }
536
    lastComparison = Boolean.valueOf(isSetRegisteredAddress()).compareTo(typedOther.isSetRegisteredAddress());
537
    if (lastComparison != 0) {
538
      return lastComparison;
539
    }
540
    if (isSetRegisteredAddress()) {
541
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.registeredAddress, typedOther.registeredAddress);
542
      if (lastComparison != 0) {
543
        return lastComparison;
544
      }
545
    }
546
    lastComparison = Boolean.valueOf(isSetRegId()).compareTo(typedOther.isSetRegId());
547
    if (lastComparison != 0) {
548
      return lastComparison;
549
    }
550
    if (isSetRegId()) {
551
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.regId, typedOther.regId);
552
      if (lastComparison != 0) {
553
        return lastComparison;
554
      }
555
    }
556
    lastComparison = Boolean.valueOf(isSetCinNumber()).compareTo(typedOther.isSetCinNumber());
557
    if (lastComparison != 0) {
558
      return lastComparison;
559
    }
560
    if (isSetCinNumber()) {
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cinNumber, typedOther.cinNumber);
562
      if (lastComparison != 0) {
563
        return lastComparison;
564
      }
565
    }
566
    lastComparison = Boolean.valueOf(isSetTin()).compareTo(typedOther.isSetTin());
567
    if (lastComparison != 0) {
568
      return lastComparison;
569
    }
570
    if (isSetTin()) {
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tin, typedOther.tin);
572
      if (lastComparison != 0) {
573
        return lastComparison;
574
      }
575
    }
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: // SELLER_ID
594
          if (field.type == org.apache.thrift.protocol.TType.I64) {
595
            this.sellerId = iprot.readI64();
596
            setSellerIdIsSet(true);
597
          } else { 
598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
599
          }
600
          break;
601
        case 2: // ORGANISATION_NAME
602
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
603
            this.organisationName = iprot.readString();
604
          } else { 
605
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
606
          }
607
          break;
608
        case 3: // REGISTERED_ADDRESS
609
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
610
            this.registeredAddress = iprot.readString();
611
          } else { 
612
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
613
          }
614
          break;
615
        case 4: // REG_ID
616
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
617
            this.regId = iprot.readString();
618
          } else { 
619
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
620
          }
621
          break;
622
        case 5: // CIN_NUMBER
623
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
624
            this.cinNumber = iprot.readString();
625
          } else { 
626
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
627
          }
628
          break;
629
        case 6: // TIN
630
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
631
            this.tin = iprot.readString();
632
          } else { 
633
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
634
          }
635
          break;
636
        default:
637
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
638
      }
639
      iprot.readFieldEnd();
640
    }
641
    iprot.readStructEnd();
642
    validate();
643
  }
644
 
645
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
646
    validate();
647
 
648
    oprot.writeStructBegin(STRUCT_DESC);
649
    oprot.writeFieldBegin(SELLER_ID_FIELD_DESC);
650
    oprot.writeI64(this.sellerId);
651
    oprot.writeFieldEnd();
652
    if (this.organisationName != null) {
653
      oprot.writeFieldBegin(ORGANISATION_NAME_FIELD_DESC);
654
      oprot.writeString(this.organisationName);
655
      oprot.writeFieldEnd();
656
    }
657
    if (this.registeredAddress != null) {
658
      oprot.writeFieldBegin(REGISTERED_ADDRESS_FIELD_DESC);
659
      oprot.writeString(this.registeredAddress);
660
      oprot.writeFieldEnd();
661
    }
662
    if (this.regId != null) {
663
      oprot.writeFieldBegin(REG_ID_FIELD_DESC);
664
      oprot.writeString(this.regId);
665
      oprot.writeFieldEnd();
666
    }
667
    if (this.cinNumber != null) {
668
      oprot.writeFieldBegin(CIN_NUMBER_FIELD_DESC);
669
      oprot.writeString(this.cinNumber);
670
      oprot.writeFieldEnd();
671
    }
672
    if (this.tin != null) {
673
      oprot.writeFieldBegin(TIN_FIELD_DESC);
674
      oprot.writeString(this.tin);
675
      oprot.writeFieldEnd();
676
    }
677
    oprot.writeFieldStop();
678
    oprot.writeStructEnd();
679
  }
680
 
681
  @Override
682
  public String toString() {
683
    StringBuilder sb = new StringBuilder("SellerInfo(");
684
    boolean first = true;
685
 
686
    sb.append("sellerId:");
687
    sb.append(this.sellerId);
688
    first = false;
689
    if (!first) sb.append(", ");
690
    sb.append("organisationName:");
691
    if (this.organisationName == null) {
692
      sb.append("null");
693
    } else {
694
      sb.append(this.organisationName);
695
    }
696
    first = false;
697
    if (!first) sb.append(", ");
698
    sb.append("registeredAddress:");
699
    if (this.registeredAddress == null) {
700
      sb.append("null");
701
    } else {
702
      sb.append(this.registeredAddress);
703
    }
704
    first = false;
705
    if (!first) sb.append(", ");
706
    sb.append("regId:");
707
    if (this.regId == null) {
708
      sb.append("null");
709
    } else {
710
      sb.append(this.regId);
711
    }
712
    first = false;
713
    if (!first) sb.append(", ");
714
    sb.append("cinNumber:");
715
    if (this.cinNumber == null) {
716
      sb.append("null");
717
    } else {
718
      sb.append(this.cinNumber);
719
    }
720
    first = false;
721
    if (!first) sb.append(", ");
722
    sb.append("tin:");
723
    if (this.tin == null) {
724
      sb.append("null");
725
    } else {
726
      sb.append(this.tin);
727
    }
728
    first = false;
729
    sb.append(")");
730
    return sb.toString();
731
  }
732
 
733
  public void validate() throws org.apache.thrift.TException {
734
    // check for required fields
735
  }
736
 
737
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
738
    try {
739
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
740
    } catch (org.apache.thrift.TException te) {
741
      throw new java.io.IOException(te);
742
    }
743
  }
744
 
745
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
746
    try {
747
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
748
      __isset_bit_vector = new BitSet(1);
749
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
750
    } catch (org.apache.thrift.TException te) {
751
      throw new java.io.IOException(te);
752
    }
753
  }
754
 
755
}
756