Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15251 manish.sha 1
/**
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.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 AccessTokenizer implements org.apache.thrift.TBase<AccessTokenizer, AccessTokenizer._Fields>, java.io.Serializable, Cloneable {
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AccessTokenizer");
25
 
26
  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
27
  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)2);
28
  private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.STRING, (short)3);
29
  private static final org.apache.thrift.protocol.TField TOKEN_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("tokenString", org.apache.thrift.protocol.TType.STRING, (short)4);
30
  private static final org.apache.thrift.protocol.TField EXPIRED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expiredTime", org.apache.thrift.protocol.TType.I64, (short)5);
31
  private static final org.apache.thrift.protocol.TField EXPIRED_FIELD_DESC = new org.apache.thrift.protocol.TField("expired", org.apache.thrift.protocol.TType.BOOL, (short)6);
32
 
33
  private long id; // required
34
  private long userId; // required
35
  private String source; // required
36
  private String tokenString; // required
37
  private long expiredTime; // required
38
  private boolean expired; // 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
    ID((short)1, "id"),
43
    USER_ID((short)2, "userId"),
44
    SOURCE((short)3, "source"),
45
    TOKEN_STRING((short)4, "tokenString"),
46
    EXPIRED_TIME((short)5, "expiredTime"),
47
    EXPIRED((short)6, "expired");
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: // ID
63
          return ID;
64
        case 2: // USER_ID
65
          return USER_ID;
66
        case 3: // SOURCE
67
          return SOURCE;
68
        case 4: // TOKEN_STRING
69
          return TOKEN_STRING;
70
        case 5: // EXPIRED_TIME
71
          return EXPIRED_TIME;
72
        case 6: // EXPIRED
73
          return EXPIRED;
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 __ID_ISSET_ID = 0;
115
  private static final int __USERID_ISSET_ID = 1;
116
  private static final int __EXPIREDTIME_ISSET_ID = 2;
117
  private static final int __EXPIRED_ISSET_ID = 3;
118
  private BitSet __isset_bit_vector = new BitSet(4);
119
 
120
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
121
  static {
122
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
123
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
124
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
125
    tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
126
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
127
    tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
128
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
129
    tmpMap.put(_Fields.TOKEN_STRING, new org.apache.thrift.meta_data.FieldMetaData("tokenString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
130
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
131
    tmpMap.put(_Fields.EXPIRED_TIME, new org.apache.thrift.meta_data.FieldMetaData("expiredTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
132
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
133
    tmpMap.put(_Fields.EXPIRED, new org.apache.thrift.meta_data.FieldMetaData("expired", org.apache.thrift.TFieldRequirementType.DEFAULT, 
134
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
135
    metaDataMap = Collections.unmodifiableMap(tmpMap);
136
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AccessTokenizer.class, metaDataMap);
137
  }
138
 
139
  public AccessTokenizer() {
140
  }
141
 
142
  public AccessTokenizer(
143
    long id,
144
    long userId,
145
    String source,
146
    String tokenString,
147
    long expiredTime,
148
    boolean expired)
149
  {
150
    this();
151
    this.id = id;
152
    setIdIsSet(true);
153
    this.userId = userId;
154
    setUserIdIsSet(true);
155
    this.source = source;
156
    this.tokenString = tokenString;
157
    this.expiredTime = expiredTime;
158
    setExpiredTimeIsSet(true);
159
    this.expired = expired;
160
    setExpiredIsSet(true);
161
  }
162
 
163
  /**
164
   * Performs a deep copy on <i>other</i>.
165
   */
166
  public AccessTokenizer(AccessTokenizer other) {
167
    __isset_bit_vector.clear();
168
    __isset_bit_vector.or(other.__isset_bit_vector);
169
    this.id = other.id;
170
    this.userId = other.userId;
171
    if (other.isSetSource()) {
172
      this.source = other.source;
173
    }
174
    if (other.isSetTokenString()) {
175
      this.tokenString = other.tokenString;
176
    }
177
    this.expiredTime = other.expiredTime;
178
    this.expired = other.expired;
179
  }
180
 
181
  public AccessTokenizer deepCopy() {
182
    return new AccessTokenizer(this);
183
  }
184
 
185
  @Override
186
  public void clear() {
187
    setIdIsSet(false);
188
    this.id = 0;
189
    setUserIdIsSet(false);
190
    this.userId = 0;
191
    this.source = null;
192
    this.tokenString = null;
193
    setExpiredTimeIsSet(false);
194
    this.expiredTime = 0;
195
    setExpiredIsSet(false);
196
    this.expired = false;
197
  }
198
 
199
  public long getId() {
200
    return this.id;
201
  }
202
 
203
  public void setId(long id) {
204
    this.id = id;
205
    setIdIsSet(true);
206
  }
207
 
208
  public void unsetId() {
209
    __isset_bit_vector.clear(__ID_ISSET_ID);
210
  }
211
 
212
  /** Returns true if field id is set (has been assigned a value) and false otherwise */
213
  public boolean isSetId() {
214
    return __isset_bit_vector.get(__ID_ISSET_ID);
215
  }
216
 
217
  public void setIdIsSet(boolean value) {
218
    __isset_bit_vector.set(__ID_ISSET_ID, value);
219
  }
220
 
221
  public long getUserId() {
222
    return this.userId;
223
  }
224
 
225
  public void setUserId(long userId) {
226
    this.userId = userId;
227
    setUserIdIsSet(true);
228
  }
229
 
230
  public void unsetUserId() {
231
    __isset_bit_vector.clear(__USERID_ISSET_ID);
232
  }
233
 
234
  /** Returns true if field userId is set (has been assigned a value) and false otherwise */
235
  public boolean isSetUserId() {
236
    return __isset_bit_vector.get(__USERID_ISSET_ID);
237
  }
238
 
239
  public void setUserIdIsSet(boolean value) {
240
    __isset_bit_vector.set(__USERID_ISSET_ID, value);
241
  }
242
 
243
  public String getSource() {
244
    return this.source;
245
  }
246
 
247
  public void setSource(String source) {
248
    this.source = source;
249
  }
250
 
251
  public void unsetSource() {
252
    this.source = null;
253
  }
254
 
255
  /** Returns true if field source is set (has been assigned a value) and false otherwise */
256
  public boolean isSetSource() {
257
    return this.source != null;
258
  }
259
 
260
  public void setSourceIsSet(boolean value) {
261
    if (!value) {
262
      this.source = null;
263
    }
264
  }
265
 
266
  public String getTokenString() {
267
    return this.tokenString;
268
  }
269
 
270
  public void setTokenString(String tokenString) {
271
    this.tokenString = tokenString;
272
  }
273
 
274
  public void unsetTokenString() {
275
    this.tokenString = null;
276
  }
277
 
278
  /** Returns true if field tokenString is set (has been assigned a value) and false otherwise */
279
  public boolean isSetTokenString() {
280
    return this.tokenString != null;
281
  }
282
 
283
  public void setTokenStringIsSet(boolean value) {
284
    if (!value) {
285
      this.tokenString = null;
286
    }
287
  }
288
 
289
  public long getExpiredTime() {
290
    return this.expiredTime;
291
  }
292
 
293
  public void setExpiredTime(long expiredTime) {
294
    this.expiredTime = expiredTime;
295
    setExpiredTimeIsSet(true);
296
  }
297
 
298
  public void unsetExpiredTime() {
299
    __isset_bit_vector.clear(__EXPIREDTIME_ISSET_ID);
300
  }
301
 
302
  /** Returns true if field expiredTime is set (has been assigned a value) and false otherwise */
303
  public boolean isSetExpiredTime() {
304
    return __isset_bit_vector.get(__EXPIREDTIME_ISSET_ID);
305
  }
306
 
307
  public void setExpiredTimeIsSet(boolean value) {
308
    __isset_bit_vector.set(__EXPIREDTIME_ISSET_ID, value);
309
  }
310
 
311
  public boolean isExpired() {
312
    return this.expired;
313
  }
314
 
315
  public void setExpired(boolean expired) {
316
    this.expired = expired;
317
    setExpiredIsSet(true);
318
  }
319
 
320
  public void unsetExpired() {
321
    __isset_bit_vector.clear(__EXPIRED_ISSET_ID);
322
  }
323
 
324
  /** Returns true if field expired is set (has been assigned a value) and false otherwise */
325
  public boolean isSetExpired() {
326
    return __isset_bit_vector.get(__EXPIRED_ISSET_ID);
327
  }
328
 
329
  public void setExpiredIsSet(boolean value) {
330
    __isset_bit_vector.set(__EXPIRED_ISSET_ID, value);
331
  }
332
 
333
  public void setFieldValue(_Fields field, Object value) {
334
    switch (field) {
335
    case ID:
336
      if (value == null) {
337
        unsetId();
338
      } else {
339
        setId((Long)value);
340
      }
341
      break;
342
 
343
    case USER_ID:
344
      if (value == null) {
345
        unsetUserId();
346
      } else {
347
        setUserId((Long)value);
348
      }
349
      break;
350
 
351
    case SOURCE:
352
      if (value == null) {
353
        unsetSource();
354
      } else {
355
        setSource((String)value);
356
      }
357
      break;
358
 
359
    case TOKEN_STRING:
360
      if (value == null) {
361
        unsetTokenString();
362
      } else {
363
        setTokenString((String)value);
364
      }
365
      break;
366
 
367
    case EXPIRED_TIME:
368
      if (value == null) {
369
        unsetExpiredTime();
370
      } else {
371
        setExpiredTime((Long)value);
372
      }
373
      break;
374
 
375
    case EXPIRED:
376
      if (value == null) {
377
        unsetExpired();
378
      } else {
379
        setExpired((Boolean)value);
380
      }
381
      break;
382
 
383
    }
384
  }
385
 
386
  public Object getFieldValue(_Fields field) {
387
    switch (field) {
388
    case ID:
389
      return Long.valueOf(getId());
390
 
391
    case USER_ID:
392
      return Long.valueOf(getUserId());
393
 
394
    case SOURCE:
395
      return getSource();
396
 
397
    case TOKEN_STRING:
398
      return getTokenString();
399
 
400
    case EXPIRED_TIME:
401
      return Long.valueOf(getExpiredTime());
402
 
403
    case EXPIRED:
404
      return Boolean.valueOf(isExpired());
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 ID:
418
      return isSetId();
419
    case USER_ID:
420
      return isSetUserId();
421
    case SOURCE:
422
      return isSetSource();
423
    case TOKEN_STRING:
424
      return isSetTokenString();
425
    case EXPIRED_TIME:
426
      return isSetExpiredTime();
427
    case EXPIRED:
428
      return isSetExpired();
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 AccessTokenizer)
438
      return this.equals((AccessTokenizer)that);
439
    return false;
440
  }
441
 
442
  public boolean equals(AccessTokenizer that) {
443
    if (that == null)
444
      return false;
445
 
446
    boolean this_present_id = true;
447
    boolean that_present_id = true;
448
    if (this_present_id || that_present_id) {
449
      if (!(this_present_id && that_present_id))
450
        return false;
451
      if (this.id != that.id)
452
        return false;
453
    }
454
 
455
    boolean this_present_userId = true;
456
    boolean that_present_userId = true;
457
    if (this_present_userId || that_present_userId) {
458
      if (!(this_present_userId && that_present_userId))
459
        return false;
460
      if (this.userId != that.userId)
461
        return false;
462
    }
463
 
464
    boolean this_present_source = true && this.isSetSource();
465
    boolean that_present_source = true && that.isSetSource();
466
    if (this_present_source || that_present_source) {
467
      if (!(this_present_source && that_present_source))
468
        return false;
469
      if (!this.source.equals(that.source))
470
        return false;
471
    }
472
 
473
    boolean this_present_tokenString = true && this.isSetTokenString();
474
    boolean that_present_tokenString = true && that.isSetTokenString();
475
    if (this_present_tokenString || that_present_tokenString) {
476
      if (!(this_present_tokenString && that_present_tokenString))
477
        return false;
478
      if (!this.tokenString.equals(that.tokenString))
479
        return false;
480
    }
481
 
482
    boolean this_present_expiredTime = true;
483
    boolean that_present_expiredTime = true;
484
    if (this_present_expiredTime || that_present_expiredTime) {
485
      if (!(this_present_expiredTime && that_present_expiredTime))
486
        return false;
487
      if (this.expiredTime != that.expiredTime)
488
        return false;
489
    }
490
 
491
    boolean this_present_expired = true;
492
    boolean that_present_expired = true;
493
    if (this_present_expired || that_present_expired) {
494
      if (!(this_present_expired && that_present_expired))
495
        return false;
496
      if (this.expired != that.expired)
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(AccessTokenizer other) {
509
    if (!getClass().equals(other.getClass())) {
510
      return getClass().getName().compareTo(other.getClass().getName());
511
    }
512
 
513
    int lastComparison = 0;
514
    AccessTokenizer typedOther = (AccessTokenizer)other;
515
 
516
    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
517
    if (lastComparison != 0) {
518
      return lastComparison;
519
    }
520
    if (isSetId()) {
521
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
522
      if (lastComparison != 0) {
523
        return lastComparison;
524
      }
525
    }
526
    lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
527
    if (lastComparison != 0) {
528
      return lastComparison;
529
    }
530
    if (isSetUserId()) {
531
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
532
      if (lastComparison != 0) {
533
        return lastComparison;
534
      }
535
    }
536
    lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
537
    if (lastComparison != 0) {
538
      return lastComparison;
539
    }
540
    if (isSetSource()) {
541
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
542
      if (lastComparison != 0) {
543
        return lastComparison;
544
      }
545
    }
546
    lastComparison = Boolean.valueOf(isSetTokenString()).compareTo(typedOther.isSetTokenString());
547
    if (lastComparison != 0) {
548
      return lastComparison;
549
    }
550
    if (isSetTokenString()) {
551
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tokenString, typedOther.tokenString);
552
      if (lastComparison != 0) {
553
        return lastComparison;
554
      }
555
    }
556
    lastComparison = Boolean.valueOf(isSetExpiredTime()).compareTo(typedOther.isSetExpiredTime());
557
    if (lastComparison != 0) {
558
      return lastComparison;
559
    }
560
    if (isSetExpiredTime()) {
561
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expiredTime, typedOther.expiredTime);
562
      if (lastComparison != 0) {
563
        return lastComparison;
564
      }
565
    }
566
    lastComparison = Boolean.valueOf(isSetExpired()).compareTo(typedOther.isSetExpired());
567
    if (lastComparison != 0) {
568
      return lastComparison;
569
    }
570
    if (isSetExpired()) {
571
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expired, typedOther.expired);
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: // ID
594
          if (field.type == org.apache.thrift.protocol.TType.I64) {
595
            this.id = iprot.readI64();
596
            setIdIsSet(true);
597
          } else { 
598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
599
          }
600
          break;
601
        case 2: // USER_ID
602
          if (field.type == org.apache.thrift.protocol.TType.I64) {
603
            this.userId = iprot.readI64();
604
            setUserIdIsSet(true);
605
          } else { 
606
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
607
          }
608
          break;
609
        case 3: // SOURCE
610
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
611
            this.source = iprot.readString();
612
          } else { 
613
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
614
          }
615
          break;
616
        case 4: // TOKEN_STRING
617
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
618
            this.tokenString = iprot.readString();
619
          } else { 
620
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
621
          }
622
          break;
623
        case 5: // EXPIRED_TIME
624
          if (field.type == org.apache.thrift.protocol.TType.I64) {
625
            this.expiredTime = iprot.readI64();
626
            setExpiredTimeIsSet(true);
627
          } else { 
628
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
629
          }
630
          break;
631
        case 6: // EXPIRED
632
          if (field.type == org.apache.thrift.protocol.TType.BOOL) {
633
            this.expired = iprot.readBool();
634
            setExpiredIsSet(true);
635
          } else { 
636
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
637
          }
638
          break;
639
        default:
640
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
641
      }
642
      iprot.readFieldEnd();
643
    }
644
    iprot.readStructEnd();
645
    validate();
646
  }
647
 
648
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
649
    validate();
650
 
651
    oprot.writeStructBegin(STRUCT_DESC);
652
    oprot.writeFieldBegin(ID_FIELD_DESC);
653
    oprot.writeI64(this.id);
654
    oprot.writeFieldEnd();
655
    oprot.writeFieldBegin(USER_ID_FIELD_DESC);
656
    oprot.writeI64(this.userId);
657
    oprot.writeFieldEnd();
658
    if (this.source != null) {
659
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
660
      oprot.writeString(this.source);
661
      oprot.writeFieldEnd();
662
    }
663
    if (this.tokenString != null) {
664
      oprot.writeFieldBegin(TOKEN_STRING_FIELD_DESC);
665
      oprot.writeString(this.tokenString);
666
      oprot.writeFieldEnd();
667
    }
668
    oprot.writeFieldBegin(EXPIRED_TIME_FIELD_DESC);
669
    oprot.writeI64(this.expiredTime);
670
    oprot.writeFieldEnd();
671
    oprot.writeFieldBegin(EXPIRED_FIELD_DESC);
672
    oprot.writeBool(this.expired);
673
    oprot.writeFieldEnd();
674
    oprot.writeFieldStop();
675
    oprot.writeStructEnd();
676
  }
677
 
678
  @Override
679
  public String toString() {
680
    StringBuilder sb = new StringBuilder("AccessTokenizer(");
681
    boolean first = true;
682
 
683
    sb.append("id:");
684
    sb.append(this.id);
685
    first = false;
686
    if (!first) sb.append(", ");
687
    sb.append("userId:");
688
    sb.append(this.userId);
689
    first = false;
690
    if (!first) sb.append(", ");
691
    sb.append("source:");
692
    if (this.source == null) {
693
      sb.append("null");
694
    } else {
695
      sb.append(this.source);
696
    }
697
    first = false;
698
    if (!first) sb.append(", ");
699
    sb.append("tokenString:");
700
    if (this.tokenString == null) {
701
      sb.append("null");
702
    } else {
703
      sb.append(this.tokenString);
704
    }
705
    first = false;
706
    if (!first) sb.append(", ");
707
    sb.append("expiredTime:");
708
    sb.append(this.expiredTime);
709
    first = false;
710
    if (!first) sb.append(", ");
711
    sb.append("expired:");
712
    sb.append(this.expired);
713
    first = false;
714
    sb.append(")");
715
    return sb.toString();
716
  }
717
 
718
  public void validate() throws org.apache.thrift.TException {
719
    // check for required fields
720
  }
721
 
722
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
723
    try {
724
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
725
    } catch (org.apache.thrift.TException te) {
726
      throw new java.io.IOException(te);
727
    }
728
  }
729
 
730
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
731
    try {
732
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
733
      __isset_bit_vector = new BitSet(1);
734
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
735
    } catch (org.apache.thrift.TException te) {
736
      throw new java.io.IOException(te);
737
    }
738
  }
739
 
740
}
741