| /** |
| * Autogenerated by Thrift Compiler (0.10.0) |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| * @generated |
| */ |
| package org.apache.airavata.allocation.manager.models; |
| |
| @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) |
| /** |
| * <p>A user should have an account with airavata to request an allocation</p> |
| * <li>username : Login Username</li> |
| * <li>email :Login email</li> |
| * <li>fullName: Full name of the user</li> |
| * <li>Password: Password of the user</li> |
| * <li>userType: Type of the user</li> |
| * |
| */ |
| @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)") |
| public class UserDetail implements org.apache.thrift.TBase<UserDetail, UserDetail._Fields>, java.io.Serializable, Cloneable, Comparable<UserDetail> { |
| private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserDetail"); |
| |
| 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); |
| private static final org.apache.thrift.protocol.TField EMAIL_FIELD_DESC = new org.apache.thrift.protocol.TField("email", org.apache.thrift.protocol.TType.STRING, (short)2); |
| private static final org.apache.thrift.protocol.TField FULL_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("fullName", org.apache.thrift.protocol.TType.STRING, (short)3); |
| 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)4); |
| private static final org.apache.thrift.protocol.TField USER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("userType", org.apache.thrift.protocol.TType.STRING, (short)5); |
| |
| private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UserDetailStandardSchemeFactory(); |
| private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UserDetailTupleSchemeFactory(); |
| |
| public java.lang.String username; // optional |
| public java.lang.String email; // optional |
| public java.lang.String fullName; // optional |
| public java.lang.String password; // optional |
| public java.lang.String userType; // optional |
| |
| /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ |
| public enum _Fields implements org.apache.thrift.TFieldIdEnum { |
| USERNAME((short)1, "username"), |
| EMAIL((short)2, "email"), |
| FULL_NAME((short)3, "fullName"), |
| PASSWORD((short)4, "password"), |
| USER_TYPE((short)5, "userType"); |
| |
| private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>(); |
| |
| static { |
| for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { |
| byName.put(field.getFieldName(), field); |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, or null if its not found. |
| */ |
| public static _Fields findByThriftId(int fieldId) { |
| switch(fieldId) { |
| case 1: // USERNAME |
| return USERNAME; |
| case 2: // EMAIL |
| return EMAIL; |
| case 3: // FULL_NAME |
| return FULL_NAME; |
| case 4: // PASSWORD |
| return PASSWORD; |
| case 5: // USER_TYPE |
| return USER_TYPE; |
| default: |
| return null; |
| } |
| } |
| |
| /** |
| * Find the _Fields constant that matches fieldId, throwing an exception |
| * if it is not found. |
| */ |
| public static _Fields findByThriftIdOrThrow(int fieldId) { |
| _Fields fields = findByThriftId(fieldId); |
| if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); |
| return fields; |
| } |
| |
| /** |
| * Find the _Fields constant that matches name, or null if its not found. |
| */ |
| public static _Fields findByName(java.lang.String name) { |
| return byName.get(name); |
| } |
| |
| private final short _thriftId; |
| private final java.lang.String _fieldName; |
| |
| _Fields(short thriftId, java.lang.String fieldName) { |
| _thriftId = thriftId; |
| _fieldName = fieldName; |
| } |
| |
| public short getThriftFieldId() { |
| return _thriftId; |
| } |
| |
| public java.lang.String getFieldName() { |
| return _fieldName; |
| } |
| } |
| |
| // isset id assignments |
| private static final _Fields optionals[] = {_Fields.USERNAME,_Fields.EMAIL,_Fields.FULL_NAME,_Fields.PASSWORD,_Fields.USER_TYPE}; |
| public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; |
| static { |
| java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); |
| tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.EMAIL, new org.apache.thrift.meta_data.FieldMetaData("email", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.FULL_NAME, new org.apache.thrift.meta_data.FieldMetaData("fullName", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| tmpMap.put(_Fields.USER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("userType", org.apache.thrift.TFieldRequirementType.OPTIONAL, |
| new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); |
| metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); |
| org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserDetail.class, metaDataMap); |
| } |
| |
| public UserDetail() { |
| } |
| |
| /** |
| * Performs a deep copy on <i>other</i>. |
| */ |
| public UserDetail(UserDetail other) { |
| if (other.isSetUsername()) { |
| this.username = other.username; |
| } |
| if (other.isSetEmail()) { |
| this.email = other.email; |
| } |
| if (other.isSetFullName()) { |
| this.fullName = other.fullName; |
| } |
| if (other.isSetPassword()) { |
| this.password = other.password; |
| } |
| if (other.isSetUserType()) { |
| this.userType = other.userType; |
| } |
| } |
| |
| public UserDetail deepCopy() { |
| return new UserDetail(this); |
| } |
| |
| @Override |
| public void clear() { |
| this.username = null; |
| this.email = null; |
| this.fullName = null; |
| this.password = null; |
| this.userType = null; |
| } |
| |
| public java.lang.String getUsername() { |
| return this.username; |
| } |
| |
| public UserDetail setUsername(java.lang.String username) { |
| this.username = username; |
| return this; |
| } |
| |
| public void unsetUsername() { |
| this.username = null; |
| } |
| |
| /** Returns true if field username is set (has been assigned a value) and false otherwise */ |
| public boolean isSetUsername() { |
| return this.username != null; |
| } |
| |
| public void setUsernameIsSet(boolean value) { |
| if (!value) { |
| this.username = null; |
| } |
| } |
| |
| public java.lang.String getEmail() { |
| return this.email; |
| } |
| |
| public UserDetail setEmail(java.lang.String email) { |
| this.email = email; |
| return this; |
| } |
| |
| public void unsetEmail() { |
| this.email = null; |
| } |
| |
| /** Returns true if field email is set (has been assigned a value) and false otherwise */ |
| public boolean isSetEmail() { |
| return this.email != null; |
| } |
| |
| public void setEmailIsSet(boolean value) { |
| if (!value) { |
| this.email = null; |
| } |
| } |
| |
| public java.lang.String getFullName() { |
| return this.fullName; |
| } |
| |
| public UserDetail setFullName(java.lang.String fullName) { |
| this.fullName = fullName; |
| return this; |
| } |
| |
| public void unsetFullName() { |
| this.fullName = null; |
| } |
| |
| /** Returns true if field fullName is set (has been assigned a value) and false otherwise */ |
| public boolean isSetFullName() { |
| return this.fullName != null; |
| } |
| |
| public void setFullNameIsSet(boolean value) { |
| if (!value) { |
| this.fullName = null; |
| } |
| } |
| |
| public java.lang.String getPassword() { |
| return this.password; |
| } |
| |
| public UserDetail setPassword(java.lang.String password) { |
| this.password = password; |
| return this; |
| } |
| |
| public void unsetPassword() { |
| this.password = null; |
| } |
| |
| /** Returns true if field password is set (has been assigned a value) and false otherwise */ |
| public boolean isSetPassword() { |
| return this.password != null; |
| } |
| |
| public void setPasswordIsSet(boolean value) { |
| if (!value) { |
| this.password = null; |
| } |
| } |
| |
| public java.lang.String getUserType() { |
| return this.userType; |
| } |
| |
| public UserDetail setUserType(java.lang.String userType) { |
| this.userType = userType; |
| return this; |
| } |
| |
| public void unsetUserType() { |
| this.userType = null; |
| } |
| |
| /** Returns true if field userType is set (has been assigned a value) and false otherwise */ |
| public boolean isSetUserType() { |
| return this.userType != null; |
| } |
| |
| public void setUserTypeIsSet(boolean value) { |
| if (!value) { |
| this.userType = null; |
| } |
| } |
| |
| public void setFieldValue(_Fields field, java.lang.Object value) { |
| switch (field) { |
| case USERNAME: |
| if (value == null) { |
| unsetUsername(); |
| } else { |
| setUsername((java.lang.String)value); |
| } |
| break; |
| |
| case EMAIL: |
| if (value == null) { |
| unsetEmail(); |
| } else { |
| setEmail((java.lang.String)value); |
| } |
| break; |
| |
| case FULL_NAME: |
| if (value == null) { |
| unsetFullName(); |
| } else { |
| setFullName((java.lang.String)value); |
| } |
| break; |
| |
| case PASSWORD: |
| if (value == null) { |
| unsetPassword(); |
| } else { |
| setPassword((java.lang.String)value); |
| } |
| break; |
| |
| case USER_TYPE: |
| if (value == null) { |
| unsetUserType(); |
| } else { |
| setUserType((java.lang.String)value); |
| } |
| break; |
| |
| } |
| } |
| |
| public java.lang.Object getFieldValue(_Fields field) { |
| switch (field) { |
| case USERNAME: |
| return getUsername(); |
| |
| case EMAIL: |
| return getEmail(); |
| |
| case FULL_NAME: |
| return getFullName(); |
| |
| case PASSWORD: |
| return getPassword(); |
| |
| case USER_TYPE: |
| return getUserType(); |
| |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ |
| public boolean isSet(_Fields field) { |
| if (field == null) { |
| throw new java.lang.IllegalArgumentException(); |
| } |
| |
| switch (field) { |
| case USERNAME: |
| return isSetUsername(); |
| case EMAIL: |
| return isSetEmail(); |
| case FULL_NAME: |
| return isSetFullName(); |
| case PASSWORD: |
| return isSetPassword(); |
| case USER_TYPE: |
| return isSetUserType(); |
| } |
| throw new java.lang.IllegalStateException(); |
| } |
| |
| @Override |
| public boolean equals(java.lang.Object that) { |
| if (that == null) |
| return false; |
| if (that instanceof UserDetail) |
| return this.equals((UserDetail)that); |
| return false; |
| } |
| |
| public boolean equals(UserDetail that) { |
| if (that == null) |
| return false; |
| if (this == that) |
| return true; |
| |
| boolean this_present_username = true && this.isSetUsername(); |
| boolean that_present_username = true && that.isSetUsername(); |
| if (this_present_username || that_present_username) { |
| if (!(this_present_username && that_present_username)) |
| return false; |
| if (!this.username.equals(that.username)) |
| return false; |
| } |
| |
| boolean this_present_email = true && this.isSetEmail(); |
| boolean that_present_email = true && that.isSetEmail(); |
| if (this_present_email || that_present_email) { |
| if (!(this_present_email && that_present_email)) |
| return false; |
| if (!this.email.equals(that.email)) |
| return false; |
| } |
| |
| boolean this_present_fullName = true && this.isSetFullName(); |
| boolean that_present_fullName = true && that.isSetFullName(); |
| if (this_present_fullName || that_present_fullName) { |
| if (!(this_present_fullName && that_present_fullName)) |
| return false; |
| if (!this.fullName.equals(that.fullName)) |
| return false; |
| } |
| |
| boolean this_present_password = true && this.isSetPassword(); |
| boolean that_present_password = true && that.isSetPassword(); |
| if (this_present_password || that_present_password) { |
| if (!(this_present_password && that_present_password)) |
| return false; |
| if (!this.password.equals(that.password)) |
| return false; |
| } |
| |
| boolean this_present_userType = true && this.isSetUserType(); |
| boolean that_present_userType = true && that.isSetUserType(); |
| if (this_present_userType || that_present_userType) { |
| if (!(this_present_userType && that_present_userType)) |
| return false; |
| if (!this.userType.equals(that.userType)) |
| return false; |
| } |
| |
| return true; |
| } |
| |
| @Override |
| public int hashCode() { |
| int hashCode = 1; |
| |
| hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287); |
| if (isSetUsername()) |
| hashCode = hashCode * 8191 + username.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetEmail()) ? 131071 : 524287); |
| if (isSetEmail()) |
| hashCode = hashCode * 8191 + email.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetFullName()) ? 131071 : 524287); |
| if (isSetFullName()) |
| hashCode = hashCode * 8191 + fullName.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287); |
| if (isSetPassword()) |
| hashCode = hashCode * 8191 + password.hashCode(); |
| |
| hashCode = hashCode * 8191 + ((isSetUserType()) ? 131071 : 524287); |
| if (isSetUserType()) |
| hashCode = hashCode * 8191 + userType.hashCode(); |
| |
| return hashCode; |
| } |
| |
| @Override |
| public int compareTo(UserDetail other) { |
| if (!getClass().equals(other.getClass())) { |
| return getClass().getName().compareTo(other.getClass().getName()); |
| } |
| |
| int lastComparison = 0; |
| |
| lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetUsername()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetEmail()).compareTo(other.isSetEmail()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetEmail()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, other.email); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetFullName()).compareTo(other.isSetFullName()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetFullName()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fullName, other.fullName); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetPassword()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| lastComparison = java.lang.Boolean.valueOf(isSetUserType()).compareTo(other.isSetUserType()); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| if (isSetUserType()) { |
| lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userType, other.userType); |
| if (lastComparison != 0) { |
| return lastComparison; |
| } |
| } |
| return 0; |
| } |
| |
| public _Fields fieldForId(int fieldId) { |
| return _Fields.findByThriftId(fieldId); |
| } |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { |
| scheme(iprot).read(iprot, this); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { |
| scheme(oprot).write(oprot, this); |
| } |
| |
| @Override |
| public java.lang.String toString() { |
| java.lang.StringBuilder sb = new java.lang.StringBuilder("UserDetail("); |
| boolean first = true; |
| |
| if (isSetUsername()) { |
| sb.append("username:"); |
| if (this.username == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.username); |
| } |
| first = false; |
| } |
| if (isSetEmail()) { |
| if (!first) sb.append(", "); |
| sb.append("email:"); |
| if (this.email == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.email); |
| } |
| first = false; |
| } |
| if (isSetFullName()) { |
| if (!first) sb.append(", "); |
| sb.append("fullName:"); |
| if (this.fullName == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.fullName); |
| } |
| first = false; |
| } |
| if (isSetPassword()) { |
| if (!first) sb.append(", "); |
| sb.append("password:"); |
| if (this.password == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.password); |
| } |
| first = false; |
| } |
| if (isSetUserType()) { |
| if (!first) sb.append(", "); |
| sb.append("userType:"); |
| if (this.userType == null) { |
| sb.append("null"); |
| } else { |
| sb.append(this.userType); |
| } |
| first = false; |
| } |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| public void validate() throws org.apache.thrift.TException { |
| // check for required fields |
| // check for sub-struct validity |
| } |
| |
| private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { |
| try { |
| write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { |
| try { |
| read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); |
| } catch (org.apache.thrift.TException te) { |
| throw new java.io.IOException(te); |
| } |
| } |
| |
| private static class UserDetailStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public UserDetailStandardScheme getScheme() { |
| return new UserDetailStandardScheme(); |
| } |
| } |
| |
| private static class UserDetailStandardScheme extends org.apache.thrift.scheme.StandardScheme<UserDetail> { |
| |
| public void read(org.apache.thrift.protocol.TProtocol iprot, UserDetail struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TField schemeField; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| schemeField = iprot.readFieldBegin(); |
| if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { |
| break; |
| } |
| switch (schemeField.id) { |
| case 1: // USERNAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.username = iprot.readString(); |
| struct.setUsernameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 2: // EMAIL |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.email = iprot.readString(); |
| struct.setEmailIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 3: // FULL_NAME |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.fullName = iprot.readString(); |
| struct.setFullNameIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 4: // PASSWORD |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.password = iprot.readString(); |
| struct.setPasswordIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| case 5: // USER_TYPE |
| if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { |
| struct.userType = iprot.readString(); |
| struct.setUserTypeIsSet(true); |
| } else { |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| break; |
| default: |
| org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| |
| // check for required fields of primitive type, which can't be checked in the validate method |
| struct.validate(); |
| } |
| |
| public void write(org.apache.thrift.protocol.TProtocol oprot, UserDetail struct) throws org.apache.thrift.TException { |
| struct.validate(); |
| |
| oprot.writeStructBegin(STRUCT_DESC); |
| if (struct.username != null) { |
| if (struct.isSetUsername()) { |
| oprot.writeFieldBegin(USERNAME_FIELD_DESC); |
| oprot.writeString(struct.username); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.email != null) { |
| if (struct.isSetEmail()) { |
| oprot.writeFieldBegin(EMAIL_FIELD_DESC); |
| oprot.writeString(struct.email); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.fullName != null) { |
| if (struct.isSetFullName()) { |
| oprot.writeFieldBegin(FULL_NAME_FIELD_DESC); |
| oprot.writeString(struct.fullName); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.password != null) { |
| if (struct.isSetPassword()) { |
| oprot.writeFieldBegin(PASSWORD_FIELD_DESC); |
| oprot.writeString(struct.password); |
| oprot.writeFieldEnd(); |
| } |
| } |
| if (struct.userType != null) { |
| if (struct.isSetUserType()) { |
| oprot.writeFieldBegin(USER_TYPE_FIELD_DESC); |
| oprot.writeString(struct.userType); |
| oprot.writeFieldEnd(); |
| } |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| } |
| |
| private static class UserDetailTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { |
| public UserDetailTupleScheme getScheme() { |
| return new UserDetailTupleScheme(); |
| } |
| } |
| |
| private static class UserDetailTupleScheme extends org.apache.thrift.scheme.TupleScheme<UserDetail> { |
| |
| @Override |
| public void write(org.apache.thrift.protocol.TProtocol prot, UserDetail struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| java.util.BitSet optionals = new java.util.BitSet(); |
| if (struct.isSetUsername()) { |
| optionals.set(0); |
| } |
| if (struct.isSetEmail()) { |
| optionals.set(1); |
| } |
| if (struct.isSetFullName()) { |
| optionals.set(2); |
| } |
| if (struct.isSetPassword()) { |
| optionals.set(3); |
| } |
| if (struct.isSetUserType()) { |
| optionals.set(4); |
| } |
| oprot.writeBitSet(optionals, 5); |
| if (struct.isSetUsername()) { |
| oprot.writeString(struct.username); |
| } |
| if (struct.isSetEmail()) { |
| oprot.writeString(struct.email); |
| } |
| if (struct.isSetFullName()) { |
| oprot.writeString(struct.fullName); |
| } |
| if (struct.isSetPassword()) { |
| oprot.writeString(struct.password); |
| } |
| if (struct.isSetUserType()) { |
| oprot.writeString(struct.userType); |
| } |
| } |
| |
| @Override |
| public void read(org.apache.thrift.protocol.TProtocol prot, UserDetail struct) throws org.apache.thrift.TException { |
| org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; |
| java.util.BitSet incoming = iprot.readBitSet(5); |
| if (incoming.get(0)) { |
| struct.username = iprot.readString(); |
| struct.setUsernameIsSet(true); |
| } |
| if (incoming.get(1)) { |
| struct.email = iprot.readString(); |
| struct.setEmailIsSet(true); |
| } |
| if (incoming.get(2)) { |
| struct.fullName = iprot.readString(); |
| struct.setFullNameIsSet(true); |
| } |
| if (incoming.get(3)) { |
| struct.password = iprot.readString(); |
| struct.setPasswordIsSet(true); |
| } |
| if (incoming.get(4)) { |
| struct.userType = iprot.readString(); |
| struct.setUserTypeIsSet(true); |
| } |
| } |
| } |
| |
| private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) { |
| return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); |
| } |
| } |
| |