Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
cicada.userdriver.config.GetUserInfosByPosiParam 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 GetUserInfosByPosiParam 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("GetUserInfosByPosiParam");
private static final org.apache.thrift.protocol.TField POSITION_X_FIELD_DESC = new org.apache.thrift.protocol.TField("positionX", org.apache.thrift.protocol.TType.DOUBLE, (short)1);
private static final org.apache.thrift.protocol.TField POSITION_Y_FIELD_DESC = new org.apache.thrift.protocol.TField("positionY", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
private static final org.apache.thrift.protocol.TField INSTANCE_FIELD_DESC = new org.apache.thrift.protocol.TField("instance", org.apache.thrift.protocol.TType.DOUBLE, (short)3);
private static final org.apache.thrift.protocol.TField PAGE_INDEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pageIndex", org.apache.thrift.protocol.TType.I32, (short)4);
private static final org.apache.thrift.protocol.TField PAGE_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("pageSize", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField SEX_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("sexType", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField AFTER_DAY_FIELD_DESC = new org.apache.thrift.protocol.TField("afterDay", org.apache.thrift.protocol.TType.I32, (short)7);
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GetUserInfosByPosiParamStandardSchemeFactory();
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GetUserInfosByPosiParamTupleSchemeFactory();
public double positionX; // required
public double positionY; // required
public double instance; // required
public int pageIndex; // required
public int pageSize; // required
public SexTypeEnum sexType; // required
public int afterDay; // 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 {
POSITION_X((short)1, "positionX"),
POSITION_Y((short)2, "positionY"),
INSTANCE((short)3, "instance"),
PAGE_INDEX((short)4, "pageIndex"),
PAGE_SIZE((short)5, "pageSize"),
SEX_TYPE((short)6, "sexType"),
AFTER_DAY((short)7, "afterDay");
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: // POSITION_X
return POSITION_X;
case 2: // POSITION_Y
return POSITION_Y;
case 3: // INSTANCE
return INSTANCE;
case 4: // PAGE_INDEX
return PAGE_INDEX;
case 5: // PAGE_SIZE
return PAGE_SIZE;
case 6: // SEX_TYPE
return SEX_TYPE;
case 7: // AFTER_DAY
return AFTER_DAY;
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 __POSITIONX_ISSET_ID = 0;
private static final int __POSITIONY_ISSET_ID = 1;
private static final int __INSTANCE_ISSET_ID = 2;
private static final int __PAGEINDEX_ISSET_ID = 3;
private static final int __PAGESIZE_ISSET_ID = 4;
private static final int __AFTERDAY_ISSET_ID = 5;
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.POSITION_X, new org.apache.thrift.meta_data.FieldMetaData("positionX", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.POSITION_Y, new org.apache.thrift.meta_data.FieldMetaData("positionY", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.INSTANCE, new org.apache.thrift.meta_data.FieldMetaData("instance", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
tmpMap.put(_Fields.PAGE_INDEX, new org.apache.thrift.meta_data.FieldMetaData("pageIndex", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.PAGE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("pageSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.SEX_TYPE, new org.apache.thrift.meta_data.FieldMetaData("sexType", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.ENUM , "SexTypeEnum")));
tmpMap.put(_Fields.AFTER_DAY, new org.apache.thrift.meta_data.FieldMetaData("afterDay", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetUserInfosByPosiParam.class, metaDataMap);
}
public GetUserInfosByPosiParam() {
this.afterDay = 7;
}
public GetUserInfosByPosiParam(
double positionX,
double positionY,
double instance,
int pageIndex,
int pageSize,
SexTypeEnum sexType,
int afterDay)
{
this();
this.positionX = positionX;
setPositionXIsSet(true);
this.positionY = positionY;
setPositionYIsSet(true);
this.instance = instance;
setInstanceIsSet(true);
this.pageIndex = pageIndex;
setPageIndexIsSet(true);
this.pageSize = pageSize;
setPageSizeIsSet(true);
this.sexType = sexType;
this.afterDay = afterDay;
setAfterDayIsSet(true);
}
/**
* Performs a deep copy on other .
*/
public GetUserInfosByPosiParam(GetUserInfosByPosiParam other) {
__isset_bitfield = other.__isset_bitfield;
this.positionX = other.positionX;
this.positionY = other.positionY;
this.instance = other.instance;
this.pageIndex = other.pageIndex;
this.pageSize = other.pageSize;
if (other.isSetSexType()) {
this.sexType = other.sexType;
}
this.afterDay = other.afterDay;
}
public GetUserInfosByPosiParam deepCopy() {
return new GetUserInfosByPosiParam(this);
}
@Override
public void clear() {
setPositionXIsSet(false);
this.positionX = 0.0;
setPositionYIsSet(false);
this.positionY = 0.0;
setInstanceIsSet(false);
this.instance = 0.0;
setPageIndexIsSet(false);
this.pageIndex = 0;
setPageSizeIsSet(false);
this.pageSize = 0;
this.sexType = null;
this.afterDay = 7;
}
public double getPositionX() {
return this.positionX;
}
public GetUserInfosByPosiParam setPositionX(double positionX) {
this.positionX = positionX;
setPositionXIsSet(true);
return this;
}
public void unsetPositionX() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __POSITIONX_ISSET_ID);
}
/** Returns true if field positionX is set (has been assigned a value) and false otherwise */
public boolean isSetPositionX() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __POSITIONX_ISSET_ID);
}
public void setPositionXIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __POSITIONX_ISSET_ID, value);
}
public double getPositionY() {
return this.positionY;
}
public GetUserInfosByPosiParam setPositionY(double positionY) {
this.positionY = positionY;
setPositionYIsSet(true);
return this;
}
public void unsetPositionY() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __POSITIONY_ISSET_ID);
}
/** Returns true if field positionY is set (has been assigned a value) and false otherwise */
public boolean isSetPositionY() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __POSITIONY_ISSET_ID);
}
public void setPositionYIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __POSITIONY_ISSET_ID, value);
}
public double getInstance() {
return this.instance;
}
public GetUserInfosByPosiParam setInstance(double instance) {
this.instance = instance;
setInstanceIsSet(true);
return this;
}
public void unsetInstance() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __INSTANCE_ISSET_ID);
}
/** Returns true if field instance is set (has been assigned a value) and false otherwise */
public boolean isSetInstance() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __INSTANCE_ISSET_ID);
}
public void setInstanceIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __INSTANCE_ISSET_ID, value);
}
public int getPageIndex() {
return this.pageIndex;
}
public GetUserInfosByPosiParam setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
setPageIndexIsSet(true);
return this;
}
public void unsetPageIndex() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGEINDEX_ISSET_ID);
}
/** Returns true if field pageIndex is set (has been assigned a value) and false otherwise */
public boolean isSetPageIndex() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGEINDEX_ISSET_ID);
}
public void setPageIndexIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGEINDEX_ISSET_ID, value);
}
public int getPageSize() {
return this.pageSize;
}
public GetUserInfosByPosiParam setPageSize(int pageSize) {
this.pageSize = pageSize;
setPageSizeIsSet(true);
return this;
}
public void unsetPageSize() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGESIZE_ISSET_ID);
}
/** Returns true if field pageSize is set (has been assigned a value) and false otherwise */
public boolean isSetPageSize() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGESIZE_ISSET_ID);
}
public void setPageSizeIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGESIZE_ISSET_ID, value);
}
public SexTypeEnum getSexType() {
return this.sexType;
}
public GetUserInfosByPosiParam setSexType(SexTypeEnum sexType) {
this.sexType = sexType;
return this;
}
public void unsetSexType() {
this.sexType = null;
}
/** Returns true if field sexType is set (has been assigned a value) and false otherwise */
public boolean isSetSexType() {
return this.sexType != null;
}
public void setSexTypeIsSet(boolean value) {
if (!value) {
this.sexType = null;
}
}
public int getAfterDay() {
return this.afterDay;
}
public GetUserInfosByPosiParam setAfterDay(int afterDay) {
this.afterDay = afterDay;
setAfterDayIsSet(true);
return this;
}
public void unsetAfterDay() {
__isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AFTERDAY_ISSET_ID);
}
/** Returns true if field afterDay is set (has been assigned a value) and false otherwise */
public boolean isSetAfterDay() {
return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AFTERDAY_ISSET_ID);
}
public void setAfterDayIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AFTERDAY_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case POSITION_X:
if (value == null) {
unsetPositionX();
} else {
setPositionX((Double)value);
}
break;
case POSITION_Y:
if (value == null) {
unsetPositionY();
} else {
setPositionY((Double)value);
}
break;
case INSTANCE:
if (value == null) {
unsetInstance();
} else {
setInstance((Double)value);
}
break;
case PAGE_INDEX:
if (value == null) {
unsetPageIndex();
} else {
setPageIndex((Integer)value);
}
break;
case PAGE_SIZE:
if (value == null) {
unsetPageSize();
} else {
setPageSize((Integer)value);
}
break;
case SEX_TYPE:
if (value == null) {
unsetSexType();
} else {
setSexType((SexTypeEnum)value);
}
break;
case AFTER_DAY:
if (value == null) {
unsetAfterDay();
} else {
setAfterDay((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case POSITION_X:
return getPositionX();
case POSITION_Y:
return getPositionY();
case INSTANCE:
return getInstance();
case PAGE_INDEX:
return getPageIndex();
case PAGE_SIZE:
return getPageSize();
case SEX_TYPE:
return getSexType();
case AFTER_DAY:
return getAfterDay();
}
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 POSITION_X:
return isSetPositionX();
case POSITION_Y:
return isSetPositionY();
case INSTANCE:
return isSetInstance();
case PAGE_INDEX:
return isSetPageIndex();
case PAGE_SIZE:
return isSetPageSize();
case SEX_TYPE:
return isSetSexType();
case AFTER_DAY:
return isSetAfterDay();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof GetUserInfosByPosiParam)
return this.equals((GetUserInfosByPosiParam)that);
return false;
}
public boolean equals(GetUserInfosByPosiParam that) {
if (that == null)
return false;
if (this == that)
return true;
boolean this_present_positionX = true;
boolean that_present_positionX = true;
if (this_present_positionX || that_present_positionX) {
if (!(this_present_positionX && that_present_positionX))
return false;
if (this.positionX != that.positionX)
return false;
}
boolean this_present_positionY = true;
boolean that_present_positionY = true;
if (this_present_positionY || that_present_positionY) {
if (!(this_present_positionY && that_present_positionY))
return false;
if (this.positionY != that.positionY)
return false;
}
boolean this_present_instance = true;
boolean that_present_instance = true;
if (this_present_instance || that_present_instance) {
if (!(this_present_instance && that_present_instance))
return false;
if (this.instance != that.instance)
return false;
}
boolean this_present_pageIndex = true;
boolean that_present_pageIndex = true;
if (this_present_pageIndex || that_present_pageIndex) {
if (!(this_present_pageIndex && that_present_pageIndex))
return false;
if (this.pageIndex != that.pageIndex)
return false;
}
boolean this_present_pageSize = true;
boolean that_present_pageSize = true;
if (this_present_pageSize || that_present_pageSize) {
if (!(this_present_pageSize && that_present_pageSize))
return false;
if (this.pageSize != that.pageSize)
return false;
}
boolean this_present_sexType = true && this.isSetSexType();
boolean that_present_sexType = true && that.isSetSexType();
if (this_present_sexType || that_present_sexType) {
if (!(this_present_sexType && that_present_sexType))
return false;
if (!this.sexType.equals(that.sexType))
return false;
}
boolean this_present_afterDay = true;
boolean that_present_afterDay = true;
if (this_present_afterDay || that_present_afterDay) {
if (!(this_present_afterDay && that_present_afterDay))
return false;
if (this.afterDay != that.afterDay)
return false;
}
return true;
}
@Override
public int hashCode() {
int hashCode = 1;
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(positionX);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(positionY);
hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(instance);
hashCode = hashCode * 8191 + pageIndex;
hashCode = hashCode * 8191 + pageSize;
hashCode = hashCode * 8191 + ((isSetSexType()) ? 131071 : 524287);
if (isSetSexType())
hashCode = hashCode * 8191 + sexType.getValue();
hashCode = hashCode * 8191 + afterDay;
return hashCode;
}
@Override
public int compareTo(GetUserInfosByPosiParam other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetPositionX()).compareTo(other.isSetPositionX());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPositionX()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.positionX, other.positionX);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPositionY()).compareTo(other.isSetPositionY());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPositionY()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.positionY, other.positionY);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetInstance()).compareTo(other.isSetInstance());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetInstance()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.instance, other.instance);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPageIndex()).compareTo(other.isSetPageIndex());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPageIndex()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pageIndex, other.pageIndex);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetPageSize()).compareTo(other.isSetPageSize());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetPageSize()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pageSize, other.pageSize);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetSexType()).compareTo(other.isSetSexType());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSexType()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sexType, other.sexType);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetAfterDay()).compareTo(other.isSetAfterDay());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetAfterDay()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.afterDay, other.afterDay);
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("GetUserInfosByPosiParam(");
boolean first = true;
sb.append("positionX:");
sb.append(this.positionX);
first = false;
if (!first) sb.append(", ");
sb.append("positionY:");
sb.append(this.positionY);
first = false;
if (!first) sb.append(", ");
sb.append("instance:");
sb.append(this.instance);
first = false;
if (!first) sb.append(", ");
sb.append("pageIndex:");
sb.append(this.pageIndex);
first = false;
if (!first) sb.append(", ");
sb.append("pageSize:");
sb.append(this.pageSize);
first = false;
if (!first) sb.append(", ");
sb.append("sexType:");
if (this.sexType == null) {
sb.append("null");
} else {
sb.append(this.sexType);
}
first = false;
if (!first) sb.append(", ");
sb.append("afterDay:");
sb.append(this.afterDay);
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 GetUserInfosByPosiParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GetUserInfosByPosiParamStandardScheme getScheme() {
return new GetUserInfosByPosiParamStandardScheme();
}
}
private static class GetUserInfosByPosiParamStandardScheme extends org.apache.thrift.scheme.StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, GetUserInfosByPosiParam 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: // POSITION_X
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.positionX = iprot.readDouble();
struct.setPositionXIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // POSITION_Y
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.positionY = iprot.readDouble();
struct.setPositionYIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // INSTANCE
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
struct.instance = iprot.readDouble();
struct.setInstanceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // PAGE_INDEX
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.pageIndex = iprot.readI32();
struct.setPageIndexIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // PAGE_SIZE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.pageSize = iprot.readI32();
struct.setPageSizeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // SEX_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.sexType = SexTypeEnum.findByValue(iprot.readI32());
struct.setSexTypeIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // AFTER_DAY
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.afterDay = iprot.readI32();
struct.setAfterDayIsSet(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, GetUserInfosByPosiParam struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(POSITION_X_FIELD_DESC);
oprot.writeDouble(struct.positionX);
oprot.writeFieldEnd();
oprot.writeFieldBegin(POSITION_Y_FIELD_DESC);
oprot.writeDouble(struct.positionY);
oprot.writeFieldEnd();
oprot.writeFieldBegin(INSTANCE_FIELD_DESC);
oprot.writeDouble(struct.instance);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PAGE_INDEX_FIELD_DESC);
oprot.writeI32(struct.pageIndex);
oprot.writeFieldEnd();
oprot.writeFieldBegin(PAGE_SIZE_FIELD_DESC);
oprot.writeI32(struct.pageSize);
oprot.writeFieldEnd();
if (struct.sexType != null) {
oprot.writeFieldBegin(SEX_TYPE_FIELD_DESC);
oprot.writeI32(struct.sexType.getValue());
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(AFTER_DAY_FIELD_DESC);
oprot.writeI32(struct.afterDay);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class GetUserInfosByPosiParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GetUserInfosByPosiParamTupleScheme getScheme() {
return new GetUserInfosByPosiParamTupleScheme();
}
}
private static class GetUserInfosByPosiParamTupleScheme extends org.apache.thrift.scheme.TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, GetUserInfosByPosiParam 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.isSetPositionX()) {
optionals.set(0);
}
if (struct.isSetPositionY()) {
optionals.set(1);
}
if (struct.isSetInstance()) {
optionals.set(2);
}
if (struct.isSetPageIndex()) {
optionals.set(3);
}
if (struct.isSetPageSize()) {
optionals.set(4);
}
if (struct.isSetSexType()) {
optionals.set(5);
}
if (struct.isSetAfterDay()) {
optionals.set(6);
}
oprot.writeBitSet(optionals, 7);
if (struct.isSetPositionX()) {
oprot.writeDouble(struct.positionX);
}
if (struct.isSetPositionY()) {
oprot.writeDouble(struct.positionY);
}
if (struct.isSetInstance()) {
oprot.writeDouble(struct.instance);
}
if (struct.isSetPageIndex()) {
oprot.writeI32(struct.pageIndex);
}
if (struct.isSetPageSize()) {
oprot.writeI32(struct.pageSize);
}
if (struct.isSetSexType()) {
oprot.writeI32(struct.sexType.getValue());
}
if (struct.isSetAfterDay()) {
oprot.writeI32(struct.afterDay);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, GetUserInfosByPosiParam struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.positionX = iprot.readDouble();
struct.setPositionXIsSet(true);
}
if (incoming.get(1)) {
struct.positionY = iprot.readDouble();
struct.setPositionYIsSet(true);
}
if (incoming.get(2)) {
struct.instance = iprot.readDouble();
struct.setInstanceIsSet(true);
}
if (incoming.get(3)) {
struct.pageIndex = iprot.readI32();
struct.setPageIndexIsSet(true);
}
if (incoming.get(4)) {
struct.pageSize = iprot.readI32();
struct.setPageSizeIsSet(true);
}
if (incoming.get(5)) {
struct.sexType = SexTypeEnum.findByValue(iprot.readI32());
struct.setSexTypeIsSet(true);
}
if (incoming.get(6)) {
struct.afterDay = iprot.readI32();
struct.setAfterDayIsSet(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();
}
}