
cicada.userdriver.config.VirtualParam Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.10.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package cicada.userdriver.config;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)", date = "2017-08-15")
public class VirtualParam implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("VirtualParam");
private static final org.apache.thrift.protocol.TField USER_IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("userImage", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField NICK_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("nickName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField TRUE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("trueName", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField SEX_FIELD_DESC = new org.apache.thrift.protocol.TField("sex", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField AGE_FIELD_DESC = new org.apache.thrift.protocol.TField("age", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField NATIVE_PLACE_FIELD_DESC = new org.apache.thrift.protocol.TField("nativePlace", org.apache.thrift.protocol.TType.STRING, (short)6);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new VirtualParamStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new VirtualParamTupleSchemeFactory();
public String userImage; // required
public String nickName; // required
public String trueName; // required
public SexTypeEnum sex; // required
public int age; // required
public String nativePlace; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
USER_IMAGE((short)1, "userImage"),
NICK_NAME((short)2, "nickName"),
TRUE_NAME((short)3, "trueName"),
SEX((short)4, "sex"),
AGE((short)5, "age"),
NATIVE_PLACE((short)6, "nativePlace");
private static final java.util.Map byName = new java.util.HashMap();
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: // USER_IMAGE
return USER_IMAGE;
case 2: // NICK_NAME
return NICK_NAME;
case 3: // TRUE_NAME
return TRUE_NAME;
case 4: // SEX
return SEX;
case 5: // AGE
return AGE;
case 6: // NATIVE_PLACE
return NATIVE_PLACE;
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 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(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final int __AGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
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.USER_IMAGE, new org.apache.thrift.meta_data.FieldMetaData("userImage", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.NICK_NAME, new org.apache.thrift.meta_data.FieldMetaData("nickName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.TRUE_NAME, new org.apache.thrift.meta_data.FieldMetaData("trueName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SEX, new org.apache.thrift.meta_data.FieldMetaData("sex", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.ENUM , "SexTypeEnum")));
tmpMap.put(_Fields.AGE, new org.apache.thrift.meta_data.FieldMetaData("age", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.NATIVE_PLACE, new org.apache.thrift.meta_data.FieldMetaData("nativePlace", org.apache.thrift.TFieldRequirementType.DEFAULT,
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(VirtualParam.class, metaDataMap);
}
public VirtualParam() {
}
public VirtualParam(
String userImage,
String nickName,
String trueName,
SexTypeEnum sex,
int age,
String nativePlace)
{
this();
this.userImage = userImage;
this.nickName = nickName;
this.trueName = trueName;
this.sex = sex;
this.age = age;
setAgeIsSet(true);
this.nativePlace = nativePlace;
}
/**
* Performs a deep copy on other.
*/
public VirtualParam(VirtualParam other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetUserImage()) {
this.userImage = other.userImage;
}
if (other.isSetNickName()) {
this.nickName = other.nickName;
}
if (other.isSetTrueName()) {
this.trueName = other.trueName;
}
if (other.isSetSex()) {
this.sex = other.sex;
}
this.age = other.age;
if (other.isSetNativePlace()) {
this.nativePlace = other.nativePlace;
}
}
public VirtualParam deepCopy() {
return new VirtualParam(this);
}
@Override
public void clear() {
this.userImage = null;
this.nickName = null;
this.trueName = null;
this.sex = null;
setAgeIsSet(false);
this.age = 0;
this.nativePlace = null;
}
public String getUserImage() {
return this.userImage;
}
public VirtualParam setUserImage(String userImage) {
this.userImage = userImage;
return this;
}
public void unsetUserImage() {
this.userImage = null;
}
/** Returns true if field userImage is set (has been assigned a value) and false otherwise */
public boolean isSetUserImage() {
return this.userImage != null;
}
public void setUserImageIsSet(boolean value) {
if (!value) {
this.userImage = null;
}
}
public String getNickName() {
return this.nickName;
}
public VirtualParam setNickName(String nickName) {
this.nickName = nickName;
return this;
}
public void unsetNickName() {
this.nickName = null;
}
/** Returns true if field nickName is set (has been assigned a value) and false otherwise */
public boolean isSetNickName() {
return this.nickName != null;
}
public void setNickNameIsSet(boolean value) {
if (!value) {
this.nickName = null;
}
}
public String getTrueName() {
return this.trueName;
}
public VirtualParam setTrueName(String trueName) {
this.trueName = trueName;
return this;
}
public void unsetTrueName() {
this.trueName = null;
}
/** Returns true if field trueName is set (has been assigned a value) and false otherwise */
public boolean isSetTrueName() {
return this.trueName != null;
}
public void setTrueNameIsSet(boolean value) {
if (!value) {
this.trueName = null;
}
}
public SexTypeEnum getSex() {
return this.sex;
}
public VirtualParam setSex(SexTypeEnum sex) {
this.sex = sex;
return this;
}
public void unsetSex() {
this.sex = null;
}
/** Returns true if field sex is set (has been assigned a value) and false otherwise */
public boolean isSetSex() {
return this.sex != null;
}
public void setSexIsSet(boolean value) {
if (!value) {
this.sex = null;
}
}
public int getAge() {
return this.age;
}
public VirtualParam setAge(int age) {
this.age = age;
setAgeIsSet(true);
return this;
}
public void unsetAge() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AGE_ISSET_ID);
}
/** Returns true if field age is set (has been assigned a value) and false otherwise */
public boolean isSetAge() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AGE_ISSET_ID);
}
public void setAgeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AGE_ISSET_ID, value);
}
public String getNativePlace() {
return this.nativePlace;
}
public VirtualParam setNativePlace(String nativePlace) {
this.nativePlace = nativePlace;
return this;
}
public void unsetNativePlace() {
this.nativePlace = null;
}
/** Returns true if field nativePlace is set (has been assigned a value) and false otherwise */
public boolean isSetNativePlace() {
return this.nativePlace != null;
}
public void setNativePlaceIsSet(boolean value) {
if (!value) {
this.nativePlace = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case USER_IMAGE:
if (value == null) {
unsetUserImage();
} else {
setUserImage((String)value);
}
break;
case NICK_NAME:
if (value == null) {
unsetNickName();
} else {
setNickName((String)value);
}
break;
case TRUE_NAME:
if (value == null) {
unsetTrueName();
} else {
setTrueName((String)value);
}
break;
case SEX:
if (value == null) {
unsetSex();
} else {
setSex((SexTypeEnum)value);
}
break;
case AGE:
if (value == null) {
unsetAge();
} else {
setAge((Integer)value);
}
break;
case NATIVE_PLACE:
if (value == null) {
unsetNativePlace();
} else {
setNativePlace((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case USER_IMAGE:
return getUserImage();
case NICK_NAME:
return getNickName();
case TRUE_NAME:
return getTrueName();
case SEX:
return getSex();
case AGE:
return getAge();
case NATIVE_PLACE:
return getNativePlace();
}
throw new 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 IllegalArgumentException();
}
switch (field) {
case USER_IMAGE:
return isSetUserImage();
case NICK_NAME:
return isSetNickName();
case TRUE_NAME:
return isSetTrueName();
case SEX:
return isSetSex();
case AGE:
return isSetAge();
case NATIVE_PLACE:
return isSetNativePlace();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof VirtualParam)
return this.equals((VirtualParam)that);
return false;
}
public boolean equals(VirtualParam that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_userImage = true && this.isSetUserImage();
boolean that_present_userImage = true && that.isSetUserImage();
if (this_present_userImage || that_present_userImage) {
if (!(this_present_userImage && that_present_userImage))
return false;
if (!this.userImage.equals(that.userImage))
return false;
}
boolean this_present_nickName = true && this.isSetNickName();
boolean that_present_nickName = true && that.isSetNickName();
if (this_present_nickName || that_present_nickName) {
if (!(this_present_nickName && that_present_nickName))
return false;
if (!this.nickName.equals(that.nickName))
return false;
}
boolean this_present_trueName = true && this.isSetTrueName();
boolean that_present_trueName = true && that.isSetTrueName();
if (this_present_trueName || that_present_trueName) {
if (!(this_present_trueName && that_present_trueName))
return false;
if (!this.trueName.equals(that.trueName))
return false;
}
boolean this_present_sex = true && this.isSetSex();
boolean that_present_sex = true && that.isSetSex();
if (this_present_sex || that_present_sex) {
if (!(this_present_sex && that_present_sex))
return false;
if (!this.sex.equals(that.sex))
return false;
}
boolean this_present_age = true;
boolean that_present_age = true;
if (this_present_age || that_present_age) {
if (!(this_present_age && that_present_age))
return false;
if (this.age != that.age)
return false;
}
boolean this_present_nativePlace = true && this.isSetNativePlace();
boolean that_present_nativePlace = true && that.isSetNativePlace();
if (this_present_nativePlace || that_present_nativePlace) {
if (!(this_present_nativePlace && that_present_nativePlace))
return false;
if (!this.nativePlace.equals(that.nativePlace))
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetUserImage()) ? 131071 : 524287);
if (isSetUserImage())
hashCode = hashCode * 8191 + userImage.hashCode();
hashCode = hashCode * 8191 + ((isSetNickName()) ? 131071 : 524287);
if (isSetNickName())
hashCode = hashCode * 8191 + nickName.hashCode();
hashCode = hashCode * 8191 + ((isSetTrueName()) ? 131071 : 524287);
if (isSetTrueName())
hashCode = hashCode * 8191 + trueName.hashCode();
hashCode = hashCode * 8191 + ((isSetSex()) ? 131071 : 524287);
if (isSetSex())
hashCode = hashCode * 8191 + sex.getValue();
hashCode = hashCode * 8191 + age;
hashCode = hashCode * 8191 + ((isSetNativePlace()) ? 131071 : 524287);
if (isSetNativePlace())
hashCode = hashCode * 8191 + nativePlace.hashCode();
return hashCode;
}
@Override
public int compareTo(VirtualParam other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetUserImage()).compareTo(other.isSetUserImage());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetUserImage()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userImage, other.userImage);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNickName()).compareTo(other.isSetNickName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNickName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nickName, other.nickName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetTrueName()).compareTo(other.isSetTrueName());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetTrueName()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.trueName, other.trueName);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSex()).compareTo(other.isSetSex());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSex()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sex, other.sex);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAge()).compareTo(other.isSetAge());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAge()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.age, other.age);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetNativePlace()).compareTo(other.isSetNativePlace());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetNativePlace()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nativePlace, other.nativePlace);
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 String toString() {
StringBuilder sb = new StringBuilder("VirtualParam(");
boolean first = true;
sb.append("userImage:");
if (this.userImage == null) {
sb.append("null");
} else {
sb.append(this.userImage);
}
first = false;
if (!first) sb.append(", ");
sb.append("nickName:");
if (this.nickName == null) {
sb.append("null");
} else {
sb.append(this.nickName);
}
first = false;
if (!first) sb.append(", ");
sb.append("trueName:");
if (this.trueName == null) {
sb.append("null");
} else {
sb.append(this.trueName);
}
first = false;
if (!first) sb.append(", ");
sb.append("sex:");
if (this.sex == null) {
sb.append("null");
} else {
sb.append(this.sex);
}
first = false;
if (!first) sb.append(", ");
sb.append("age:");
sb.append(this.age);
first = false;
if (!first) sb.append(", ");
sb.append("nativePlace:");
if (this.nativePlace == null) {
sb.append("null");
} else {
sb.append(this.nativePlace);
}
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, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
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 VirtualParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public VirtualParamStandardScheme getScheme() {
return new VirtualParamStandardScheme();
}
}
private static class VirtualParamStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, VirtualParam 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: // USER_IMAGE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.userImage = iprot.readString();
struct.setUserImageIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // NICK_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.nickName = iprot.readString();
struct.setNickNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // TRUE_NAME
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.trueName = iprot.readString();
struct.setTrueNameIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // SEX
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.sex = SexTypeEnum.findByValue(iprot.readI32());
struct.setSexIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // AGE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.age = iprot.readI32();
struct.setAgeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // NATIVE_PLACE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.nativePlace = iprot.readString();
struct.setNativePlaceIsSet(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, VirtualParam struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.userImage != null) {
oprot.writeFieldBegin(USER_IMAGE_FIELD_DESC);
oprot.writeString(struct.userImage);
oprot.writeFieldEnd();
}
if (struct.nickName != null) {
oprot.writeFieldBegin(NICK_NAME_FIELD_DESC);
oprot.writeString(struct.nickName);
oprot.writeFieldEnd();
}
if (struct.trueName != null) {
oprot.writeFieldBegin(TRUE_NAME_FIELD_DESC);
oprot.writeString(struct.trueName);
oprot.writeFieldEnd();
}
if (struct.sex != null) {
oprot.writeFieldBegin(SEX_FIELD_DESC);
oprot.writeI32(struct.sex.getValue());
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(AGE_FIELD_DESC);
oprot.writeI32(struct.age);
oprot.writeFieldEnd();
if (struct.nativePlace != null) {
oprot.writeFieldBegin(NATIVE_PLACE_FIELD_DESC);
oprot.writeString(struct.nativePlace);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class VirtualParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public VirtualParamTupleScheme getScheme() {
return new VirtualParamTupleScheme();
}
}
private static class VirtualParamTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, VirtualParam 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.isSetUserImage()) {
optionals.set(0);
}
if (struct.isSetNickName()) {
optionals.set(1);
}
if (struct.isSetTrueName()) {
optionals.set(2);
}
if (struct.isSetSex()) {
optionals.set(3);
}
if (struct.isSetAge()) {
optionals.set(4);
}
if (struct.isSetNativePlace()) {
optionals.set(5);
}
oprot.writeBitSet(optionals, 6);
if (struct.isSetUserImage()) {
oprot.writeString(struct.userImage);
}
if (struct.isSetNickName()) {
oprot.writeString(struct.nickName);
}
if (struct.isSetTrueName()) {
oprot.writeString(struct.trueName);
}
if (struct.isSetSex()) {
oprot.writeI32(struct.sex.getValue());
}
if (struct.isSetAge()) {
oprot.writeI32(struct.age);
}
if (struct.isSetNativePlace()) {
oprot.writeString(struct.nativePlace);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, VirtualParam struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.userImage = iprot.readString();
struct.setUserImageIsSet(true);
}
if (incoming.get(1)) {
struct.nickName = iprot.readString();
struct.setNickNameIsSet(true);
}
if (incoming.get(2)) {
struct.trueName = iprot.readString();
struct.setTrueNameIsSet(true);
}
if (incoming.get(3)) {
struct.sex = SexTypeEnum.findByValue(iprot.readI32());
struct.setSexIsSet(true);
}
if (incoming.get(4)) {
struct.age = iprot.readI32();
struct.setAgeIsSet(true);
}
if (incoming.get(5)) {
struct.nativePlace = iprot.readString();
struct.setNativePlaceIsSet(true);
}
}
}
private static 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();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy