/**
 * Autogenerated by Thrift Compiler (0.9.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package cc.twittertools.thrift.gen;

import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;

import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class TResult implements org.apache.thrift.TBase<TResult, TResult._Fields>, java.io.Serializable, Cloneable {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TResult");

  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
  private static final org.apache.thrift.protocol.TField RSV_FIELD_DESC = new org.apache.thrift.protocol.TField("rsv", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
  private static final org.apache.thrift.protocol.TField SCREEN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("screen_name", org.apache.thrift.protocol.TType.STRING, (short)3);
  private static final org.apache.thrift.protocol.TField EPOCH_FIELD_DESC = new org.apache.thrift.protocol.TField("epoch", org.apache.thrift.protocol.TType.I64, (short)4);
  private static final org.apache.thrift.protocol.TField TEXT_FIELD_DESC = new org.apache.thrift.protocol.TField("text", org.apache.thrift.protocol.TType.STRING, (short)5);
  private static final org.apache.thrift.protocol.TField FOLLOWERS_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("followers_count", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField STATUSES_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("statuses_count", org.apache.thrift.protocol.TType.I32, (short)7);
  private static final org.apache.thrift.protocol.TField LANG_FIELD_DESC = new org.apache.thrift.protocol.TField("lang", org.apache.thrift.protocol.TType.STRING, (short)8);
  private static final org.apache.thrift.protocol.TField IN_REPLY_TO_STATUS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("in_reply_to_status_id", org.apache.thrift.protocol.TType.I64, (short)9);
  private static final org.apache.thrift.protocol.TField IN_REPLY_TO_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("in_reply_to_user_id", org.apache.thrift.protocol.TType.I64, (short)10);
  private static final org.apache.thrift.protocol.TField RETWEETED_STATUS_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("retweeted_status_id", org.apache.thrift.protocol.TType.I64, (short)11);
  private static final org.apache.thrift.protocol.TField RETWEETED_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("retweeted_user_id", org.apache.thrift.protocol.TType.I64, (short)12);
  private static final org.apache.thrift.protocol.TField RETWEETED_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("retweeted_count", org.apache.thrift.protocol.TType.I32, (short)13);

  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new TResultStandardSchemeFactory());
    schemes.put(TupleScheme.class, new TResultTupleSchemeFactory());
  }

  public long id; // required
  public double rsv; // required
  public String screen_name; // required
  public long epoch; // required
  public String text; // required
  public int followers_count; // required
  public int statuses_count; // required
  public String lang; // required
  public long in_reply_to_status_id; // required
  public long in_reply_to_user_id; // required
  public long retweeted_status_id; // required
  public long retweeted_user_id; // required
  public int retweeted_count; // 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 {
    ID((short)1, "id"),
    RSV((short)2, "rsv"),
    SCREEN_NAME((short)3, "screen_name"),
    EPOCH((short)4, "epoch"),
    TEXT((short)5, "text"),
    FOLLOWERS_COUNT((short)6, "followers_count"),
    STATUSES_COUNT((short)7, "statuses_count"),
    LANG((short)8, "lang"),
    IN_REPLY_TO_STATUS_ID((short)9, "in_reply_to_status_id"),
    IN_REPLY_TO_USER_ID((short)10, "in_reply_to_user_id"),
    RETWEETED_STATUS_ID((short)11, "retweeted_status_id"),
    RETWEETED_USER_ID((short)12, "retweeted_user_id"),
    RETWEETED_COUNT((short)13, "retweeted_count");

    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

    static {
      for (_Fields field : 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: // ID
          return ID;
        case 2: // RSV
          return RSV;
        case 3: // SCREEN_NAME
          return SCREEN_NAME;
        case 4: // EPOCH
          return EPOCH;
        case 5: // TEXT
          return TEXT;
        case 6: // FOLLOWERS_COUNT
          return FOLLOWERS_COUNT;
        case 7: // STATUSES_COUNT
          return STATUSES_COUNT;
        case 8: // LANG
          return LANG;
        case 9: // IN_REPLY_TO_STATUS_ID
          return IN_REPLY_TO_STATUS_ID;
        case 10: // IN_REPLY_TO_USER_ID
          return IN_REPLY_TO_USER_ID;
        case 11: // RETWEETED_STATUS_ID
          return RETWEETED_STATUS_ID;
        case 12: // RETWEETED_USER_ID
          return RETWEETED_USER_ID;
        case 13: // RETWEETED_COUNT
          return RETWEETED_COUNT;
        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 __ID_ISSET_ID = 0;
  private static final int __RSV_ISSET_ID = 1;
  private static final int __EPOCH_ISSET_ID = 2;
  private static final int __FOLLOWERS_COUNT_ISSET_ID = 3;
  private static final int __STATUSES_COUNT_ISSET_ID = 4;
  private static final int __IN_REPLY_TO_STATUS_ID_ISSET_ID = 5;
  private static final int __IN_REPLY_TO_USER_ID_ISSET_ID = 6;
  private static final int __RETWEETED_STATUS_ID_ISSET_ID = 7;
  private static final int __RETWEETED_USER_ID_ISSET_ID = 8;
  private static final int __RETWEETED_COUNT_ISSET_ID = 9;
  private short __isset_bitfield = 0;
  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RSV, new org.apache.thrift.meta_data.FieldMetaData("rsv", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
    tmpMap.put(_Fields.SCREEN_NAME, new org.apache.thrift.meta_data.FieldMetaData("screen_name", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.EPOCH, new org.apache.thrift.meta_data.FieldMetaData("epoch", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.TEXT, new org.apache.thrift.meta_data.FieldMetaData("text", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.FOLLOWERS_COUNT, new org.apache.thrift.meta_data.FieldMetaData("followers_count", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.STATUSES_COUNT, new org.apache.thrift.meta_data.FieldMetaData("statuses_count", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.LANG, new org.apache.thrift.meta_data.FieldMetaData("lang", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
    tmpMap.put(_Fields.IN_REPLY_TO_STATUS_ID, new org.apache.thrift.meta_data.FieldMetaData("in_reply_to_status_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.IN_REPLY_TO_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("in_reply_to_user_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RETWEETED_STATUS_ID, new org.apache.thrift.meta_data.FieldMetaData("retweeted_status_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RETWEETED_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("retweeted_user_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
    tmpMap.put(_Fields.RETWEETED_COUNT, new org.apache.thrift.meta_data.FieldMetaData("retweeted_count", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TResult.class, metaDataMap);
  }

  public TResult() {
  }

  public TResult(
    long id,
    double rsv,
    String screen_name,
    long epoch,
    String text,
    int followers_count,
    int statuses_count,
    String lang,
    long in_reply_to_status_id,
    long in_reply_to_user_id,
    long retweeted_status_id,
    long retweeted_user_id,
    int retweeted_count)
  {
    this();
    this.id = id;
    setIdIsSet(true);
    this.rsv = rsv;
    setRsvIsSet(true);
    this.screen_name = screen_name;
    this.epoch = epoch;
    setEpochIsSet(true);
    this.text = text;
    this.followers_count = followers_count;
    setFollowers_countIsSet(true);
    this.statuses_count = statuses_count;
    setStatuses_countIsSet(true);
    this.lang = lang;
    this.in_reply_to_status_id = in_reply_to_status_id;
    setIn_reply_to_status_idIsSet(true);
    this.in_reply_to_user_id = in_reply_to_user_id;
    setIn_reply_to_user_idIsSet(true);
    this.retweeted_status_id = retweeted_status_id;
    setRetweeted_status_idIsSet(true);
    this.retweeted_user_id = retweeted_user_id;
    setRetweeted_user_idIsSet(true);
    this.retweeted_count = retweeted_count;
    setRetweeted_countIsSet(true);
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public TResult(TResult other) {
    __isset_bitfield = other.__isset_bitfield;
    this.id = other.id;
    this.rsv = other.rsv;
    if (other.isSetScreen_name()) {
      this.screen_name = other.screen_name;
    }
    this.epoch = other.epoch;
    if (other.isSetText()) {
      this.text = other.text;
    }
    this.followers_count = other.followers_count;
    this.statuses_count = other.statuses_count;
    if (other.isSetLang()) {
      this.lang = other.lang;
    }
    this.in_reply_to_status_id = other.in_reply_to_status_id;
    this.in_reply_to_user_id = other.in_reply_to_user_id;
    this.retweeted_status_id = other.retweeted_status_id;
    this.retweeted_user_id = other.retweeted_user_id;
    this.retweeted_count = other.retweeted_count;
  }

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

  @Override
  public void clear() {
    setIdIsSet(false);
    this.id = 0;
    setRsvIsSet(false);
    this.rsv = 0.0;
    this.screen_name = null;
    setEpochIsSet(false);
    this.epoch = 0;
    this.text = null;
    setFollowers_countIsSet(false);
    this.followers_count = 0;
    setStatuses_countIsSet(false);
    this.statuses_count = 0;
    this.lang = null;
    setIn_reply_to_status_idIsSet(false);
    this.in_reply_to_status_id = 0;
    setIn_reply_to_user_idIsSet(false);
    this.in_reply_to_user_id = 0;
    setRetweeted_status_idIsSet(false);
    this.retweeted_status_id = 0;
    setRetweeted_user_idIsSet(false);
    this.retweeted_user_id = 0;
    setRetweeted_countIsSet(false);
    this.retweeted_count = 0;
  }

  public long getId() {
    return this.id;
  }

  public TResult setId(long id) {
    this.id = id;
    setIdIsSet(true);
    return this;
  }

  public void unsetId() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
  }

  /** Returns true if field id is set (has been assigned a value) and false otherwise */
  public boolean isSetId() {
    return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
  }

  public void setIdIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
  }

  public double getRsv() {
    return this.rsv;
  }

  public TResult setRsv(double rsv) {
    this.rsv = rsv;
    setRsvIsSet(true);
    return this;
  }

  public void unsetRsv() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RSV_ISSET_ID);
  }

  /** Returns true if field rsv is set (has been assigned a value) and false otherwise */
  public boolean isSetRsv() {
    return EncodingUtils.testBit(__isset_bitfield, __RSV_ISSET_ID);
  }

  public void setRsvIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RSV_ISSET_ID, value);
  }

  public String getScreen_name() {
    return this.screen_name;
  }

  public TResult setScreen_name(String screen_name) {
    this.screen_name = screen_name;
    return this;
  }

  public void unsetScreen_name() {
    this.screen_name = null;
  }

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

  public void setScreen_nameIsSet(boolean value) {
    if (!value) {
      this.screen_name = null;
    }
  }

  public long getEpoch() {
    return this.epoch;
  }

  public TResult setEpoch(long epoch) {
    this.epoch = epoch;
    setEpochIsSet(true);
    return this;
  }

  public void unsetEpoch() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EPOCH_ISSET_ID);
  }

  /** Returns true if field epoch is set (has been assigned a value) and false otherwise */
  public boolean isSetEpoch() {
    return EncodingUtils.testBit(__isset_bitfield, __EPOCH_ISSET_ID);
  }

  public void setEpochIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EPOCH_ISSET_ID, value);
  }

  public String getText() {
    return this.text;
  }

  public TResult setText(String text) {
    this.text = text;
    return this;
  }

  public void unsetText() {
    this.text = null;
  }

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

  public void setTextIsSet(boolean value) {
    if (!value) {
      this.text = null;
    }
  }

  public int getFollowers_count() {
    return this.followers_count;
  }

  public TResult setFollowers_count(int followers_count) {
    this.followers_count = followers_count;
    setFollowers_countIsSet(true);
    return this;
  }

  public void unsetFollowers_count() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FOLLOWERS_COUNT_ISSET_ID);
  }

  /** Returns true if field followers_count is set (has been assigned a value) and false otherwise */
  public boolean isSetFollowers_count() {
    return EncodingUtils.testBit(__isset_bitfield, __FOLLOWERS_COUNT_ISSET_ID);
  }

  public void setFollowers_countIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FOLLOWERS_COUNT_ISSET_ID, value);
  }

  public int getStatuses_count() {
    return this.statuses_count;
  }

  public TResult setStatuses_count(int statuses_count) {
    this.statuses_count = statuses_count;
    setStatuses_countIsSet(true);
    return this;
  }

  public void unsetStatuses_count() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STATUSES_COUNT_ISSET_ID);
  }

  /** Returns true if field statuses_count is set (has been assigned a value) and false otherwise */
  public boolean isSetStatuses_count() {
    return EncodingUtils.testBit(__isset_bitfield, __STATUSES_COUNT_ISSET_ID);
  }

  public void setStatuses_countIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STATUSES_COUNT_ISSET_ID, value);
  }

  public String getLang() {
    return this.lang;
  }

  public TResult setLang(String lang) {
    this.lang = lang;
    return this;
  }

  public void unsetLang() {
    this.lang = null;
  }

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

  public void setLangIsSet(boolean value) {
    if (!value) {
      this.lang = null;
    }
  }

  public long getIn_reply_to_status_id() {
    return this.in_reply_to_status_id;
  }

  public TResult setIn_reply_to_status_id(long in_reply_to_status_id) {
    this.in_reply_to_status_id = in_reply_to_status_id;
    setIn_reply_to_status_idIsSet(true);
    return this;
  }

  public void unsetIn_reply_to_status_id() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IN_REPLY_TO_STATUS_ID_ISSET_ID);
  }

  /** Returns true if field in_reply_to_status_id is set (has been assigned a value) and false otherwise */
  public boolean isSetIn_reply_to_status_id() {
    return EncodingUtils.testBit(__isset_bitfield, __IN_REPLY_TO_STATUS_ID_ISSET_ID);
  }

  public void setIn_reply_to_status_idIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IN_REPLY_TO_STATUS_ID_ISSET_ID, value);
  }

  public long getIn_reply_to_user_id() {
    return this.in_reply_to_user_id;
  }

  public TResult setIn_reply_to_user_id(long in_reply_to_user_id) {
    this.in_reply_to_user_id = in_reply_to_user_id;
    setIn_reply_to_user_idIsSet(true);
    return this;
  }

  public void unsetIn_reply_to_user_id() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __IN_REPLY_TO_USER_ID_ISSET_ID);
  }

  /** Returns true if field in_reply_to_user_id is set (has been assigned a value) and false otherwise */
  public boolean isSetIn_reply_to_user_id() {
    return EncodingUtils.testBit(__isset_bitfield, __IN_REPLY_TO_USER_ID_ISSET_ID);
  }

  public void setIn_reply_to_user_idIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __IN_REPLY_TO_USER_ID_ISSET_ID, value);
  }

  public long getRetweeted_status_id() {
    return this.retweeted_status_id;
  }

  public TResult setRetweeted_status_id(long retweeted_status_id) {
    this.retweeted_status_id = retweeted_status_id;
    setRetweeted_status_idIsSet(true);
    return this;
  }

  public void unsetRetweeted_status_id() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETWEETED_STATUS_ID_ISSET_ID);
  }

  /** Returns true if field retweeted_status_id is set (has been assigned a value) and false otherwise */
  public boolean isSetRetweeted_status_id() {
    return EncodingUtils.testBit(__isset_bitfield, __RETWEETED_STATUS_ID_ISSET_ID);
  }

  public void setRetweeted_status_idIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETWEETED_STATUS_ID_ISSET_ID, value);
  }

  public long getRetweeted_user_id() {
    return this.retweeted_user_id;
  }

  public TResult setRetweeted_user_id(long retweeted_user_id) {
    this.retweeted_user_id = retweeted_user_id;
    setRetweeted_user_idIsSet(true);
    return this;
  }

  public void unsetRetweeted_user_id() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETWEETED_USER_ID_ISSET_ID);
  }

  /** Returns true if field retweeted_user_id is set (has been assigned a value) and false otherwise */
  public boolean isSetRetweeted_user_id() {
    return EncodingUtils.testBit(__isset_bitfield, __RETWEETED_USER_ID_ISSET_ID);
  }

  public void setRetweeted_user_idIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETWEETED_USER_ID_ISSET_ID, value);
  }

  public int getRetweeted_count() {
    return this.retweeted_count;
  }

  public TResult setRetweeted_count(int retweeted_count) {
    this.retweeted_count = retweeted_count;
    setRetweeted_countIsSet(true);
    return this;
  }

  public void unsetRetweeted_count() {
    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETWEETED_COUNT_ISSET_ID);
  }

  /** Returns true if field retweeted_count is set (has been assigned a value) and false otherwise */
  public boolean isSetRetweeted_count() {
    return EncodingUtils.testBit(__isset_bitfield, __RETWEETED_COUNT_ISSET_ID);
  }

  public void setRetweeted_countIsSet(boolean value) {
    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETWEETED_COUNT_ISSET_ID, value);
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case ID:
      if (value == null) {
        unsetId();
      } else {
        setId((Long)value);
      }
      break;

    case RSV:
      if (value == null) {
        unsetRsv();
      } else {
        setRsv((Double)value);
      }
      break;

    case SCREEN_NAME:
      if (value == null) {
        unsetScreen_name();
      } else {
        setScreen_name((String)value);
      }
      break;

    case EPOCH:
      if (value == null) {
        unsetEpoch();
      } else {
        setEpoch((Long)value);
      }
      break;

    case TEXT:
      if (value == null) {
        unsetText();
      } else {
        setText((String)value);
      }
      break;

    case FOLLOWERS_COUNT:
      if (value == null) {
        unsetFollowers_count();
      } else {
        setFollowers_count((Integer)value);
      }
      break;

    case STATUSES_COUNT:
      if (value == null) {
        unsetStatuses_count();
      } else {
        setStatuses_count((Integer)value);
      }
      break;

    case LANG:
      if (value == null) {
        unsetLang();
      } else {
        setLang((String)value);
      }
      break;

    case IN_REPLY_TO_STATUS_ID:
      if (value == null) {
        unsetIn_reply_to_status_id();
      } else {
        setIn_reply_to_status_id((Long)value);
      }
      break;

    case IN_REPLY_TO_USER_ID:
      if (value == null) {
        unsetIn_reply_to_user_id();
      } else {
        setIn_reply_to_user_id((Long)value);
      }
      break;

    case RETWEETED_STATUS_ID:
      if (value == null) {
        unsetRetweeted_status_id();
      } else {
        setRetweeted_status_id((Long)value);
      }
      break;

    case RETWEETED_USER_ID:
      if (value == null) {
        unsetRetweeted_user_id();
      } else {
        setRetweeted_user_id((Long)value);
      }
      break;

    case RETWEETED_COUNT:
      if (value == null) {
        unsetRetweeted_count();
      } else {
        setRetweeted_count((Integer)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case ID:
      return Long.valueOf(getId());

    case RSV:
      return Double.valueOf(getRsv());

    case SCREEN_NAME:
      return getScreen_name();

    case EPOCH:
      return Long.valueOf(getEpoch());

    case TEXT:
      return getText();

    case FOLLOWERS_COUNT:
      return Integer.valueOf(getFollowers_count());

    case STATUSES_COUNT:
      return Integer.valueOf(getStatuses_count());

    case LANG:
      return getLang();

    case IN_REPLY_TO_STATUS_ID:
      return Long.valueOf(getIn_reply_to_status_id());

    case IN_REPLY_TO_USER_ID:
      return Long.valueOf(getIn_reply_to_user_id());

    case RETWEETED_STATUS_ID:
      return Long.valueOf(getRetweeted_status_id());

    case RETWEETED_USER_ID:
      return Long.valueOf(getRetweeted_user_id());

    case RETWEETED_COUNT:
      return Integer.valueOf(getRetweeted_count());

    }
    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 ID:
      return isSetId();
    case RSV:
      return isSetRsv();
    case SCREEN_NAME:
      return isSetScreen_name();
    case EPOCH:
      return isSetEpoch();
    case TEXT:
      return isSetText();
    case FOLLOWERS_COUNT:
      return isSetFollowers_count();
    case STATUSES_COUNT:
      return isSetStatuses_count();
    case LANG:
      return isSetLang();
    case IN_REPLY_TO_STATUS_ID:
      return isSetIn_reply_to_status_id();
    case IN_REPLY_TO_USER_ID:
      return isSetIn_reply_to_user_id();
    case RETWEETED_STATUS_ID:
      return isSetRetweeted_status_id();
    case RETWEETED_USER_ID:
      return isSetRetweeted_user_id();
    case RETWEETED_COUNT:
      return isSetRetweeted_count();
    }
    throw new IllegalStateException();
  }

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

  public boolean equals(TResult that) {
    if (that == null)
      return false;

    boolean this_present_id = true;
    boolean that_present_id = true;
    if (this_present_id || that_present_id) {
      if (!(this_present_id && that_present_id))
        return false;
      if (this.id != that.id)
        return false;
    }

    boolean this_present_rsv = true;
    boolean that_present_rsv = true;
    if (this_present_rsv || that_present_rsv) {
      if (!(this_present_rsv && that_present_rsv))
        return false;
      if (this.rsv != that.rsv)
        return false;
    }

    boolean this_present_screen_name = true && this.isSetScreen_name();
    boolean that_present_screen_name = true && that.isSetScreen_name();
    if (this_present_screen_name || that_present_screen_name) {
      if (!(this_present_screen_name && that_present_screen_name))
        return false;
      if (!this.screen_name.equals(that.screen_name))
        return false;
    }

    boolean this_present_epoch = true;
    boolean that_present_epoch = true;
    if (this_present_epoch || that_present_epoch) {
      if (!(this_present_epoch && that_present_epoch))
        return false;
      if (this.epoch != that.epoch)
        return false;
    }

    boolean this_present_text = true && this.isSetText();
    boolean that_present_text = true && that.isSetText();
    if (this_present_text || that_present_text) {
      if (!(this_present_text && that_present_text))
        return false;
      if (!this.text.equals(that.text))
        return false;
    }

    boolean this_present_followers_count = true;
    boolean that_present_followers_count = true;
    if (this_present_followers_count || that_present_followers_count) {
      if (!(this_present_followers_count && that_present_followers_count))
        return false;
      if (this.followers_count != that.followers_count)
        return false;
    }

    boolean this_present_statuses_count = true;
    boolean that_present_statuses_count = true;
    if (this_present_statuses_count || that_present_statuses_count) {
      if (!(this_present_statuses_count && that_present_statuses_count))
        return false;
      if (this.statuses_count != that.statuses_count)
        return false;
    }

    boolean this_present_lang = true && this.isSetLang();
    boolean that_present_lang = true && that.isSetLang();
    if (this_present_lang || that_present_lang) {
      if (!(this_present_lang && that_present_lang))
        return false;
      if (!this.lang.equals(that.lang))
        return false;
    }

    boolean this_present_in_reply_to_status_id = true;
    boolean that_present_in_reply_to_status_id = true;
    if (this_present_in_reply_to_status_id || that_present_in_reply_to_status_id) {
      if (!(this_present_in_reply_to_status_id && that_present_in_reply_to_status_id))
        return false;
      if (this.in_reply_to_status_id != that.in_reply_to_status_id)
        return false;
    }

    boolean this_present_in_reply_to_user_id = true;
    boolean that_present_in_reply_to_user_id = true;
    if (this_present_in_reply_to_user_id || that_present_in_reply_to_user_id) {
      if (!(this_present_in_reply_to_user_id && that_present_in_reply_to_user_id))
        return false;
      if (this.in_reply_to_user_id != that.in_reply_to_user_id)
        return false;
    }

    boolean this_present_retweeted_status_id = true;
    boolean that_present_retweeted_status_id = true;
    if (this_present_retweeted_status_id || that_present_retweeted_status_id) {
      if (!(this_present_retweeted_status_id && that_present_retweeted_status_id))
        return false;
      if (this.retweeted_status_id != that.retweeted_status_id)
        return false;
    }

    boolean this_present_retweeted_user_id = true;
    boolean that_present_retweeted_user_id = true;
    if (this_present_retweeted_user_id || that_present_retweeted_user_id) {
      if (!(this_present_retweeted_user_id && that_present_retweeted_user_id))
        return false;
      if (this.retweeted_user_id != that.retweeted_user_id)
        return false;
    }

    boolean this_present_retweeted_count = true;
    boolean that_present_retweeted_count = true;
    if (this_present_retweeted_count || that_present_retweeted_count) {
      if (!(this_present_retweeted_count && that_present_retweeted_count))
        return false;
      if (this.retweeted_count != that.retweeted_count)
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    return 0;
  }

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

    int lastComparison = 0;
    TResult typedOther = (TResult)other;

    lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRsv()).compareTo(typedOther.isSetRsv());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRsv()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rsv, typedOther.rsv);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetScreen_name()).compareTo(typedOther.isSetScreen_name());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetScreen_name()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.screen_name, typedOther.screen_name);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetEpoch()).compareTo(typedOther.isSetEpoch());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEpoch()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.epoch, typedOther.epoch);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetText()).compareTo(typedOther.isSetText());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetText()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.text, typedOther.text);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFollowers_count()).compareTo(typedOther.isSetFollowers_count());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFollowers_count()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.followers_count, typedOther.followers_count);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStatuses_count()).compareTo(typedOther.isSetStatuses_count());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStatuses_count()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statuses_count, typedOther.statuses_count);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetLang()).compareTo(typedOther.isSetLang());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetLang()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lang, typedOther.lang);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIn_reply_to_status_id()).compareTo(typedOther.isSetIn_reply_to_status_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIn_reply_to_status_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.in_reply_to_status_id, typedOther.in_reply_to_status_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetIn_reply_to_user_id()).compareTo(typedOther.isSetIn_reply_to_user_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIn_reply_to_user_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.in_reply_to_user_id, typedOther.in_reply_to_user_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRetweeted_status_id()).compareTo(typedOther.isSetRetweeted_status_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRetweeted_status_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retweeted_status_id, typedOther.retweeted_status_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRetweeted_user_id()).compareTo(typedOther.isSetRetweeted_user_id());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRetweeted_user_id()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retweeted_user_id, typedOther.retweeted_user_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetRetweeted_count()).compareTo(typedOther.isSetRetweeted_count());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetRetweeted_count()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retweeted_count, typedOther.retweeted_count);
      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 {
    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
  }

  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder("TResult(");
    boolean first = true;

    sb.append("id:");
    sb.append(this.id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("rsv:");
    sb.append(this.rsv);
    first = false;
    if (!first) sb.append(", ");
    sb.append("screen_name:");
    if (this.screen_name == null) {
      sb.append("null");
    } else {
      sb.append(this.screen_name);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("epoch:");
    sb.append(this.epoch);
    first = false;
    if (!first) sb.append(", ");
    sb.append("text:");
    if (this.text == null) {
      sb.append("null");
    } else {
      sb.append(this.text);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("followers_count:");
    sb.append(this.followers_count);
    first = false;
    if (!first) sb.append(", ");
    sb.append("statuses_count:");
    sb.append(this.statuses_count);
    first = false;
    if (!first) sb.append(", ");
    sb.append("lang:");
    if (this.lang == null) {
      sb.append("null");
    } else {
      sb.append(this.lang);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("in_reply_to_status_id:");
    sb.append(this.in_reply_to_status_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("in_reply_to_user_id:");
    sb.append(this.in_reply_to_user_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("retweeted_status_id:");
    sb.append(this.retweeted_status_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("retweeted_user_id:");
    sb.append(this.retweeted_user_id);
    first = false;
    if (!first) sb.append(", ");
    sb.append("retweeted_count:");
    sb.append(this.retweeted_count);
    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 TResultStandardSchemeFactory implements SchemeFactory {
    public TResultStandardScheme getScheme() {
      return new TResultStandardScheme();
    }
  }

  private static class TResultStandardScheme extends StandardScheme<TResult> {

    public void read(org.apache.thrift.protocol.TProtocol iprot, TResult 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: // ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.id = iprot.readI64();
              struct.setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // RSV
            if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
              struct.rsv = iprot.readDouble();
              struct.setRsvIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // SCREEN_NAME
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.screen_name = iprot.readString();
              struct.setScreen_nameIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // EPOCH
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.epoch = iprot.readI64();
              struct.setEpochIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // TEXT
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.text = iprot.readString();
              struct.setTextIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // FOLLOWERS_COUNT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.followers_count = iprot.readI32();
              struct.setFollowers_countIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // STATUSES_COUNT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.statuses_count = iprot.readI32();
              struct.setStatuses_countIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // LANG
            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
              struct.lang = iprot.readString();
              struct.setLangIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // IN_REPLY_TO_STATUS_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.in_reply_to_status_id = iprot.readI64();
              struct.setIn_reply_to_status_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 10: // IN_REPLY_TO_USER_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.in_reply_to_user_id = iprot.readI64();
              struct.setIn_reply_to_user_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 11: // RETWEETED_STATUS_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.retweeted_status_id = iprot.readI64();
              struct.setRetweeted_status_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 12: // RETWEETED_USER_ID
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.retweeted_user_id = iprot.readI64();
              struct.setRetweeted_user_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 13: // RETWEETED_COUNT
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.retweeted_count = iprot.readI32();
              struct.setRetweeted_countIsSet(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, TResult struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(struct.id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(RSV_FIELD_DESC);
      oprot.writeDouble(struct.rsv);
      oprot.writeFieldEnd();
      if (struct.screen_name != null) {
        oprot.writeFieldBegin(SCREEN_NAME_FIELD_DESC);
        oprot.writeString(struct.screen_name);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(EPOCH_FIELD_DESC);
      oprot.writeI64(struct.epoch);
      oprot.writeFieldEnd();
      if (struct.text != null) {
        oprot.writeFieldBegin(TEXT_FIELD_DESC);
        oprot.writeString(struct.text);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(FOLLOWERS_COUNT_FIELD_DESC);
      oprot.writeI32(struct.followers_count);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(STATUSES_COUNT_FIELD_DESC);
      oprot.writeI32(struct.statuses_count);
      oprot.writeFieldEnd();
      if (struct.lang != null) {
        oprot.writeFieldBegin(LANG_FIELD_DESC);
        oprot.writeString(struct.lang);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(IN_REPLY_TO_STATUS_ID_FIELD_DESC);
      oprot.writeI64(struct.in_reply_to_status_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(IN_REPLY_TO_USER_ID_FIELD_DESC);
      oprot.writeI64(struct.in_reply_to_user_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(RETWEETED_STATUS_ID_FIELD_DESC);
      oprot.writeI64(struct.retweeted_status_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(RETWEETED_USER_ID_FIELD_DESC);
      oprot.writeI64(struct.retweeted_user_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(RETWEETED_COUNT_FIELD_DESC);
      oprot.writeI32(struct.retweeted_count);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class TResultTupleSchemeFactory implements SchemeFactory {
    public TResultTupleScheme getScheme() {
      return new TResultTupleScheme();
    }
  }

  private static class TResultTupleScheme extends TupleScheme<TResult> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TResult struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetId()) {
        optionals.set(0);
      }
      if (struct.isSetRsv()) {
        optionals.set(1);
      }
      if (struct.isSetScreen_name()) {
        optionals.set(2);
      }
      if (struct.isSetEpoch()) {
        optionals.set(3);
      }
      if (struct.isSetText()) {
        optionals.set(4);
      }
      if (struct.isSetFollowers_count()) {
        optionals.set(5);
      }
      if (struct.isSetStatuses_count()) {
        optionals.set(6);
      }
      if (struct.isSetLang()) {
        optionals.set(7);
      }
      if (struct.isSetIn_reply_to_status_id()) {
        optionals.set(8);
      }
      if (struct.isSetIn_reply_to_user_id()) {
        optionals.set(9);
      }
      if (struct.isSetRetweeted_status_id()) {
        optionals.set(10);
      }
      if (struct.isSetRetweeted_user_id()) {
        optionals.set(11);
      }
      if (struct.isSetRetweeted_count()) {
        optionals.set(12);
      }
      oprot.writeBitSet(optionals, 13);
      if (struct.isSetId()) {
        oprot.writeI64(struct.id);
      }
      if (struct.isSetRsv()) {
        oprot.writeDouble(struct.rsv);
      }
      if (struct.isSetScreen_name()) {
        oprot.writeString(struct.screen_name);
      }
      if (struct.isSetEpoch()) {
        oprot.writeI64(struct.epoch);
      }
      if (struct.isSetText()) {
        oprot.writeString(struct.text);
      }
      if (struct.isSetFollowers_count()) {
        oprot.writeI32(struct.followers_count);
      }
      if (struct.isSetStatuses_count()) {
        oprot.writeI32(struct.statuses_count);
      }
      if (struct.isSetLang()) {
        oprot.writeString(struct.lang);
      }
      if (struct.isSetIn_reply_to_status_id()) {
        oprot.writeI64(struct.in_reply_to_status_id);
      }
      if (struct.isSetIn_reply_to_user_id()) {
        oprot.writeI64(struct.in_reply_to_user_id);
      }
      if (struct.isSetRetweeted_status_id()) {
        oprot.writeI64(struct.retweeted_status_id);
      }
      if (struct.isSetRetweeted_user_id()) {
        oprot.writeI64(struct.retweeted_user_id);
      }
      if (struct.isSetRetweeted_count()) {
        oprot.writeI32(struct.retweeted_count);
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TResult struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(13);
      if (incoming.get(0)) {
        struct.id = iprot.readI64();
        struct.setIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.rsv = iprot.readDouble();
        struct.setRsvIsSet(true);
      }
      if (incoming.get(2)) {
        struct.screen_name = iprot.readString();
        struct.setScreen_nameIsSet(true);
      }
      if (incoming.get(3)) {
        struct.epoch = iprot.readI64();
        struct.setEpochIsSet(true);
      }
      if (incoming.get(4)) {
        struct.text = iprot.readString();
        struct.setTextIsSet(true);
      }
      if (incoming.get(5)) {
        struct.followers_count = iprot.readI32();
        struct.setFollowers_countIsSet(true);
      }
      if (incoming.get(6)) {
        struct.statuses_count = iprot.readI32();
        struct.setStatuses_countIsSet(true);
      }
      if (incoming.get(7)) {
        struct.lang = iprot.readString();
        struct.setLangIsSet(true);
      }
      if (incoming.get(8)) {
        struct.in_reply_to_status_id = iprot.readI64();
        struct.setIn_reply_to_status_idIsSet(true);
      }
      if (incoming.get(9)) {
        struct.in_reply_to_user_id = iprot.readI64();
        struct.setIn_reply_to_user_idIsSet(true);
      }
      if (incoming.get(10)) {
        struct.retweeted_status_id = iprot.readI64();
        struct.setRetweeted_status_idIsSet(true);
      }
      if (incoming.get(11)) {
        struct.retweeted_user_id = iprot.readI64();
        struct.setRetweeted_user_idIsSet(true);
      }
      if (incoming.get(12)) {
        struct.retweeted_count = iprot.readI32();
        struct.setRetweeted_countIsSet(true);
      }
    }
  }

}

