All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cicada.userdriver.config.SearchParam Maven / Gradle / Ivy

There is a newer version: 1.0.6.6
Show newest version
/**
 * 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 SearchParam 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("SearchParam");

  private static final org.apache.thrift.protocol.TField SEARCH_OPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("SearchOption", org.apache.thrift.protocol.TType.I32, (short)1);
  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)2);
  private static final org.apache.thrift.protocol.TField BEGIN_AGE_FIELD_DESC = new org.apache.thrift.protocol.TField("beginAge", org.apache.thrift.protocol.TType.I32, (short)3);
  private static final org.apache.thrift.protocol.TField CONSTELLATION_FIELD_DESC = new org.apache.thrift.protocol.TField("constellation", org.apache.thrift.protocol.TType.STRING, (short)4);
  private static final org.apache.thrift.protocol.TField CONSTELLATION_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("constellationString", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField PROFESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("profession", org.apache.thrift.protocol.TType.STRING, (short)6);
  private static final org.apache.thrift.protocol.TField PROFESSION_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("professionString", org.apache.thrift.protocol.TType.STRING, (short)7);
  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)8);
  private static final org.apache.thrift.protocol.TField NATIVE_PLACE_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("nativePlaceString", org.apache.thrift.protocol.TType.STRING, (short)9);
  private static final org.apache.thrift.protocol.TField BELIFE_FIELD_DESC = new org.apache.thrift.protocol.TField("belife", org.apache.thrift.protocol.TType.STRING, (short)10);
  private static final org.apache.thrift.protocol.TField BELIFE_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("belifeString", org.apache.thrift.protocol.TType.STRING, (short)11);
  private static final org.apache.thrift.protocol.TField YEAR_OF_BIRTH_FIELD_DESC = new org.apache.thrift.protocol.TField("yearOfBirth", org.apache.thrift.protocol.TType.STRING, (short)12);
  private static final org.apache.thrift.protocol.TField YEAR_OF_BIRTH_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("yearOfBirthString", org.apache.thrift.protocol.TType.STRING, (short)13);
  private static final org.apache.thrift.protocol.TField END_AGE_FIELD_DESC = new org.apache.thrift.protocol.TField("endAge", org.apache.thrift.protocol.TType.I32, (short)14);
  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)15);
  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)16);
  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)17);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SearchParamStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SearchParamTupleSchemeFactory();

  public SearchOptionEnum SearchOption; // required
  public SexTypeEnum sex; // required
  public int beginAge; // required
  public String constellation; // required
  public String constellationString; // required
  public String profession; // required
  public String professionString; // required
  public String nativePlace; // required
  public String nativePlaceString; // required
  public String belife; // required
  public String belifeString; // required
  public String yearOfBirth; // required
  public String yearOfBirthString; // required
  public int endAge; // required
  public String nickName; // required
  public int pageIndex; // required
  public int pageSize; // 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 {
    SEARCH_OPTION((short)1, "SearchOption"),
    SEX((short)2, "sex"),
    BEGIN_AGE((short)3, "beginAge"),
    CONSTELLATION((short)4, "constellation"),
    CONSTELLATION_STRING((short)5, "constellationString"),
    PROFESSION((short)6, "profession"),
    PROFESSION_STRING((short)7, "professionString"),
    NATIVE_PLACE((short)8, "nativePlace"),
    NATIVE_PLACE_STRING((short)9, "nativePlaceString"),
    BELIFE((short)10, "belife"),
    BELIFE_STRING((short)11, "belifeString"),
    YEAR_OF_BIRTH((short)12, "yearOfBirth"),
    YEAR_OF_BIRTH_STRING((short)13, "yearOfBirthString"),
    END_AGE((short)14, "endAge"),
    NICK_NAME((short)15, "nickName"),
    PAGE_INDEX((short)16, "pageIndex"),
    PAGE_SIZE((short)17, "pageSize");

    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: // SEARCH_OPTION
          return SEARCH_OPTION;
        case 2: // SEX
          return SEX;
        case 3: // BEGIN_AGE
          return BEGIN_AGE;
        case 4: // CONSTELLATION
          return CONSTELLATION;
        case 5: // CONSTELLATION_STRING
          return CONSTELLATION_STRING;
        case 6: // PROFESSION
          return PROFESSION;
        case 7: // PROFESSION_STRING
          return PROFESSION_STRING;
        case 8: // NATIVE_PLACE
          return NATIVE_PLACE;
        case 9: // NATIVE_PLACE_STRING
          return NATIVE_PLACE_STRING;
        case 10: // BELIFE
          return BELIFE;
        case 11: // BELIFE_STRING
          return BELIFE_STRING;
        case 12: // YEAR_OF_BIRTH
          return YEAR_OF_BIRTH;
        case 13: // YEAR_OF_BIRTH_STRING
          return YEAR_OF_BIRTH_STRING;
        case 14: // END_AGE
          return END_AGE;
        case 15: // NICK_NAME
          return NICK_NAME;
        case 16: // PAGE_INDEX
          return PAGE_INDEX;
        case 17: // PAGE_SIZE
          return PAGE_SIZE;
        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 __BEGINAGE_ISSET_ID = 0;
  private static final int __ENDAGE_ISSET_ID = 1;
  private static final int __PAGEINDEX_ISSET_ID = 2;
  private static final int __PAGESIZE_ISSET_ID = 3;
  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.SEARCH_OPTION, new org.apache.thrift.meta_data.FieldMetaData("SearchOption", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.ENUM        , "SearchOptionEnum")));
    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.BEGIN_AGE, new org.apache.thrift.meta_data.FieldMetaData("beginAge", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.CONSTELLATION, new org.apache.thrift.meta_data.FieldMetaData("constellation", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.CONSTELLATION_STRING, new org.apache.thrift.meta_data.FieldMetaData("constellationString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PROFESSION, new org.apache.thrift.meta_data.FieldMetaData("profession", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.PROFESSION_STRING, new org.apache.thrift.meta_data.FieldMetaData("professionString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    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)));
    tmpMap.put(_Fields.NATIVE_PLACE_STRING, new org.apache.thrift.meta_data.FieldMetaData("nativePlaceString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.BELIFE, new org.apache.thrift.meta_data.FieldMetaData("belife", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.BELIFE_STRING, new org.apache.thrift.meta_data.FieldMetaData("belifeString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.YEAR_OF_BIRTH, new org.apache.thrift.meta_data.FieldMetaData("yearOfBirth", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.YEAR_OF_BIRTH_STRING, new org.apache.thrift.meta_data.FieldMetaData("yearOfBirthString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.END_AGE, new org.apache.thrift.meta_data.FieldMetaData("endAge", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    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.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)));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SearchParam.class, metaDataMap);
  }

  public SearchParam() {
  }

  public SearchParam(
    SearchOptionEnum SearchOption,
    SexTypeEnum sex,
    int beginAge,
    String constellation,
    String constellationString,
    String profession,
    String professionString,
    String nativePlace,
    String nativePlaceString,
    String belife,
    String belifeString,
    String yearOfBirth,
    String yearOfBirthString,
    int endAge,
    String nickName,
    int pageIndex,
    int pageSize)
  {
    this();
    this.SearchOption = SearchOption;
    this.sex = sex;
    this.beginAge = beginAge;
    setBeginAgeIsSet(true);
    this.constellation = constellation;
    this.constellationString = constellationString;
    this.profession = profession;
    this.professionString = professionString;
    this.nativePlace = nativePlace;
    this.nativePlaceString = nativePlaceString;
    this.belife = belife;
    this.belifeString = belifeString;
    this.yearOfBirth = yearOfBirth;
    this.yearOfBirthString = yearOfBirthString;
    this.endAge = endAge;
    setEndAgeIsSet(true);
    this.nickName = nickName;
    this.pageIndex = pageIndex;
    setPageIndexIsSet(true);
    this.pageSize = pageSize;
    setPageSizeIsSet(true);
  }

  /**
   * Performs a deep copy on other.
   */
  public SearchParam(SearchParam other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetSearchOption()) {
      this.SearchOption = other.SearchOption;
    }
    if (other.isSetSex()) {
      this.sex = other.sex;
    }
    this.beginAge = other.beginAge;
    if (other.isSetConstellation()) {
      this.constellation = other.constellation;
    }
    if (other.isSetConstellationString()) {
      this.constellationString = other.constellationString;
    }
    if (other.isSetProfession()) {
      this.profession = other.profession;
    }
    if (other.isSetProfessionString()) {
      this.professionString = other.professionString;
    }
    if (other.isSetNativePlace()) {
      this.nativePlace = other.nativePlace;
    }
    if (other.isSetNativePlaceString()) {
      this.nativePlaceString = other.nativePlaceString;
    }
    if (other.isSetBelife()) {
      this.belife = other.belife;
    }
    if (other.isSetBelifeString()) {
      this.belifeString = other.belifeString;
    }
    if (other.isSetYearOfBirth()) {
      this.yearOfBirth = other.yearOfBirth;
    }
    if (other.isSetYearOfBirthString()) {
      this.yearOfBirthString = other.yearOfBirthString;
    }
    this.endAge = other.endAge;
    if (other.isSetNickName()) {
      this.nickName = other.nickName;
    }
    this.pageIndex = other.pageIndex;
    this.pageSize = other.pageSize;
  }

  public SearchParam deepCopy() {
    return new SearchParam(this);
  }

  @Override
  public void clear() {
    this.SearchOption = null;
    this.sex = null;
    setBeginAgeIsSet(false);
    this.beginAge = 0;
    this.constellation = null;
    this.constellationString = null;
    this.profession = null;
    this.professionString = null;
    this.nativePlace = null;
    this.nativePlaceString = null;
    this.belife = null;
    this.belifeString = null;
    this.yearOfBirth = null;
    this.yearOfBirthString = null;
    setEndAgeIsSet(false);
    this.endAge = 0;
    this.nickName = null;
    setPageIndexIsSet(false);
    this.pageIndex = 0;
    setPageSizeIsSet(false);
    this.pageSize = 0;
  }

  public SearchOptionEnum getSearchOption() {
    return this.SearchOption;
  }

  public SearchParam setSearchOption(SearchOptionEnum SearchOption) {
    this.SearchOption = SearchOption;
    return this;
  }

  public void unsetSearchOption() {
    this.SearchOption = null;
  }

  /** Returns true if field SearchOption is set (has been assigned a value) and false otherwise */
  public boolean isSetSearchOption() {
    return this.SearchOption != null;
  }

  public void setSearchOptionIsSet(boolean value) {
    if (!value) {
      this.SearchOption = null;
    }
  }

  public SexTypeEnum getSex() {
    return this.sex;
  }

  public SearchParam 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 getBeginAge() {
    return this.beginAge;
  }

  public SearchParam setBeginAge(int beginAge) {
    this.beginAge = beginAge;
    setBeginAgeIsSet(true);
    return this;
  }

  public void unsetBeginAge() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BEGINAGE_ISSET_ID);
  }

  /** Returns true if field beginAge is set (has been assigned a value) and false otherwise */
  public boolean isSetBeginAge() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BEGINAGE_ISSET_ID);
  }

  public void setBeginAgeIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BEGINAGE_ISSET_ID, value);
  }

  public String getConstellation() {
    return this.constellation;
  }

  public SearchParam setConstellation(String constellation) {
    this.constellation = constellation;
    return this;
  }

  public void unsetConstellation() {
    this.constellation = null;
  }

  /** Returns true if field constellation is set (has been assigned a value) and false otherwise */
  public boolean isSetConstellation() {
    return this.constellation != null;
  }

  public void setConstellationIsSet(boolean value) {
    if (!value) {
      this.constellation = null;
    }
  }

  public String getConstellationString() {
    return this.constellationString;
  }

  public SearchParam setConstellationString(String constellationString) {
    this.constellationString = constellationString;
    return this;
  }

  public void unsetConstellationString() {
    this.constellationString = null;
  }

  /** Returns true if field constellationString is set (has been assigned a value) and false otherwise */
  public boolean isSetConstellationString() {
    return this.constellationString != null;
  }

  public void setConstellationStringIsSet(boolean value) {
    if (!value) {
      this.constellationString = null;
    }
  }

  public String getProfession() {
    return this.profession;
  }

  public SearchParam setProfession(String profession) {
    this.profession = profession;
    return this;
  }

  public void unsetProfession() {
    this.profession = null;
  }

  /** Returns true if field profession is set (has been assigned a value) and false otherwise */
  public boolean isSetProfession() {
    return this.profession != null;
  }

  public void setProfessionIsSet(boolean value) {
    if (!value) {
      this.profession = null;
    }
  }

  public String getProfessionString() {
    return this.professionString;
  }

  public SearchParam setProfessionString(String professionString) {
    this.professionString = professionString;
    return this;
  }

  public void unsetProfessionString() {
    this.professionString = null;
  }

  /** Returns true if field professionString is set (has been assigned a value) and false otherwise */
  public boolean isSetProfessionString() {
    return this.professionString != null;
  }

  public void setProfessionStringIsSet(boolean value) {
    if (!value) {
      this.professionString = null;
    }
  }

  public String getNativePlace() {
    return this.nativePlace;
  }

  public SearchParam 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 String getNativePlaceString() {
    return this.nativePlaceString;
  }

  public SearchParam setNativePlaceString(String nativePlaceString) {
    this.nativePlaceString = nativePlaceString;
    return this;
  }

  public void unsetNativePlaceString() {
    this.nativePlaceString = null;
  }

  /** Returns true if field nativePlaceString is set (has been assigned a value) and false otherwise */
  public boolean isSetNativePlaceString() {
    return this.nativePlaceString != null;
  }

  public void setNativePlaceStringIsSet(boolean value) {
    if (!value) {
      this.nativePlaceString = null;
    }
  }

  public String getBelife() {
    return this.belife;
  }

  public SearchParam setBelife(String belife) {
    this.belife = belife;
    return this;
  }

  public void unsetBelife() {
    this.belife = null;
  }

  /** Returns true if field belife is set (has been assigned a value) and false otherwise */
  public boolean isSetBelife() {
    return this.belife != null;
  }

  public void setBelifeIsSet(boolean value) {
    if (!value) {
      this.belife = null;
    }
  }

  public String getBelifeString() {
    return this.belifeString;
  }

  public SearchParam setBelifeString(String belifeString) {
    this.belifeString = belifeString;
    return this;
  }

  public void unsetBelifeString() {
    this.belifeString = null;
  }

  /** Returns true if field belifeString is set (has been assigned a value) and false otherwise */
  public boolean isSetBelifeString() {
    return this.belifeString != null;
  }

  public void setBelifeStringIsSet(boolean value) {
    if (!value) {
      this.belifeString = null;
    }
  }

  public String getYearOfBirth() {
    return this.yearOfBirth;
  }

  public SearchParam setYearOfBirth(String yearOfBirth) {
    this.yearOfBirth = yearOfBirth;
    return this;
  }

  public void unsetYearOfBirth() {
    this.yearOfBirth = null;
  }

  /** Returns true if field yearOfBirth is set (has been assigned a value) and false otherwise */
  public boolean isSetYearOfBirth() {
    return this.yearOfBirth != null;
  }

  public void setYearOfBirthIsSet(boolean value) {
    if (!value) {
      this.yearOfBirth = null;
    }
  }

  public String getYearOfBirthString() {
    return this.yearOfBirthString;
  }

  public SearchParam setYearOfBirthString(String yearOfBirthString) {
    this.yearOfBirthString = yearOfBirthString;
    return this;
  }

  public void unsetYearOfBirthString() {
    this.yearOfBirthString = null;
  }

  /** Returns true if field yearOfBirthString is set (has been assigned a value) and false otherwise */
  public boolean isSetYearOfBirthString() {
    return this.yearOfBirthString != null;
  }

  public void setYearOfBirthStringIsSet(boolean value) {
    if (!value) {
      this.yearOfBirthString = null;
    }
  }

  public int getEndAge() {
    return this.endAge;
  }

  public SearchParam setEndAge(int endAge) {
    this.endAge = endAge;
    setEndAgeIsSet(true);
    return this;
  }

  public void unsetEndAge() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDAGE_ISSET_ID);
  }

  /** Returns true if field endAge is set (has been assigned a value) and false otherwise */
  public boolean isSetEndAge() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDAGE_ISSET_ID);
  }

  public void setEndAgeIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDAGE_ISSET_ID, value);
  }

  public String getNickName() {
    return this.nickName;
  }

  public SearchParam 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 int getPageIndex() {
    return this.pageIndex;
  }

  public SearchParam 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 SearchParam 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 void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case SEARCH_OPTION:
      if (value == null) {
        unsetSearchOption();
      } else {
        setSearchOption((SearchOptionEnum)value);
      }
      break;

    case SEX:
      if (value == null) {
        unsetSex();
      } else {
        setSex((SexTypeEnum)value);
      }
      break;

    case BEGIN_AGE:
      if (value == null) {
        unsetBeginAge();
      } else {
        setBeginAge((Integer)value);
      }
      break;

    case CONSTELLATION:
      if (value == null) {
        unsetConstellation();
      } else {
        setConstellation((String)value);
      }
      break;

    case CONSTELLATION_STRING:
      if (value == null) {
        unsetConstellationString();
      } else {
        setConstellationString((String)value);
      }
      break;

    case PROFESSION:
      if (value == null) {
        unsetProfession();
      } else {
        setProfession((String)value);
      }
      break;

    case PROFESSION_STRING:
      if (value == null) {
        unsetProfessionString();
      } else {
        setProfessionString((String)value);
      }
      break;

    case NATIVE_PLACE:
      if (value == null) {
        unsetNativePlace();
      } else {
        setNativePlace((String)value);
      }
      break;

    case NATIVE_PLACE_STRING:
      if (value == null) {
        unsetNativePlaceString();
      } else {
        setNativePlaceString((String)value);
      }
      break;

    case BELIFE:
      if (value == null) {
        unsetBelife();
      } else {
        setBelife((String)value);
      }
      break;

    case BELIFE_STRING:
      if (value == null) {
        unsetBelifeString();
      } else {
        setBelifeString((String)value);
      }
      break;

    case YEAR_OF_BIRTH:
      if (value == null) {
        unsetYearOfBirth();
      } else {
        setYearOfBirth((String)value);
      }
      break;

    case YEAR_OF_BIRTH_STRING:
      if (value == null) {
        unsetYearOfBirthString();
      } else {
        setYearOfBirthString((String)value);
      }
      break;

    case END_AGE:
      if (value == null) {
        unsetEndAge();
      } else {
        setEndAge((Integer)value);
      }
      break;

    case NICK_NAME:
      if (value == null) {
        unsetNickName();
      } else {
        setNickName((String)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;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case SEARCH_OPTION:
      return getSearchOption();

    case SEX:
      return getSex();

    case BEGIN_AGE:
      return getBeginAge();

    case CONSTELLATION:
      return getConstellation();

    case CONSTELLATION_STRING:
      return getConstellationString();

    case PROFESSION:
      return getProfession();

    case PROFESSION_STRING:
      return getProfessionString();

    case NATIVE_PLACE:
      return getNativePlace();

    case NATIVE_PLACE_STRING:
      return getNativePlaceString();

    case BELIFE:
      return getBelife();

    case BELIFE_STRING:
      return getBelifeString();

    case YEAR_OF_BIRTH:
      return getYearOfBirth();

    case YEAR_OF_BIRTH_STRING:
      return getYearOfBirthString();

    case END_AGE:
      return getEndAge();

    case NICK_NAME:
      return getNickName();

    case PAGE_INDEX:
      return getPageIndex();

    case PAGE_SIZE:
      return getPageSize();

    }
    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 SEARCH_OPTION:
      return isSetSearchOption();
    case SEX:
      return isSetSex();
    case BEGIN_AGE:
      return isSetBeginAge();
    case CONSTELLATION:
      return isSetConstellation();
    case CONSTELLATION_STRING:
      return isSetConstellationString();
    case PROFESSION:
      return isSetProfession();
    case PROFESSION_STRING:
      return isSetProfessionString();
    case NATIVE_PLACE:
      return isSetNativePlace();
    case NATIVE_PLACE_STRING:
      return isSetNativePlaceString();
    case BELIFE:
      return isSetBelife();
    case BELIFE_STRING:
      return isSetBelifeString();
    case YEAR_OF_BIRTH:
      return isSetYearOfBirth();
    case YEAR_OF_BIRTH_STRING:
      return isSetYearOfBirthString();
    case END_AGE:
      return isSetEndAge();
    case NICK_NAME:
      return isSetNickName();
    case PAGE_INDEX:
      return isSetPageIndex();
    case PAGE_SIZE:
      return isSetPageSize();
    }
    throw new IllegalStateException();
  }

  @Override
  public boolean equals(Object that) {
    if (that == null)
      return false;
    if (that instanceof SearchParam)
      return this.equals((SearchParam)that);
    return false;
  }

  public boolean equals(SearchParam that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_SearchOption = true && this.isSetSearchOption();
    boolean that_present_SearchOption = true && that.isSetSearchOption();
    if (this_present_SearchOption || that_present_SearchOption) {
      if (!(this_present_SearchOption && that_present_SearchOption))
        return false;
      if (!this.SearchOption.equals(that.SearchOption))
        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_beginAge = true;
    boolean that_present_beginAge = true;
    if (this_present_beginAge || that_present_beginAge) {
      if (!(this_present_beginAge && that_present_beginAge))
        return false;
      if (this.beginAge != that.beginAge)
        return false;
    }

    boolean this_present_constellation = true && this.isSetConstellation();
    boolean that_present_constellation = true && that.isSetConstellation();
    if (this_present_constellation || that_present_constellation) {
      if (!(this_present_constellation && that_present_constellation))
        return false;
      if (!this.constellation.equals(that.constellation))
        return false;
    }

    boolean this_present_constellationString = true && this.isSetConstellationString();
    boolean that_present_constellationString = true && that.isSetConstellationString();
    if (this_present_constellationString || that_present_constellationString) {
      if (!(this_present_constellationString && that_present_constellationString))
        return false;
      if (!this.constellationString.equals(that.constellationString))
        return false;
    }

    boolean this_present_profession = true && this.isSetProfession();
    boolean that_present_profession = true && that.isSetProfession();
    if (this_present_profession || that_present_profession) {
      if (!(this_present_profession && that_present_profession))
        return false;
      if (!this.profession.equals(that.profession))
        return false;
    }

    boolean this_present_professionString = true && this.isSetProfessionString();
    boolean that_present_professionString = true && that.isSetProfessionString();
    if (this_present_professionString || that_present_professionString) {
      if (!(this_present_professionString && that_present_professionString))
        return false;
      if (!this.professionString.equals(that.professionString))
        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;
    }

    boolean this_present_nativePlaceString = true && this.isSetNativePlaceString();
    boolean that_present_nativePlaceString = true && that.isSetNativePlaceString();
    if (this_present_nativePlaceString || that_present_nativePlaceString) {
      if (!(this_present_nativePlaceString && that_present_nativePlaceString))
        return false;
      if (!this.nativePlaceString.equals(that.nativePlaceString))
        return false;
    }

    boolean this_present_belife = true && this.isSetBelife();
    boolean that_present_belife = true && that.isSetBelife();
    if (this_present_belife || that_present_belife) {
      if (!(this_present_belife && that_present_belife))
        return false;
      if (!this.belife.equals(that.belife))
        return false;
    }

    boolean this_present_belifeString = true && this.isSetBelifeString();
    boolean that_present_belifeString = true && that.isSetBelifeString();
    if (this_present_belifeString || that_present_belifeString) {
      if (!(this_present_belifeString && that_present_belifeString))
        return false;
      if (!this.belifeString.equals(that.belifeString))
        return false;
    }

    boolean this_present_yearOfBirth = true && this.isSetYearOfBirth();
    boolean that_present_yearOfBirth = true && that.isSetYearOfBirth();
    if (this_present_yearOfBirth || that_present_yearOfBirth) {
      if (!(this_present_yearOfBirth && that_present_yearOfBirth))
        return false;
      if (!this.yearOfBirth.equals(that.yearOfBirth))
        return false;
    }

    boolean this_present_yearOfBirthString = true && this.isSetYearOfBirthString();
    boolean that_present_yearOfBirthString = true && that.isSetYearOfBirthString();
    if (this_present_yearOfBirthString || that_present_yearOfBirthString) {
      if (!(this_present_yearOfBirthString && that_present_yearOfBirthString))
        return false;
      if (!this.yearOfBirthString.equals(that.yearOfBirthString))
        return false;
    }

    boolean this_present_endAge = true;
    boolean that_present_endAge = true;
    if (this_present_endAge || that_present_endAge) {
      if (!(this_present_endAge && that_present_endAge))
        return false;
      if (this.endAge != that.endAge)
        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_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;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetSearchOption()) ? 131071 : 524287);
    if (isSetSearchOption())
      hashCode = hashCode * 8191 + SearchOption.getValue();

    hashCode = hashCode * 8191 + ((isSetSex()) ? 131071 : 524287);
    if (isSetSex())
      hashCode = hashCode * 8191 + sex.getValue();

    hashCode = hashCode * 8191 + beginAge;

    hashCode = hashCode * 8191 + ((isSetConstellation()) ? 131071 : 524287);
    if (isSetConstellation())
      hashCode = hashCode * 8191 + constellation.hashCode();

    hashCode = hashCode * 8191 + ((isSetConstellationString()) ? 131071 : 524287);
    if (isSetConstellationString())
      hashCode = hashCode * 8191 + constellationString.hashCode();

    hashCode = hashCode * 8191 + ((isSetProfession()) ? 131071 : 524287);
    if (isSetProfession())
      hashCode = hashCode * 8191 + profession.hashCode();

    hashCode = hashCode * 8191 + ((isSetProfessionString()) ? 131071 : 524287);
    if (isSetProfessionString())
      hashCode = hashCode * 8191 + professionString.hashCode();

    hashCode = hashCode * 8191 + ((isSetNativePlace()) ? 131071 : 524287);
    if (isSetNativePlace())
      hashCode = hashCode * 8191 + nativePlace.hashCode();

    hashCode = hashCode * 8191 + ((isSetNativePlaceString()) ? 131071 : 524287);
    if (isSetNativePlaceString())
      hashCode = hashCode * 8191 + nativePlaceString.hashCode();

    hashCode = hashCode * 8191 + ((isSetBelife()) ? 131071 : 524287);
    if (isSetBelife())
      hashCode = hashCode * 8191 + belife.hashCode();

    hashCode = hashCode * 8191 + ((isSetBelifeString()) ? 131071 : 524287);
    if (isSetBelifeString())
      hashCode = hashCode * 8191 + belifeString.hashCode();

    hashCode = hashCode * 8191 + ((isSetYearOfBirth()) ? 131071 : 524287);
    if (isSetYearOfBirth())
      hashCode = hashCode * 8191 + yearOfBirth.hashCode();

    hashCode = hashCode * 8191 + ((isSetYearOfBirthString()) ? 131071 : 524287);
    if (isSetYearOfBirthString())
      hashCode = hashCode * 8191 + yearOfBirthString.hashCode();

    hashCode = hashCode * 8191 + endAge;

    hashCode = hashCode * 8191 + ((isSetNickName()) ? 131071 : 524287);
    if (isSetNickName())
      hashCode = hashCode * 8191 + nickName.hashCode();

    hashCode = hashCode * 8191 + pageIndex;

    hashCode = hashCode * 8191 + pageSize;

    return hashCode;
  }

  @Override
  public int compareTo(SearchParam other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetSearchOption()).compareTo(other.isSetSearchOption());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSearchOption()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.SearchOption, other.SearchOption);
      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(isSetBeginAge()).compareTo(other.isSetBeginAge());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBeginAge()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.beginAge, other.beginAge);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetConstellation()).compareTo(other.isSetConstellation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConstellation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.constellation, other.constellation);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetConstellationString()).compareTo(other.isSetConstellationString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetConstellationString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.constellationString, other.constellationString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProfession()).compareTo(other.isSetProfession());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProfession()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.profession, other.profession);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetProfessionString()).compareTo(other.isSetProfessionString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetProfessionString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.professionString, other.professionString);
      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;
      }
    }
    lastComparison = Boolean.valueOf(isSetNativePlaceString()).compareTo(other.isSetNativePlaceString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNativePlaceString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nativePlaceString, other.nativePlaceString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBelife()).compareTo(other.isSetBelife());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBelife()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.belife, other.belife);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetBelifeString()).compareTo(other.isSetBelifeString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBelifeString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.belifeString, other.belifeString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetYearOfBirth()).compareTo(other.isSetYearOfBirth());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetYearOfBirth()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.yearOfBirth, other.yearOfBirth);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetYearOfBirthString()).compareTo(other.isSetYearOfBirthString());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetYearOfBirthString()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.yearOfBirthString, other.yearOfBirthString);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetEndAge()).compareTo(other.isSetEndAge());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEndAge()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endAge, other.endAge);
      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(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;
      }
    }
    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("SearchParam(");
    boolean first = true;

    sb.append("SearchOption:");
    if (this.SearchOption == null) {
      sb.append("null");
    } else {
      sb.append(this.SearchOption);
    }
    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("beginAge:");
    sb.append(this.beginAge);
    first = false;
    if (!first) sb.append(", ");
    sb.append("constellation:");
    if (this.constellation == null) {
      sb.append("null");
    } else {
      sb.append(this.constellation);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("constellationString:");
    if (this.constellationString == null) {
      sb.append("null");
    } else {
      sb.append(this.constellationString);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("profession:");
    if (this.profession == null) {
      sb.append("null");
    } else {
      sb.append(this.profession);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("professionString:");
    if (this.professionString == null) {
      sb.append("null");
    } else {
      sb.append(this.professionString);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("nativePlace:");
    if (this.nativePlace == null) {
      sb.append("null");
    } else {
      sb.append(this.nativePlace);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("nativePlaceString:");
    if (this.nativePlaceString == null) {
      sb.append("null");
    } else {
      sb.append(this.nativePlaceString);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("belife:");
    if (this.belife == null) {
      sb.append("null");
    } else {
      sb.append(this.belife);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("belifeString:");
    if (this.belifeString == null) {
      sb.append("null");
    } else {
      sb.append(this.belifeString);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("yearOfBirth:");
    if (this.yearOfBirth == null) {
      sb.append("null");
    } else {
      sb.append(this.yearOfBirth);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("yearOfBirthString:");
    if (this.yearOfBirthString == null) {
      sb.append("null");
    } else {
      sb.append(this.yearOfBirthString);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("endAge:");
    sb.append(this.endAge);
    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("pageIndex:");
    sb.append(this.pageIndex);
    first = false;
    if (!first) sb.append(", ");
    sb.append("pageSize:");
    sb.append(this.pageSize);
    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 SearchParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public SearchParamStandardScheme getScheme() {
      return new SearchParamStandardScheme();
    }
  }

  private static class SearchParamStandardScheme extends org.apache.thrift.scheme.StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, SearchParam 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: // SEARCH_OPTION
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.SearchOption = cicada.userdriver.config.SearchOptionEnum.findByValue(iprot.readI32());
              struct.setSearchOptionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SEX
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.sex = cicada.userdriver.config.SexTypeEnum.findByValue(iprot.readI32());
              struct.setSexIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // BEGIN_AGE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.beginAge = iprot.readI32();
              struct.setBeginAgeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // CONSTELLATION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.constellation = iprot.readString();
              struct.setConstellationIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // CONSTELLATION_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.constellationString = iprot.readString();
              struct.setConstellationStringIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // PROFESSION
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.profession = iprot.readString();
              struct.setProfessionIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // PROFESSION_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.professionString = iprot.readString();
              struct.setProfessionStringIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // 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;
          case 9: // NATIVE_PLACE_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.nativePlaceString = iprot.readString();
              struct.setNativePlaceStringIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // BELIFE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.belife = iprot.readString();
              struct.setBelifeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // BELIFE_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.belifeString = iprot.readString();
              struct.setBelifeStringIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // YEAR_OF_BIRTH
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.yearOfBirth = iprot.readString();
              struct.setYearOfBirthIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // YEAR_OF_BIRTH_STRING
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.yearOfBirthString = iprot.readString();
              struct.setYearOfBirthStringIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 14: // END_AGE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.endAge = iprot.readI32();
              struct.setEndAgeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 15: // 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 16: // 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 17: // 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;
          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, SearchParam struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.SearchOption != null) {
        oprot.writeFieldBegin(SEARCH_OPTION_FIELD_DESC);
        oprot.writeI32(struct.SearchOption.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.sex != null) {
        oprot.writeFieldBegin(SEX_FIELD_DESC);
        oprot.writeI32(struct.sex.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(BEGIN_AGE_FIELD_DESC);
      oprot.writeI32(struct.beginAge);
      oprot.writeFieldEnd();
      if (struct.constellation != null) {
        oprot.writeFieldBegin(CONSTELLATION_FIELD_DESC);
        oprot.writeString(struct.constellation);
        oprot.writeFieldEnd();
      }
      if (struct.constellationString != null) {
        oprot.writeFieldBegin(CONSTELLATION_STRING_FIELD_DESC);
        oprot.writeString(struct.constellationString);
        oprot.writeFieldEnd();
      }
      if (struct.profession != null) {
        oprot.writeFieldBegin(PROFESSION_FIELD_DESC);
        oprot.writeString(struct.profession);
        oprot.writeFieldEnd();
      }
      if (struct.professionString != null) {
        oprot.writeFieldBegin(PROFESSION_STRING_FIELD_DESC);
        oprot.writeString(struct.professionString);
        oprot.writeFieldEnd();
      }
      if (struct.nativePlace != null) {
        oprot.writeFieldBegin(NATIVE_PLACE_FIELD_DESC);
        oprot.writeString(struct.nativePlace);
        oprot.writeFieldEnd();
      }
      if (struct.nativePlaceString != null) {
        oprot.writeFieldBegin(NATIVE_PLACE_STRING_FIELD_DESC);
        oprot.writeString(struct.nativePlaceString);
        oprot.writeFieldEnd();
      }
      if (struct.belife != null) {
        oprot.writeFieldBegin(BELIFE_FIELD_DESC);
        oprot.writeString(struct.belife);
        oprot.writeFieldEnd();
      }
      if (struct.belifeString != null) {
        oprot.writeFieldBegin(BELIFE_STRING_FIELD_DESC);
        oprot.writeString(struct.belifeString);
        oprot.writeFieldEnd();
      }
      if (struct.yearOfBirth != null) {
        oprot.writeFieldBegin(YEAR_OF_BIRTH_FIELD_DESC);
        oprot.writeString(struct.yearOfBirth);
        oprot.writeFieldEnd();
      }
      if (struct.yearOfBirthString != null) {
        oprot.writeFieldBegin(YEAR_OF_BIRTH_STRING_FIELD_DESC);
        oprot.writeString(struct.yearOfBirthString);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(END_AGE_FIELD_DESC);
      oprot.writeI32(struct.endAge);
      oprot.writeFieldEnd();
      if (struct.nickName != null) {
        oprot.writeFieldBegin(NICK_NAME_FIELD_DESC);
        oprot.writeString(struct.nickName);
        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();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class SearchParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    public SearchParamTupleScheme getScheme() {
      return new SearchParamTupleScheme();
    }
  }

  private static class SearchParamTupleScheme extends org.apache.thrift.scheme.TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, SearchParam 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.isSetSearchOption()) {
        optionals.set(0);
      }
      if (struct.isSetSex()) {
        optionals.set(1);
      }
      if (struct.isSetBeginAge()) {
        optionals.set(2);
      }
      if (struct.isSetConstellation()) {
        optionals.set(3);
      }
      if (struct.isSetConstellationString()) {
        optionals.set(4);
      }
      if (struct.isSetProfession()) {
        optionals.set(5);
      }
      if (struct.isSetProfessionString()) {
        optionals.set(6);
      }
      if (struct.isSetNativePlace()) {
        optionals.set(7);
      }
      if (struct.isSetNativePlaceString()) {
        optionals.set(8);
      }
      if (struct.isSetBelife()) {
        optionals.set(9);
      }
      if (struct.isSetBelifeString()) {
        optionals.set(10);
      }
      if (struct.isSetYearOfBirth()) {
        optionals.set(11);
      }
      if (struct.isSetYearOfBirthString()) {
        optionals.set(12);
      }
      if (struct.isSetEndAge()) {
        optionals.set(13);
      }
      if (struct.isSetNickName()) {
        optionals.set(14);
      }
      if (struct.isSetPageIndex()) {
        optionals.set(15);
      }
      if (struct.isSetPageSize()) {
        optionals.set(16);
      }
      oprot.writeBitSet(optionals, 17);
      if (struct.isSetSearchOption()) {
        oprot.writeI32(struct.SearchOption.getValue());
      }
      if (struct.isSetSex()) {
        oprot.writeI32(struct.sex.getValue());
      }
      if (struct.isSetBeginAge()) {
        oprot.writeI32(struct.beginAge);
      }
      if (struct.isSetConstellation()) {
        oprot.writeString(struct.constellation);
      }
      if (struct.isSetConstellationString()) {
        oprot.writeString(struct.constellationString);
      }
      if (struct.isSetProfession()) {
        oprot.writeString(struct.profession);
      }
      if (struct.isSetProfessionString()) {
        oprot.writeString(struct.professionString);
      }
      if (struct.isSetNativePlace()) {
        oprot.writeString(struct.nativePlace);
      }
      if (struct.isSetNativePlaceString()) {
        oprot.writeString(struct.nativePlaceString);
      }
      if (struct.isSetBelife()) {
        oprot.writeString(struct.belife);
      }
      if (struct.isSetBelifeString()) {
        oprot.writeString(struct.belifeString);
      }
      if (struct.isSetYearOfBirth()) {
        oprot.writeString(struct.yearOfBirth);
      }
      if (struct.isSetYearOfBirthString()) {
        oprot.writeString(struct.yearOfBirthString);
      }
      if (struct.isSetEndAge()) {
        oprot.writeI32(struct.endAge);
      }
      if (struct.isSetNickName()) {
        oprot.writeString(struct.nickName);
      }
      if (struct.isSetPageIndex()) {
        oprot.writeI32(struct.pageIndex);
      }
      if (struct.isSetPageSize()) {
        oprot.writeI32(struct.pageSize);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, SearchParam struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(17);
      if (incoming.get(0)) {
        struct.SearchOption = cicada.userdriver.config.SearchOptionEnum.findByValue(iprot.readI32());
        struct.setSearchOptionIsSet(true);
      }
      if (incoming.get(1)) {
        struct.sex = cicada.userdriver.config.SexTypeEnum.findByValue(iprot.readI32());
        struct.setSexIsSet(true);
      }
      if (incoming.get(2)) {
        struct.beginAge = iprot.readI32();
        struct.setBeginAgeIsSet(true);
      }
      if (incoming.get(3)) {
        struct.constellation = iprot.readString();
        struct.setConstellationIsSet(true);
      }
      if (incoming.get(4)) {
        struct.constellationString = iprot.readString();
        struct.setConstellationStringIsSet(true);
      }
      if (incoming.get(5)) {
        struct.profession = iprot.readString();
        struct.setProfessionIsSet(true);
      }
      if (incoming.get(6)) {
        struct.professionString = iprot.readString();
        struct.setProfessionStringIsSet(true);
      }
      if (incoming.get(7)) {
        struct.nativePlace = iprot.readString();
        struct.setNativePlaceIsSet(true);
      }
      if (incoming.get(8)) {
        struct.nativePlaceString = iprot.readString();
        struct.setNativePlaceStringIsSet(true);
      }
      if (incoming.get(9)) {
        struct.belife = iprot.readString();
        struct.setBelifeIsSet(true);
      }
      if (incoming.get(10)) {
        struct.belifeString = iprot.readString();
        struct.setBelifeStringIsSet(true);
      }
      if (incoming.get(11)) {
        struct.yearOfBirth = iprot.readString();
        struct.setYearOfBirthIsSet(true);
      }
      if (incoming.get(12)) {
        struct.yearOfBirthString = iprot.readString();
        struct.setYearOfBirthStringIsSet(true);
      }
      if (incoming.get(13)) {
        struct.endAge = iprot.readI32();
        struct.setEndAgeIsSet(true);
      }
      if (incoming.get(14)) {
        struct.nickName = iprot.readString();
        struct.setNickNameIsSet(true);
      }
      if (incoming.get(15)) {
        struct.pageIndex = iprot.readI32();
        struct.setPageIndexIsSet(true);
      }
      if (incoming.get(16)) {
        struct.pageSize = iprot.readI32();
        struct.setPageSizeIsSet(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 - 2024 Weber Informatics LLC | Privacy Policy