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

tech.aroma.thrift.service.GetBuzzResponse Maven / Gradle / Ivy

Go to download

Part of the Aroma Project. This project contains the Service and Model Definitions. From this the Server and Client interfaces are generated for the Aroma Service.

There is a newer version: 2.2
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package tech.aroma.thrift.service;

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 org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
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 javax.annotation.Generated;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-05-10")
public class GetBuzzResponse 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("GetBuzzResponse");

  private static final org.apache.thrift.protocol.TField FRESH_USERS_FIELD_DESC = new org.apache.thrift.protocol.TField("freshUsers", org.apache.thrift.protocol.TType.LIST, (short)1);
  private static final org.apache.thrift.protocol.TField FRESH_APPLICATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("freshApplications", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField FAILED_HEALTH_CHECKS_FIELD_DESC = new org.apache.thrift.protocol.TField("failedHealthChecks", org.apache.thrift.protocol.TType.LIST, (short)3);
  private static final org.apache.thrift.protocol.TField GENERAL_EVENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("generalEvents", org.apache.thrift.protocol.TType.LIST, (short)4);

  private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
  static {
    schemes.put(StandardScheme.class, new GetBuzzResponseStandardSchemeFactory());
    schemes.put(TupleScheme.class, new GetBuzzResponseTupleSchemeFactory());
  }

  public List freshUsers; // required
  public List freshApplications; // required
  public List failedHealthChecks; // required
  /**
   * General events happening lately
   */
  public List generalEvents; // 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 {
    FRESH_USERS((short)1, "freshUsers"),
    FRESH_APPLICATIONS((short)2, "freshApplications"),
    FAILED_HEALTH_CHECKS((short)3, "failedHealthChecks"),
    /**
     * General events happening lately
     */
    GENERAL_EVENTS((short)4, "generalEvents");

    private static final Map byName = new HashMap();

    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: // FRESH_USERS
          return FRESH_USERS;
        case 2: // FRESH_APPLICATIONS
          return FRESH_APPLICATIONS;
        case 3: // FAILED_HEALTH_CHECKS
          return FAILED_HEALTH_CHECKS;
        case 4: // GENERAL_EVENTS
          return GENERAL_EVENTS;
        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
  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.FRESH_USERS, new org.apache.thrift.meta_data.FieldMetaData("freshUsers", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT            , "User"))));
    tmpMap.put(_Fields.FRESH_APPLICATIONS, new org.apache.thrift.meta_data.FieldMetaData("freshApplications", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT            , "Application"))));
    tmpMap.put(_Fields.FAILED_HEALTH_CHECKS, new org.apache.thrift.meta_data.FieldMetaData("failedHealthChecks", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT            , "HealthCheckFailed"))));
    tmpMap.put(_Fields.GENERAL_EVENTS, new org.apache.thrift.meta_data.FieldMetaData("generalEvents", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, tech.aroma.thrift.events.Event.class))));
    metaDataMap = Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GetBuzzResponse.class, metaDataMap);
  }

  public GetBuzzResponse() {
    this.freshUsers = new ArrayList();

    this.freshApplications = new ArrayList();

    this.failedHealthChecks = new ArrayList();

    this.generalEvents = new ArrayList();

  }

  public GetBuzzResponse(
    List freshUsers,
    List freshApplications,
    List failedHealthChecks,
    List generalEvents)
  {
    this();
    this.freshUsers = freshUsers;
    this.freshApplications = freshApplications;
    this.failedHealthChecks = failedHealthChecks;
    this.generalEvents = generalEvents;
  }

  /**
   * Performs a deep copy on other.
   */
  public GetBuzzResponse(GetBuzzResponse other) {
    if (other.isSetFreshUsers()) {
      List __this__freshUsers = new ArrayList(other.freshUsers.size());
      for (tech.aroma.thrift.User other_element : other.freshUsers) {
        __this__freshUsers.add(other_element);
      }
      this.freshUsers = __this__freshUsers;
    }
    if (other.isSetFreshApplications()) {
      List __this__freshApplications = new ArrayList(other.freshApplications.size());
      for (tech.aroma.thrift.Application other_element : other.freshApplications) {
        __this__freshApplications.add(other_element);
      }
      this.freshApplications = __this__freshApplications;
    }
    if (other.isSetFailedHealthChecks()) {
      List __this__failedHealthChecks = new ArrayList(other.failedHealthChecks.size());
      for (tech.aroma.thrift.events.HealthCheckFailed other_element : other.failedHealthChecks) {
        __this__failedHealthChecks.add(other_element);
      }
      this.failedHealthChecks = __this__failedHealthChecks;
    }
    if (other.isSetGeneralEvents()) {
      List __this__generalEvents = new ArrayList(other.generalEvents.size());
      for (tech.aroma.thrift.events.Event other_element : other.generalEvents) {
        __this__generalEvents.add(new tech.aroma.thrift.events.Event(other_element));
      }
      this.generalEvents = __this__generalEvents;
    }
  }

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

  @Override
  public void clear() {
    this.freshUsers = new ArrayList();

    this.freshApplications = new ArrayList();

    this.failedHealthChecks = new ArrayList();

    this.generalEvents = new ArrayList();

  }

  public int getFreshUsersSize() {
    return (this.freshUsers == null) ? 0 : this.freshUsers.size();
  }

  public java.util.Iterator getFreshUsersIterator() {
    return (this.freshUsers == null) ? null : this.freshUsers.iterator();
  }

  public void addToFreshUsers(tech.aroma.thrift.User elem) {
    if (this.freshUsers == null) {
      this.freshUsers = new ArrayList();
    }
    this.freshUsers.add(elem);
  }

  public List getFreshUsers() {
    return this.freshUsers;
  }

  public GetBuzzResponse setFreshUsers(List freshUsers) {
    this.freshUsers = freshUsers;
    return this;
  }

  public void unsetFreshUsers() {
    this.freshUsers = null;
  }

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

  public void setFreshUsersIsSet(boolean value) {
    if (!value) {
      this.freshUsers = null;
    }
  }

  public int getFreshApplicationsSize() {
    return (this.freshApplications == null) ? 0 : this.freshApplications.size();
  }

  public java.util.Iterator getFreshApplicationsIterator() {
    return (this.freshApplications == null) ? null : this.freshApplications.iterator();
  }

  public void addToFreshApplications(tech.aroma.thrift.Application elem) {
    if (this.freshApplications == null) {
      this.freshApplications = new ArrayList();
    }
    this.freshApplications.add(elem);
  }

  public List getFreshApplications() {
    return this.freshApplications;
  }

  public GetBuzzResponse setFreshApplications(List freshApplications) {
    this.freshApplications = freshApplications;
    return this;
  }

  public void unsetFreshApplications() {
    this.freshApplications = null;
  }

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

  public void setFreshApplicationsIsSet(boolean value) {
    if (!value) {
      this.freshApplications = null;
    }
  }

  public int getFailedHealthChecksSize() {
    return (this.failedHealthChecks == null) ? 0 : this.failedHealthChecks.size();
  }

  public java.util.Iterator getFailedHealthChecksIterator() {
    return (this.failedHealthChecks == null) ? null : this.failedHealthChecks.iterator();
  }

  public void addToFailedHealthChecks(tech.aroma.thrift.events.HealthCheckFailed elem) {
    if (this.failedHealthChecks == null) {
      this.failedHealthChecks = new ArrayList();
    }
    this.failedHealthChecks.add(elem);
  }

  public List getFailedHealthChecks() {
    return this.failedHealthChecks;
  }

  public GetBuzzResponse setFailedHealthChecks(List failedHealthChecks) {
    this.failedHealthChecks = failedHealthChecks;
    return this;
  }

  public void unsetFailedHealthChecks() {
    this.failedHealthChecks = null;
  }

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

  public void setFailedHealthChecksIsSet(boolean value) {
    if (!value) {
      this.failedHealthChecks = null;
    }
  }

  public int getGeneralEventsSize() {
    return (this.generalEvents == null) ? 0 : this.generalEvents.size();
  }

  public java.util.Iterator getGeneralEventsIterator() {
    return (this.generalEvents == null) ? null : this.generalEvents.iterator();
  }

  public void addToGeneralEvents(tech.aroma.thrift.events.Event elem) {
    if (this.generalEvents == null) {
      this.generalEvents = new ArrayList();
    }
    this.generalEvents.add(elem);
  }

  /**
   * General events happening lately
   */
  public List getGeneralEvents() {
    return this.generalEvents;
  }

  /**
   * General events happening lately
   */
  public GetBuzzResponse setGeneralEvents(List generalEvents) {
    this.generalEvents = generalEvents;
    return this;
  }

  public void unsetGeneralEvents() {
    this.generalEvents = null;
  }

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

  public void setGeneralEventsIsSet(boolean value) {
    if (!value) {
      this.generalEvents = null;
    }
  }

  public void setFieldValue(_Fields field, Object value) {
    switch (field) {
    case FRESH_USERS:
      if (value == null) {
        unsetFreshUsers();
      } else {
        setFreshUsers((List)value);
      }
      break;

    case FRESH_APPLICATIONS:
      if (value == null) {
        unsetFreshApplications();
      } else {
        setFreshApplications((List)value);
      }
      break;

    case FAILED_HEALTH_CHECKS:
      if (value == null) {
        unsetFailedHealthChecks();
      } else {
        setFailedHealthChecks((List)value);
      }
      break;

    case GENERAL_EVENTS:
      if (value == null) {
        unsetGeneralEvents();
      } else {
        setGeneralEvents((List)value);
      }
      break;

    }
  }

  public Object getFieldValue(_Fields field) {
    switch (field) {
    case FRESH_USERS:
      return getFreshUsers();

    case FRESH_APPLICATIONS:
      return getFreshApplications();

    case FAILED_HEALTH_CHECKS:
      return getFailedHealthChecks();

    case GENERAL_EVENTS:
      return getGeneralEvents();

    }
    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 FRESH_USERS:
      return isSetFreshUsers();
    case FRESH_APPLICATIONS:
      return isSetFreshApplications();
    case FAILED_HEALTH_CHECKS:
      return isSetFailedHealthChecks();
    case GENERAL_EVENTS:
      return isSetGeneralEvents();
    }
    throw new IllegalStateException();
  }

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

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

    boolean this_present_freshUsers = true && this.isSetFreshUsers();
    boolean that_present_freshUsers = true && that.isSetFreshUsers();
    if (this_present_freshUsers || that_present_freshUsers) {
      if (!(this_present_freshUsers && that_present_freshUsers))
        return false;
      if (!this.freshUsers.equals(that.freshUsers))
        return false;
    }

    boolean this_present_freshApplications = true && this.isSetFreshApplications();
    boolean that_present_freshApplications = true && that.isSetFreshApplications();
    if (this_present_freshApplications || that_present_freshApplications) {
      if (!(this_present_freshApplications && that_present_freshApplications))
        return false;
      if (!this.freshApplications.equals(that.freshApplications))
        return false;
    }

    boolean this_present_failedHealthChecks = true && this.isSetFailedHealthChecks();
    boolean that_present_failedHealthChecks = true && that.isSetFailedHealthChecks();
    if (this_present_failedHealthChecks || that_present_failedHealthChecks) {
      if (!(this_present_failedHealthChecks && that_present_failedHealthChecks))
        return false;
      if (!this.failedHealthChecks.equals(that.failedHealthChecks))
        return false;
    }

    boolean this_present_generalEvents = true && this.isSetGeneralEvents();
    boolean that_present_generalEvents = true && that.isSetGeneralEvents();
    if (this_present_generalEvents || that_present_generalEvents) {
      if (!(this_present_generalEvents && that_present_generalEvents))
        return false;
      if (!this.generalEvents.equals(that.generalEvents))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    List list = new ArrayList();

    boolean present_freshUsers = true && (isSetFreshUsers());
    list.add(present_freshUsers);
    if (present_freshUsers)
      list.add(freshUsers);

    boolean present_freshApplications = true && (isSetFreshApplications());
    list.add(present_freshApplications);
    if (present_freshApplications)
      list.add(freshApplications);

    boolean present_failedHealthChecks = true && (isSetFailedHealthChecks());
    list.add(present_failedHealthChecks);
    if (present_failedHealthChecks)
      list.add(failedHealthChecks);

    boolean present_generalEvents = true && (isSetGeneralEvents());
    list.add(present_generalEvents);
    if (present_generalEvents)
      list.add(generalEvents);

    return list.hashCode();
  }

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

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetFreshUsers()).compareTo(other.isSetFreshUsers());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFreshUsers()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freshUsers, other.freshUsers);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFreshApplications()).compareTo(other.isSetFreshApplications());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFreshApplications()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freshApplications, other.freshApplications);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFailedHealthChecks()).compareTo(other.isSetFailedHealthChecks());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFailedHealthChecks()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.failedHealthChecks, other.failedHealthChecks);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetGeneralEvents()).compareTo(other.isSetGeneralEvents());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGeneralEvents()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.generalEvents, other.generalEvents);
      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("GetBuzzResponse(");
    boolean first = true;

    sb.append("freshUsers:");
    if (this.freshUsers == null) {
      sb.append("null");
    } else {
      sb.append(this.freshUsers);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("freshApplications:");
    if (this.freshApplications == null) {
      sb.append("null");
    } else {
      sb.append(this.freshApplications);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("failedHealthChecks:");
    if (this.failedHealthChecks == null) {
      sb.append("null");
    } else {
      sb.append(this.failedHealthChecks);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("generalEvents:");
    if (this.generalEvents == null) {
      sb.append("null");
    } else {
      sb.append(this.generalEvents);
    }
    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 {
      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 GetBuzzResponseStandardSchemeFactory implements SchemeFactory {
    public GetBuzzResponseStandardScheme getScheme() {
      return new GetBuzzResponseStandardScheme();
    }
  }

  private static class GetBuzzResponseStandardScheme extends StandardScheme {

    public void read(org.apache.thrift.protocol.TProtocol iprot, GetBuzzResponse 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: // FRESH_USERS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
                struct.freshUsers = new ArrayList(_list56.size);
                tech.aroma.thrift.User _elem57;
                for (int _i58 = 0; _i58 < _list56.size; ++_i58)
                {
                  _elem57 = new tech.aroma.thrift.User();
                  _elem57.read(iprot);
                  struct.freshUsers.add(_elem57);
                }
                iprot.readListEnd();
              }
              struct.setFreshUsersIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // FRESH_APPLICATIONS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list59 = iprot.readListBegin();
                struct.freshApplications = new ArrayList(_list59.size);
                tech.aroma.thrift.Application _elem60;
                for (int _i61 = 0; _i61 < _list59.size; ++_i61)
                {
                  _elem60 = new tech.aroma.thrift.Application();
                  _elem60.read(iprot);
                  struct.freshApplications.add(_elem60);
                }
                iprot.readListEnd();
              }
              struct.setFreshApplicationsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // FAILED_HEALTH_CHECKS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
                struct.failedHealthChecks = new ArrayList(_list62.size);
                tech.aroma.thrift.events.HealthCheckFailed _elem63;
                for (int _i64 = 0; _i64 < _list62.size; ++_i64)
                {
                  _elem63 = new tech.aroma.thrift.events.HealthCheckFailed();
                  _elem63.read(iprot);
                  struct.failedHealthChecks.add(_elem63);
                }
                iprot.readListEnd();
              }
              struct.setFailedHealthChecksIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // GENERAL_EVENTS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list65 = iprot.readListBegin();
                struct.generalEvents = new ArrayList(_list65.size);
                tech.aroma.thrift.events.Event _elem66;
                for (int _i67 = 0; _i67 < _list65.size; ++_i67)
                {
                  _elem66 = new tech.aroma.thrift.events.Event();
                  _elem66.read(iprot);
                  struct.generalEvents.add(_elem66);
                }
                iprot.readListEnd();
              }
              struct.setGeneralEventsIsSet(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, GetBuzzResponse struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.freshUsers != null) {
        oprot.writeFieldBegin(FRESH_USERS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.freshUsers.size()));
          for (tech.aroma.thrift.User _iter68 : struct.freshUsers)
          {
            _iter68.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.freshApplications != null) {
        oprot.writeFieldBegin(FRESH_APPLICATIONS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.freshApplications.size()));
          for (tech.aroma.thrift.Application _iter69 : struct.freshApplications)
          {
            _iter69.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.failedHealthChecks != null) {
        oprot.writeFieldBegin(FAILED_HEALTH_CHECKS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.failedHealthChecks.size()));
          for (tech.aroma.thrift.events.HealthCheckFailed _iter70 : struct.failedHealthChecks)
          {
            _iter70.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.generalEvents != null) {
        oprot.writeFieldBegin(GENERAL_EVENTS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.generalEvents.size()));
          for (tech.aroma.thrift.events.Event _iter71 : struct.generalEvents)
          {
            _iter71.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class GetBuzzResponseTupleSchemeFactory implements SchemeFactory {
    public GetBuzzResponseTupleScheme getScheme() {
      return new GetBuzzResponseTupleScheme();
    }
  }

  private static class GetBuzzResponseTupleScheme extends TupleScheme {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, GetBuzzResponse struct) throws org.apache.thrift.TException {
      TTupleProtocol oprot = (TTupleProtocol) prot;
      BitSet optionals = new BitSet();
      if (struct.isSetFreshUsers()) {
        optionals.set(0);
      }
      if (struct.isSetFreshApplications()) {
        optionals.set(1);
      }
      if (struct.isSetFailedHealthChecks()) {
        optionals.set(2);
      }
      if (struct.isSetGeneralEvents()) {
        optionals.set(3);
      }
      oprot.writeBitSet(optionals, 4);
      if (struct.isSetFreshUsers()) {
        {
          oprot.writeI32(struct.freshUsers.size());
          for (tech.aroma.thrift.User _iter72 : struct.freshUsers)
          {
            _iter72.write(oprot);
          }
        }
      }
      if (struct.isSetFreshApplications()) {
        {
          oprot.writeI32(struct.freshApplications.size());
          for (tech.aroma.thrift.Application _iter73 : struct.freshApplications)
          {
            _iter73.write(oprot);
          }
        }
      }
      if (struct.isSetFailedHealthChecks()) {
        {
          oprot.writeI32(struct.failedHealthChecks.size());
          for (tech.aroma.thrift.events.HealthCheckFailed _iter74 : struct.failedHealthChecks)
          {
            _iter74.write(oprot);
          }
        }
      }
      if (struct.isSetGeneralEvents()) {
        {
          oprot.writeI32(struct.generalEvents.size());
          for (tech.aroma.thrift.events.Event _iter75 : struct.generalEvents)
          {
            _iter75.write(oprot);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, GetBuzzResponse struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        {
          org.apache.thrift.protocol.TList _list76 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.freshUsers = new ArrayList(_list76.size);
          tech.aroma.thrift.User _elem77;
          for (int _i78 = 0; _i78 < _list76.size; ++_i78)
          {
            _elem77 = new tech.aroma.thrift.User();
            _elem77.read(iprot);
            struct.freshUsers.add(_elem77);
          }
        }
        struct.setFreshUsersIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TList _list79 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.freshApplications = new ArrayList(_list79.size);
          tech.aroma.thrift.Application _elem80;
          for (int _i81 = 0; _i81 < _list79.size; ++_i81)
          {
            _elem80 = new tech.aroma.thrift.Application();
            _elem80.read(iprot);
            struct.freshApplications.add(_elem80);
          }
        }
        struct.setFreshApplicationsIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TList _list82 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.failedHealthChecks = new ArrayList(_list82.size);
          tech.aroma.thrift.events.HealthCheckFailed _elem83;
          for (int _i84 = 0; _i84 < _list82.size; ++_i84)
          {
            _elem83 = new tech.aroma.thrift.events.HealthCheckFailed();
            _elem83.read(iprot);
            struct.failedHealthChecks.add(_elem83);
          }
        }
        struct.setFailedHealthChecksIsSet(true);
      }
      if (incoming.get(3)) {
        {
          org.apache.thrift.protocol.TList _list85 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.generalEvents = new ArrayList(_list85.size);
          tech.aroma.thrift.events.Event _elem86;
          for (int _i87 = 0; _i87 < _list85.size; ++_i87)
          {
            _elem86 = new tech.aroma.thrift.events.Event();
            _elem86.read(iprot);
            struct.generalEvents.add(_elem86);
          }
        }
        struct.setGeneralEventsIsSet(true);
      }
    }
  }

}