
tech.aroma.thrift.service.GetBuzzResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aroma-thrift Show documentation
Show all versions of aroma-thrift Show documentation
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.
/**
* 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
© 2015 - 2025 Weber Informatics LLC | Privacy Policy