Subversion Repositories SmartDukaan

Rev

Rev 2779 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2779 Rev 3430
Line 1... Line 1...
1
/**
1
/**
2
 * Autogenerated by Thrift
2
 * Autogenerated by Thrift Compiler (0.7.0)
3
 *
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
5
 */
6
package in.shop2020.utils;
6
package in.shop2020.utils;
7
 
7
 
Line 13... Line 13...
13
import java.util.Set;
13
import java.util.Set;
14
import java.util.HashSet;
14
import java.util.HashSet;
15
import java.util.EnumSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
16
import java.util.Collections;
17
import java.util.BitSet;
17
import java.util.BitSet;
-
 
18
import java.nio.ByteBuffer;
18
import java.util.Arrays;
19
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
import org.slf4j.LoggerFactory;
21
 
22
 
22
import org.apache.thrift.*;
-
 
23
import org.apache.thrift.meta_data.*;
-
 
24
import org.apache.thrift.protocol.*;
-
 
25
 
-
 
26
public class DashboardUser implements TBase<DashboardUser._Fields>, java.io.Serializable, Cloneable, Comparable<DashboardUser> {
23
public class DashboardUser implements org.apache.thrift.TBase<DashboardUser, DashboardUser._Fields>, java.io.Serializable, Cloneable {
27
  private static final TStruct STRUCT_DESC = new TStruct("DashboardUser");
24
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DashboardUser");
28
 
25
 
29
  private static final TField USERNAME_FIELD_DESC = new TField("username", TType.STRING, (short)1);
26
  private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)1);
30
  private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
27
  private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
31
  private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)3);
28
  private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
32
  private static final TField ROLE_FIELD_DESC = new TField("role", TType.I32, (short)4);
29
  private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.I32, (short)4);
33
 
30
 
34
  private String username;
31
  private String username; // required
35
  private String password;
32
  private String password; // required
36
  private long warehouseId;
33
  private long warehouseId; // required
37
  private Role role;
34
  private Role role; // required
38
 
35
 
39
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
36
  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
40
  public enum _Fields implements TFieldIdEnum {
37
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
41
    USERNAME((short)1, "username"),
38
    USERNAME((short)1, "username"),
42
    PASSWORD((short)2, "password"),
39
    PASSWORD((short)2, "password"),
43
    WAREHOUSE_ID((short)3, "warehouseId"),
40
    WAREHOUSE_ID((short)3, "warehouseId"),
44
    /**
41
    /**
45
     * 
42
     * 
46
     * @see Role
43
     * @see Role
47
     */
44
     */
48
    ROLE((short)4, "role");
45
    ROLE((short)4, "role");
49
 
46
 
50
    private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
51
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
47
    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
52
 
48
 
53
    static {
49
    static {
54
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
50
      for (_Fields field : EnumSet.allOf(_Fields.class)) {
55
        byId.put((int)field._thriftId, field);
-
 
56
        byName.put(field.getFieldName(), field);
51
        byName.put(field.getFieldName(), field);
57
      }
52
      }
58
    }
53
    }
59
 
54
 
60
    /**
55
    /**
61
     * Find the _Fields constant that matches fieldId, or null if its not found.
56
     * Find the _Fields constant that matches fieldId, or null if its not found.
62
     */
57
     */
63
    public static _Fields findByThriftId(int fieldId) {
58
    public static _Fields findByThriftId(int fieldId) {
64
      return byId.get(fieldId);
59
      switch(fieldId) {
-
 
60
        case 1: // USERNAME
-
 
61
          return USERNAME;
-
 
62
        case 2: // PASSWORD
-
 
63
          return PASSWORD;
-
 
64
        case 3: // WAREHOUSE_ID
-
 
65
          return WAREHOUSE_ID;
-
 
66
        case 4: // ROLE
-
 
67
          return ROLE;
-
 
68
        default:
-
 
69
          return null;
-
 
70
      }
65
    }
71
    }
66
 
72
 
67
    /**
73
    /**
68
     * Find the _Fields constant that matches fieldId, throwing an exception
74
     * Find the _Fields constant that matches fieldId, throwing an exception
69
     * if it is not found.
75
     * if it is not found.
Line 100... Line 106...
100
 
106
 
101
  // isset id assignments
107
  // isset id assignments
102
  private static final int __WAREHOUSEID_ISSET_ID = 0;
108
  private static final int __WAREHOUSEID_ISSET_ID = 0;
103
  private BitSet __isset_bit_vector = new BitSet(1);
109
  private BitSet __isset_bit_vector = new BitSet(1);
104
 
110
 
105
  public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
111
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
106
    put(_Fields.USERNAME, new FieldMetaData("username", TFieldRequirementType.DEFAULT, 
-
 
107
        new FieldValueMetaData(TType.STRING)));
-
 
108
    put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
-
 
109
        new FieldValueMetaData(TType.STRING)));
-
 
110
    put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
-
 
111
        new FieldValueMetaData(TType.I64)));
-
 
112
    put(_Fields.ROLE, new FieldMetaData("role", TFieldRequirementType.DEFAULT, 
-
 
113
        new EnumMetaData(TType.ENUM, Role.class)));
-
 
114
  }});
-
 
115
 
-
 
116
  static {
112
  static {
-
 
113
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
114
    tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
115
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
116
    tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
117
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
118
    tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
119
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
120
    tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
121
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Role.class)));
-
 
122
    metaDataMap = Collections.unmodifiableMap(tmpMap);
117
    FieldMetaData.addStructMetaDataMap(DashboardUser.class, metaDataMap);
123
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DashboardUser.class, metaDataMap);
118
  }
124
  }
119
 
125
 
120
  public DashboardUser() {
126
  public DashboardUser() {
121
  }
127
  }
122
 
128
 
Line 154... Line 160...
154
 
160
 
155
  public DashboardUser deepCopy() {
161
  public DashboardUser deepCopy() {
156
    return new DashboardUser(this);
162
    return new DashboardUser(this);
157
  }
163
  }
158
 
164
 
159
  @Deprecated
165
  @Override
160
  public DashboardUser clone() {
166
  public void clear() {
-
 
167
    this.username = null;
-
 
168
    this.password = null;
161
    return new DashboardUser(this);
169
    setWarehouseIdIsSet(false);
-
 
170
    this.warehouseId = 0;
-
 
171
    this.role = null;
162
  }
172
  }
163
 
173
 
164
  public String getUsername() {
174
  public String getUsername() {
165
    return this.username;
175
    return this.username;
166
  }
176
  }
167
 
177
 
168
  public DashboardUser setUsername(String username) {
178
  public void setUsername(String username) {
169
    this.username = username;
179
    this.username = username;
170
    return this;
-
 
171
  }
180
  }
172
 
181
 
173
  public void unsetUsername() {
182
  public void unsetUsername() {
174
    this.username = null;
183
    this.username = null;
175
  }
184
  }
176
 
185
 
177
  /** Returns true if field username is set (has been asigned a value) and false otherwise */
186
  /** Returns true if field username is set (has been assigned a value) and false otherwise */
178
  public boolean isSetUsername() {
187
  public boolean isSetUsername() {
179
    return this.username != null;
188
    return this.username != null;
180
  }
189
  }
181
 
190
 
182
  public void setUsernameIsSet(boolean value) {
191
  public void setUsernameIsSet(boolean value) {
Line 187... Line 196...
187
 
196
 
188
  public String getPassword() {
197
  public String getPassword() {
189
    return this.password;
198
    return this.password;
190
  }
199
  }
191
 
200
 
192
  public DashboardUser setPassword(String password) {
201
  public void setPassword(String password) {
193
    this.password = password;
202
    this.password = password;
194
    return this;
-
 
195
  }
203
  }
196
 
204
 
197
  public void unsetPassword() {
205
  public void unsetPassword() {
198
    this.password = null;
206
    this.password = null;
199
  }
207
  }
200
 
208
 
201
  /** Returns true if field password is set (has been asigned a value) and false otherwise */
209
  /** Returns true if field password is set (has been assigned a value) and false otherwise */
202
  public boolean isSetPassword() {
210
  public boolean isSetPassword() {
203
    return this.password != null;
211
    return this.password != null;
204
  }
212
  }
205
 
213
 
206
  public void setPasswordIsSet(boolean value) {
214
  public void setPasswordIsSet(boolean value) {
Line 211... Line 219...
211
 
219
 
212
  public long getWarehouseId() {
220
  public long getWarehouseId() {
213
    return this.warehouseId;
221
    return this.warehouseId;
214
  }
222
  }
215
 
223
 
216
  public DashboardUser setWarehouseId(long warehouseId) {
224
  public void setWarehouseId(long warehouseId) {
217
    this.warehouseId = warehouseId;
225
    this.warehouseId = warehouseId;
218
    setWarehouseIdIsSet(true);
226
    setWarehouseIdIsSet(true);
219
    return this;
-
 
220
  }
227
  }
221
 
228
 
222
  public void unsetWarehouseId() {
229
  public void unsetWarehouseId() {
223
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
230
    __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
224
  }
231
  }
225
 
232
 
226
  /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
233
  /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
227
  public boolean isSetWarehouseId() {
234
  public boolean isSetWarehouseId() {
228
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
235
    return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
229
  }
236
  }
230
 
237
 
231
  public void setWarehouseIdIsSet(boolean value) {
238
  public void setWarehouseIdIsSet(boolean value) {
Line 242... Line 249...
242
 
249
 
243
  /**
250
  /**
244
   * 
251
   * 
245
   * @see Role
252
   * @see Role
246
   */
253
   */
247
  public DashboardUser setRole(Role role) {
254
  public void setRole(Role role) {
248
    this.role = role;
255
    this.role = role;
249
    return this;
-
 
250
  }
256
  }
251
 
257
 
252
  public void unsetRole() {
258
  public void unsetRole() {
253
    this.role = null;
259
    this.role = null;
254
  }
260
  }
255
 
261
 
256
  /** Returns true if field role is set (has been asigned a value) and false otherwise */
262
  /** Returns true if field role is set (has been assigned a value) and false otherwise */
257
  public boolean isSetRole() {
263
  public boolean isSetRole() {
258
    return this.role != null;
264
    return this.role != null;
259
  }
265
  }
260
 
266
 
261
  public void setRoleIsSet(boolean value) {
267
  public void setRoleIsSet(boolean value) {
Line 299... Line 305...
299
      break;
305
      break;
300
 
306
 
301
    }
307
    }
302
  }
308
  }
303
 
309
 
304
  public void setFieldValue(int fieldID, Object value) {
-
 
305
    setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
306
  }
-
 
307
 
-
 
308
  public Object getFieldValue(_Fields field) {
310
  public Object getFieldValue(_Fields field) {
309
    switch (field) {
311
    switch (field) {
310
    case USERNAME:
312
    case USERNAME:
311
      return getUsername();
313
      return getUsername();
312
 
314
 
313
    case PASSWORD:
315
    case PASSWORD:
314
      return getPassword();
316
      return getPassword();
315
 
317
 
316
    case WAREHOUSE_ID:
318
    case WAREHOUSE_ID:
317
      return new Long(getWarehouseId());
319
      return Long.valueOf(getWarehouseId());
318
 
320
 
319
    case ROLE:
321
    case ROLE:
320
      return getRole();
322
      return getRole();
321
 
323
 
322
    }
324
    }
323
    throw new IllegalStateException();
325
    throw new IllegalStateException();
324
  }
326
  }
325
 
327
 
326
  public Object getFieldValue(int fieldId) {
-
 
327
    return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
328
  }
-
 
329
 
-
 
330
  /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
328
  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
331
  public boolean isSet(_Fields field) {
329
  public boolean isSet(_Fields field) {
-
 
330
    if (field == null) {
-
 
331
      throw new IllegalArgumentException();
-
 
332
    }
-
 
333
 
332
    switch (field) {
334
    switch (field) {
333
    case USERNAME:
335
    case USERNAME:
334
      return isSetUsername();
336
      return isSetUsername();
335
    case PASSWORD:
337
    case PASSWORD:
336
      return isSetPassword();
338
      return isSetPassword();
Line 340... Line 342...
340
      return isSetRole();
342
      return isSetRole();
341
    }
343
    }
342
    throw new IllegalStateException();
344
    throw new IllegalStateException();
343
  }
345
  }
344
 
346
 
345
  public boolean isSet(int fieldID) {
-
 
346
    return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
347
  }
-
 
348
 
-
 
349
  @Override
347
  @Override
350
  public boolean equals(Object that) {
348
  public boolean equals(Object that) {
351
    if (that == null)
349
    if (that == null)
352
      return false;
350
      return false;
353
    if (that instanceof DashboardUser)
351
    if (that instanceof DashboardUser)
Line 409... Line 407...
409
    }
407
    }
410
 
408
 
411
    int lastComparison = 0;
409
    int lastComparison = 0;
412
    DashboardUser typedOther = (DashboardUser)other;
410
    DashboardUser typedOther = (DashboardUser)other;
413
 
411
 
414
    lastComparison = Boolean.valueOf(isSetUsername()).compareTo(isSetUsername());
412
    lastComparison = Boolean.valueOf(isSetUsername()).compareTo(typedOther.isSetUsername());
415
    if (lastComparison != 0) {
413
    if (lastComparison != 0) {
416
      return lastComparison;
414
      return lastComparison;
417
    }
415
    }
-
 
416
    if (isSetUsername()) {
418
    lastComparison = TBaseHelper.compareTo(username, typedOther.username);
417
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, typedOther.username);
419
    if (lastComparison != 0) {
418
      if (lastComparison != 0) {
420
      return lastComparison;
419
        return lastComparison;
-
 
420
      }
421
    }
421
    }
422
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
422
    lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
423
    if (lastComparison != 0) {
423
    if (lastComparison != 0) {
424
      return lastComparison;
424
      return lastComparison;
425
    }
425
    }
-
 
426
    if (isSetPassword()) {
426
    lastComparison = TBaseHelper.compareTo(password, typedOther.password);
427
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
427
    if (lastComparison != 0) {
428
      if (lastComparison != 0) {
428
      return lastComparison;
429
        return lastComparison;
-
 
430
      }
429
    }
431
    }
430
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
432
    lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
431
    if (lastComparison != 0) {
433
    if (lastComparison != 0) {
432
      return lastComparison;
434
      return lastComparison;
433
    }
435
    }
-
 
436
    if (isSetWarehouseId()) {
434
    lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
437
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
435
    if (lastComparison != 0) {
438
      if (lastComparison != 0) {
436
      return lastComparison;
439
        return lastComparison;
-
 
440
      }
437
    }
441
    }
438
    lastComparison = Boolean.valueOf(isSetRole()).compareTo(isSetRole());
442
    lastComparison = Boolean.valueOf(isSetRole()).compareTo(typedOther.isSetRole());
439
    if (lastComparison != 0) {
443
    if (lastComparison != 0) {
440
      return lastComparison;
444
      return lastComparison;
441
    }
445
    }
-
 
446
    if (isSetRole()) {
442
    lastComparison = TBaseHelper.compareTo(role, typedOther.role);
447
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, typedOther.role);
443
    if (lastComparison != 0) {
448
      if (lastComparison != 0) {
444
      return lastComparison;
449
        return lastComparison;
-
 
450
      }
445
    }
451
    }
446
    return 0;
452
    return 0;
447
  }
453
  }
448
 
454
 
-
 
455
  public _Fields fieldForId(int fieldId) {
-
 
456
    return _Fields.findByThriftId(fieldId);
-
 
457
  }
-
 
458
 
449
  public void read(TProtocol iprot) throws TException {
459
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
450
    TField field;
460
    org.apache.thrift.protocol.TField field;
451
    iprot.readStructBegin();
461
    iprot.readStructBegin();
452
    while (true)
462
    while (true)
453
    {
463
    {
454
      field = iprot.readFieldBegin();
464
      field = iprot.readFieldBegin();
455
      if (field.type == TType.STOP) { 
465
      if (field.type == org.apache.thrift.protocol.TType.STOP) { 
456
        break;
466
        break;
457
      }
467
      }
458
      _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
459
      if (fieldId == null) {
-
 
460
        TProtocolUtil.skip(iprot, field.type);
-
 
461
      } else {
-
 
462
        switch (fieldId) {
468
      switch (field.id) {
463
          case USERNAME:
469
        case 1: // USERNAME
464
            if (field.type == TType.STRING) {
470
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
465
              this.username = iprot.readString();
471
            this.username = iprot.readString();
466
            } else { 
472
          } else { 
467
              TProtocolUtil.skip(iprot, field.type);
473
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
468
            }
474
          }
469
            break;
475
          break;
470
          case PASSWORD:
476
        case 2: // PASSWORD
471
            if (field.type == TType.STRING) {
477
          if (field.type == org.apache.thrift.protocol.TType.STRING) {
472
              this.password = iprot.readString();
478
            this.password = iprot.readString();
473
            } else { 
479
          } else { 
474
              TProtocolUtil.skip(iprot, field.type);
480
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
475
            }
481
          }
476
            break;
482
          break;
477
          case WAREHOUSE_ID:
483
        case 3: // WAREHOUSE_ID
478
            if (field.type == TType.I64) {
484
          if (field.type == org.apache.thrift.protocol.TType.I64) {
479
              this.warehouseId = iprot.readI64();
485
            this.warehouseId = iprot.readI64();
480
              setWarehouseIdIsSet(true);
486
            setWarehouseIdIsSet(true);
481
            } else { 
487
          } else { 
482
              TProtocolUtil.skip(iprot, field.type);
488
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
483
            }
489
          }
484
            break;
490
          break;
485
          case ROLE:
491
        case 4: // ROLE
486
            if (field.type == TType.I32) {
492
          if (field.type == org.apache.thrift.protocol.TType.I32) {
487
              this.role = Role.findByValue(iprot.readI32());
493
            this.role = Role.findByValue(iprot.readI32());
488
            } else { 
494
          } else { 
489
              TProtocolUtil.skip(iprot, field.type);
495
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
490
            }
496
          }
491
            break;
497
          break;
492
        }
498
        default:
493
        iprot.readFieldEnd();
499
          org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
494
      }
500
      }
-
 
501
      iprot.readFieldEnd();
495
    }
502
    }
496
    iprot.readStructEnd();
503
    iprot.readStructEnd();
497
    validate();
504
    validate();
498
  }
505
  }
499
 
506
 
500
  public void write(TProtocol oprot) throws TException {
507
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
501
    validate();
508
    validate();
502
 
509
 
503
    oprot.writeStructBegin(STRUCT_DESC);
510
    oprot.writeStructBegin(STRUCT_DESC);
504
    if (this.username != null) {
511
    if (this.username != null) {
505
      oprot.writeFieldBegin(USERNAME_FIELD_DESC);
512
      oprot.writeFieldBegin(USERNAME_FIELD_DESC);
Line 550... Line 557...
550
    if (!first) sb.append(", ");
557
    if (!first) sb.append(", ");
551
    sb.append("role:");
558
    sb.append("role:");
552
    if (this.role == null) {
559
    if (this.role == null) {
553
      sb.append("null");
560
      sb.append("null");
554
    } else {
561
    } else {
555
      String role_name = role.name();
-
 
556
      if (role_name != null) {
-
 
557
        sb.append(role_name);
-
 
558
        sb.append(" (");
-
 
559
      }
-
 
560
      sb.append(this.role);
562
      sb.append(this.role);
561
      if (role_name != null) {
-
 
562
        sb.append(")");
-
 
563
      }
-
 
564
    }
563
    }
565
    first = false;
564
    first = false;
566
    sb.append(")");
565
    sb.append(")");
567
    return sb.toString();
566
    return sb.toString();
568
  }
567
  }
569
 
568
 
570
  public void validate() throws TException {
569
  public void validate() throws org.apache.thrift.TException {
571
    // check for required fields
570
    // check for required fields
572
  }
571
  }
573
 
572
 
-
 
573
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
574
    try {
-
 
575
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
576
    } catch (org.apache.thrift.TException te) {
-
 
577
      throw new java.io.IOException(te);
-
 
578
    }
-
 
579
  }
-
 
580
 
-
 
581
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
582
    try {
-
 
583
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
584
      __isset_bit_vector = new BitSet(1);
-
 
585
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
586
    } catch (org.apache.thrift.TException te) {
-
 
587
      throw new java.io.IOException(te);
-
 
588
    }
-
 
589
  }
-
 
590
 
574
}
591
}
575
 
592