Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
everything.Universe Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (1.0.0-dev)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package everything;
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", "unused"})
@Generated(value = "Autogenerated by Thrift Compiler (1.0.0-dev)", date = "2016-02-10")
public class Universe {
/**
* this service has some documentation
*/
public interface Iface extends another.Metaverse.Iface {
public int grok(Everything everything) throws EndOfTheUniverseException, org.apache.thrift.TException;
/**
* this is oneway so should have a void result
*/
public void sendIt() throws org.apache.thrift.TException;
public Everything bang(int fortyTwo) throws org.apache.thrift.TException;
}
public interface AsyncIface extends another.Metaverse .AsyncIface {
public void grok(Everything everything, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void sendIt(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
public void bang(int fortyTwo, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends another.Metaverse.Client implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory {
public Factory() {}
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
public Client(org.apache.thrift.protocol.TProtocol prot)
{
super(prot, prot);
}
public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
public int grok(Everything everything) throws EndOfTheUniverseException, org.apache.thrift.TException
{
send_grok(everything);
return recv_grok();
}
public void send_grok(Everything everything) throws org.apache.thrift.TException
{
grok_args args = new grok_args();
args.setEverything(everything);
sendBase("grok", args);
}
public int recv_grok() throws EndOfTheUniverseException, org.apache.thrift.TException
{
grok_result result = new grok_result();
receiveBase(result, "grok");
if (result.isSetSuccess()) {
return result.success;
}
if (result.endOfIt != null) {
throw result.endOfIt;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "grok failed: unknown result");
}
public void sendIt() throws org.apache.thrift.TException
{
send_sendIt();
}
public void send_sendIt() throws org.apache.thrift.TException
{
sendIt_args args = new sendIt_args();
sendBaseOneway("sendIt", args);
}
public Everything bang(int fortyTwo) throws org.apache.thrift.TException
{
send_bang(fortyTwo);
return recv_bang();
}
public void send_bang(int fortyTwo) throws org.apache.thrift.TException
{
bang_args args = new bang_args();
args.setFortyTwo(fortyTwo);
sendBase("bang", args);
}
public Everything recv_bang() throws org.apache.thrift.TException
{
bang_result result = new bang_result();
receiveBase(result, "bang");
if (result.isSetSuccess()) {
return result.success;
}
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "bang failed: unknown result");
}
}
public static class AsyncClient extends another.Metaverse.AsyncClient implements AsyncIface {
public static class Factory implements org.apache.thrift.async.TAsyncClientFactory {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
public void grok(Everything everything, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
grok_call method_call = new grok_call(everything, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class grok_call extends org.apache.thrift.async.TAsyncMethodCall {
private Everything everything;
public grok_call(Everything everything, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.everything = everything;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("grok", org.apache.thrift.protocol.TMessageType.CALL, 0));
grok_args args = new grok_args();
args.setEverything(everything);
args.write(prot);
prot.writeMessageEnd();
}
public int getResult() throws EndOfTheUniverseException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_grok();
}
}
public void sendIt(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
sendIt_call method_call = new sendIt_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class sendIt_call extends org.apache.thrift.async.TAsyncMethodCall {
public sendIt_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, true);
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("sendIt", org.apache.thrift.protocol.TMessageType.ONEWAY, 0));
sendIt_args args = new sendIt_args();
args.write(prot);
prot.writeMessageEnd();
}
public void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
}
}
public void bang(int fortyTwo, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
checkReady();
bang_call method_call = new bang_call(fortyTwo, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class bang_call extends org.apache.thrift.async.TAsyncMethodCall {
private int fortyTwo;
public bang_call(int fortyTwo, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.fortyTwo = fortyTwo;
}
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("bang", org.apache.thrift.protocol.TMessageType.CALL, 0));
bang_args args = new bang_args();
args.setFortyTwo(fortyTwo);
args.write(prot);
prot.writeMessageEnd();
}
public Everything getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_bang();
}
}
}
public static class Processor extends another.Metaverse.Processor implements org.apache.thrift.TProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected Processor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("grok", new grok());
processMap.put("sendIt", new sendIt());
processMap.put("bang", new bang());
return processMap;
}
public static class grok extends org.apache.thrift.ProcessFunction {
public grok() {
super("grok");
}
public grok_args getEmptyArgsInstance() {
return new grok_args();
}
protected boolean isOneway() {
return false;
}
public grok_result getResult(I iface, grok_args args) throws org.apache.thrift.TException {
grok_result result = new grok_result();
try {
result.success = iface.grok(args.everything);
result.setSuccessIsSet(true);
} catch (EndOfTheUniverseException endOfIt) {
result.endOfIt = endOfIt;
}
return result;
}
}
public static class sendIt extends org.apache.thrift.ProcessFunction {
public sendIt() {
super("sendIt");
}
public sendIt_args getEmptyArgsInstance() {
return new sendIt_args();
}
protected boolean isOneway() {
return true;
}
public org.apache.thrift.TBase getResult(I iface, sendIt_args args) throws org.apache.thrift.TException {
iface.sendIt();
return null;
}
}
public static class bang extends org.apache.thrift.ProcessFunction {
public bang() {
super("bang");
}
public bang_args getEmptyArgsInstance() {
return new bang_args();
}
protected boolean isOneway() {
return false;
}
public bang_result getResult(I iface, bang_args args) throws org.apache.thrift.TException {
bang_result result = new bang_result();
result.success = iface.bang(args.fortyTwo);
return result;
}
}
}
public static class AsyncProcessor extends another.Metaverse.AsyncProcessor {
private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
super(iface, getProcessMap(new HashMap>()));
}
protected AsyncProcessor(I iface, Map> processMap) {
super(iface, getProcessMap(processMap));
}
private static Map> getProcessMap(Map> processMap) {
processMap.put("grok", new grok());
processMap.put("sendIt", new sendIt());
processMap.put("bang", new bang());
return processMap;
}
public static class grok extends org.apache.thrift.AsyncProcessFunction {
public grok() {
super("grok");
}
public grok_args getEmptyArgsInstance() {
return new grok_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Integer o) {
grok_result result = new grok_result();
result.success = o;
result.setSuccessIsSet(true);
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
grok_result result = new grok_result();
if (e instanceof EndOfTheUniverseException) {
result.endOfIt = (EndOfTheUniverseException) e;
result.setEndOfItIsSet(true);
msg = result;
}
else
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, grok_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
iface.grok(args.everything,resultHandler);
}
}
public static class sendIt extends org.apache.thrift.AsyncProcessFunction {
public sendIt() {
super("sendIt");
}
public sendIt_args getEmptyArgsInstance() {
return new sendIt_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Void o) {
}
public void onError(Exception e) {
}
};
}
protected boolean isOneway() {
return true;
}
public void start(I iface, sendIt_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
iface.sendIt(resultHandler);
}
}
public static class bang extends org.apache.thrift.AsyncProcessFunction {
public bang() {
super("bang");
}
public bang_args getEmptyArgsInstance() {
return new bang_args();
}
public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new AsyncMethodCallback() {
public void onComplete(Everything o) {
bang_result result = new bang_result();
result.success = o;
try {
fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
return;
} catch (Exception e) {
LOGGER.error("Exception writing to internal frame buffer", e);
}
fb.close();
}
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TBase msg;
bang_result result = new bang_result();
{
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
return;
} catch (Exception ex) {
LOGGER.error("Exception writing to internal frame buffer", ex);
}
fb.close();
}
};
}
protected boolean isOneway() {
return false;
}
public void start(I iface, bang_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException {
iface.bang(args.fortyTwo,resultHandler);
}
}
}
public static class grok_args 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("grok_args");
private static final org.apache.thrift.protocol.TField EVERYTHING_FIELD_DESC = new org.apache.thrift.protocol.TField("everything", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new grok_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new grok_argsTupleSchemeFactory();
public Everything everything; // 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 {
EVERYTHING((short)1, "everything");
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: // EVERYTHING
return EVERYTHING;
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.EVERYTHING, new org.apache.thrift.meta_data.FieldMetaData("everything", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Everything.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grok_args.class, metaDataMap);
}
public grok_args() {
}
public grok_args(
Everything everything)
{
this();
this.everything = everything;
}
/**
* Performs a deep copy on other .
*/
public grok_args(grok_args other) {
if (other.isSetEverything()) {
this.everything = new Everything(other.everything);
}
}
public grok_args deepCopy() {
return new grok_args(this);
}
@Override
public void clear() {
this.everything = null;
}
public Everything getEverything() {
return this.everything;
}
public grok_args setEverything(Everything everything) {
this.everything = everything;
return this;
}
public void unsetEverything() {
this.everything = null;
}
/** Returns true if field everything is set (has been assigned a value) and false otherwise */
public boolean isSetEverything() {
return this.everything != null;
}
public void setEverythingIsSet(boolean value) {
if (!value) {
this.everything = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case EVERYTHING:
if (value == null) {
unsetEverything();
} else {
setEverything((Everything)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case EVERYTHING:
return getEverything();
}
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 EVERYTHING:
return isSetEverything();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof grok_args)
return this.equals((grok_args)that);
return false;
}
public boolean equals(grok_args that) {
if (that == null)
return false;
boolean this_present_everything = true && this.isSetEverything();
boolean that_present_everything = true && that.isSetEverything();
if (this_present_everything || that_present_everything) {
if (!(this_present_everything && that_present_everything))
return false;
if (!this.everything.equals(that.everything))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_everything = true && (isSetEverything());
list.add(present_everything);
if (present_everything)
list.add(everything);
return list.hashCode();
}
@Override
public int compareTo(grok_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetEverything()).compareTo(other.isSetEverything());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEverything()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.everything, other.everything);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("grok_args(");
boolean first = true;
sb.append("everything:");
if (this.everything == null) {
sb.append("null");
} else {
sb.append(this.everything);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (everything != null) {
everything.validate();
}
}
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 grok_argsStandardSchemeFactory implements SchemeFactory {
public grok_argsStandardScheme getScheme() {
return new grok_argsStandardScheme();
}
}
private static class grok_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, grok_args 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: // EVERYTHING
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.everything = new Everything();
struct.everything.read(iprot);
struct.setEverythingIsSet(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, grok_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.everything != null) {
oprot.writeFieldBegin(EVERYTHING_FIELD_DESC);
struct.everything.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class grok_argsTupleSchemeFactory implements SchemeFactory {
public grok_argsTupleScheme getScheme() {
return new grok_argsTupleScheme();
}
}
private static class grok_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, grok_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetEverything()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetEverything()) {
struct.everything.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, grok_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.everything = new Everything();
struct.everything.read(iprot);
struct.setEverythingIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class grok_result 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("grok_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final org.apache.thrift.protocol.TField END_OF_IT_FIELD_DESC = new org.apache.thrift.protocol.TField("endOfIt", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new grok_resultStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new grok_resultTupleSchemeFactory();
public int success; // required
public EndOfTheUniverseException endOfIt; // 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 {
SUCCESS((short)0, "success"),
END_OF_IT((short)1, "endOfIt");
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 0: // SUCCESS
return SUCCESS;
case 1: // END_OF_IT
return END_OF_IT;
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 __SUCCESS_ISSET_ID = 0;
private byte __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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.END_OF_IT, new org.apache.thrift.meta_data.FieldMetaData("endOfIt", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, EndOfTheUniverseException.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(grok_result.class, metaDataMap);
}
public grok_result() {
}
public grok_result(
int success,
EndOfTheUniverseException endOfIt)
{
this();
this.success = success;
setSuccessIsSet(true);
this.endOfIt = endOfIt;
}
/**
* Performs a deep copy on other .
*/
public grok_result(grok_result other) {
__isset_bitfield = other.__isset_bitfield;
this.success = other.success;
if (other.isSetEndOfIt()) {
this.endOfIt = new EndOfTheUniverseException(other.endOfIt);
}
}
public grok_result deepCopy() {
return new grok_result(this);
}
@Override
public void clear() {
setSuccessIsSet(false);
this.success = 0;
this.endOfIt = null;
}
public int getSuccess() {
return this.success;
}
public grok_result setSuccess(int success) {
this.success = success;
setSuccessIsSet(true);
return this;
}
public void unsetSuccess() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
public EndOfTheUniverseException getEndOfIt() {
return this.endOfIt;
}
public grok_result setEndOfIt(EndOfTheUniverseException endOfIt) {
this.endOfIt = endOfIt;
return this;
}
public void unsetEndOfIt() {
this.endOfIt = null;
}
/** Returns true if field endOfIt is set (has been assigned a value) and false otherwise */
public boolean isSetEndOfIt() {
return this.endOfIt != null;
}
public void setEndOfItIsSet(boolean value) {
if (!value) {
this.endOfIt = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Integer)value);
}
break;
case END_OF_IT:
if (value == null) {
unsetEndOfIt();
} else {
setEndOfIt((EndOfTheUniverseException)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
case END_OF_IT:
return getEndOfIt();
}
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 SUCCESS:
return isSetSuccess();
case END_OF_IT:
return isSetEndOfIt();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof grok_result)
return this.equals((grok_result)that);
return false;
}
public boolean equals(grok_result that) {
if (that == null)
return false;
boolean this_present_success = true;
boolean that_present_success = true;
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (this.success != that.success)
return false;
}
boolean this_present_endOfIt = true && this.isSetEndOfIt();
boolean that_present_endOfIt = true && that.isSetEndOfIt();
if (this_present_endOfIt || that_present_endOfIt) {
if (!(this_present_endOfIt && that_present_endOfIt))
return false;
if (!this.endOfIt.equals(that.endOfIt))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true;
list.add(present_success);
if (present_success)
list.add(success);
boolean present_endOfIt = true && (isSetEndOfIt());
list.add(present_endOfIt);
if (present_endOfIt)
list.add(endOfIt);
return list.hashCode();
}
@Override
public int compareTo(grok_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
lastComparison = Boolean.valueOf(isSetEndOfIt()).compareTo(other.isSetEndOfIt());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetEndOfIt()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endOfIt, other.endOfIt);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("grok_result(");
boolean first = true;
sb.append("success:");
sb.append(this.success);
first = false;
if (!first) sb.append(", ");
sb.append("endOfIt:");
if (this.endOfIt == null) {
sb.append("null");
} else {
sb.append(this.endOfIt);
}
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 grok_resultStandardSchemeFactory implements SchemeFactory {
public grok_resultStandardScheme getScheme() {
return new grok_resultStandardScheme();
}
}
private static class grok_resultStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, grok_result 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 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.success = iprot.readI32();
struct.setSuccessIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 1: // END_OF_IT
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.endOfIt = new EndOfTheUniverseException();
struct.endOfIt.read(iprot);
struct.setEndOfItIsSet(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, grok_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.isSetSuccess()) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
oprot.writeI32(struct.success);
oprot.writeFieldEnd();
}
if (struct.endOfIt != null) {
oprot.writeFieldBegin(END_OF_IT_FIELD_DESC);
struct.endOfIt.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class grok_resultTupleSchemeFactory implements SchemeFactory {
public grok_resultTupleScheme getScheme() {
return new grok_resultTupleScheme();
}
}
private static class grok_resultTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, grok_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
if (struct.isSetEndOfIt()) {
optionals.set(1);
}
oprot.writeBitSet(optionals, 2);
if (struct.isSetSuccess()) {
oprot.writeI32(struct.success);
}
if (struct.isSetEndOfIt()) {
struct.endOfIt.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, grok_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readI32();
struct.setSuccessIsSet(true);
}
if (incoming.get(1)) {
struct.endOfIt = new EndOfTheUniverseException();
struct.endOfIt.read(iprot);
struct.setEndOfItIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class sendIt_args 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("sendIt_args");
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new sendIt_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new sendIt_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
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) {
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;
}
}
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);
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(sendIt_args.class, metaDataMap);
}
public sendIt_args() {
}
/**
* Performs a deep copy on other .
*/
public sendIt_args(sendIt_args other) {
}
public sendIt_args deepCopy() {
return new sendIt_args(this);
}
@Override
public void clear() {
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
}
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) {
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof sendIt_args)
return this.equals((sendIt_args)that);
return false;
}
public boolean equals(sendIt_args that) {
if (that == null)
return false;
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
return list.hashCode();
}
@Override
public int compareTo(sendIt_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("sendIt_args(");
boolean first = true;
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 sendIt_argsStandardSchemeFactory implements SchemeFactory {
public sendIt_argsStandardScheme getScheme() {
return new sendIt_argsStandardScheme();
}
}
private static class sendIt_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, sendIt_args 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) {
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, sendIt_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class sendIt_argsTupleSchemeFactory implements SchemeFactory {
public sendIt_argsTupleScheme getScheme() {
return new sendIt_argsTupleScheme();
}
}
private static class sendIt_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, sendIt_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, sendIt_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class bang_args 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("bang_args");
private static final org.apache.thrift.protocol.TField FORTY_TWO_FIELD_DESC = new org.apache.thrift.protocol.TField("fortyTwo", org.apache.thrift.protocol.TType.I32, (short)1);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new bang_argsStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new bang_argsTupleSchemeFactory();
public int fortyTwo; // 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 {
FORTY_TWO((short)1, "fortyTwo");
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: // FORTY_TWO
return FORTY_TWO;
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 __FORTYTWO_ISSET_ID = 0;
private byte __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.FORTY_TWO, new org.apache.thrift.meta_data.FieldMetaData("fortyTwo", 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(bang_args.class, metaDataMap);
}
public bang_args() {
}
public bang_args(
int fortyTwo)
{
this();
this.fortyTwo = fortyTwo;
setFortyTwoIsSet(true);
}
/**
* Performs a deep copy on other .
*/
public bang_args(bang_args other) {
__isset_bitfield = other.__isset_bitfield;
this.fortyTwo = other.fortyTwo;
}
public bang_args deepCopy() {
return new bang_args(this);
}
@Override
public void clear() {
setFortyTwoIsSet(false);
this.fortyTwo = 0;
}
public int getFortyTwo() {
return this.fortyTwo;
}
public bang_args setFortyTwo(int fortyTwo) {
this.fortyTwo = fortyTwo;
setFortyTwoIsSet(true);
return this;
}
public void unsetFortyTwo() {
__isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FORTYTWO_ISSET_ID);
}
/** Returns true if field fortyTwo is set (has been assigned a value) and false otherwise */
public boolean isSetFortyTwo() {
return EncodingUtils.testBit(__isset_bitfield, __FORTYTWO_ISSET_ID);
}
public void setFortyTwoIsSet(boolean value) {
__isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FORTYTWO_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case FORTY_TWO:
if (value == null) {
unsetFortyTwo();
} else {
setFortyTwo((Integer)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case FORTY_TWO:
return getFortyTwo();
}
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 FORTY_TWO:
return isSetFortyTwo();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof bang_args)
return this.equals((bang_args)that);
return false;
}
public boolean equals(bang_args that) {
if (that == null)
return false;
boolean this_present_fortyTwo = true;
boolean that_present_fortyTwo = true;
if (this_present_fortyTwo || that_present_fortyTwo) {
if (!(this_present_fortyTwo && that_present_fortyTwo))
return false;
if (this.fortyTwo != that.fortyTwo)
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_fortyTwo = true;
list.add(present_fortyTwo);
if (present_fortyTwo)
list.add(fortyTwo);
return list.hashCode();
}
@Override
public int compareTo(bang_args other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetFortyTwo()).compareTo(other.isSetFortyTwo());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetFortyTwo()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fortyTwo, other.fortyTwo);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("bang_args(");
boolean first = true;
sb.append("fortyTwo:");
sb.append(this.fortyTwo);
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 bang_argsStandardSchemeFactory implements SchemeFactory {
public bang_argsStandardScheme getScheme() {
return new bang_argsStandardScheme();
}
}
private static class bang_argsStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, bang_args 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: // FORTY_TWO
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.fortyTwo = iprot.readI32();
struct.setFortyTwoIsSet(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, bang_args struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
oprot.writeFieldBegin(FORTY_TWO_FIELD_DESC);
oprot.writeI32(struct.fortyTwo);
oprot.writeFieldEnd();
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class bang_argsTupleSchemeFactory implements SchemeFactory {
public bang_argsTupleScheme getScheme() {
return new bang_argsTupleScheme();
}
}
private static class bang_argsTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, bang_args struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetFortyTwo()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetFortyTwo()) {
oprot.writeI32(struct.fortyTwo);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, bang_args struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.fortyTwo = iprot.readI32();
struct.setFortyTwoIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
public static class bang_result 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("bang_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final SchemeFactory STANDARD_SCHEME_FACTORY = new bang_resultStandardSchemeFactory();
private static final SchemeFactory TUPLE_SCHEME_FACTORY = new bang_resultTupleSchemeFactory();
public Everything success; // 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 {
SUCCESS((short)0, "success");
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 0: // SUCCESS
return SUCCESS;
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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Everything.class)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(bang_result.class, metaDataMap);
}
public bang_result() {
}
public bang_result(
Everything success)
{
this();
this.success = success;
}
/**
* Performs a deep copy on other .
*/
public bang_result(bang_result other) {
if (other.isSetSuccess()) {
this.success = new Everything(other.success);
}
}
public bang_result deepCopy() {
return new bang_result(this);
}
@Override
public void clear() {
this.success = null;
}
public Everything getSuccess() {
return this.success;
}
public bang_result setSuccess(Everything success) {
this.success = success;
return this;
}
public void unsetSuccess() {
this.success = null;
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
return this.success != null;
}
public void setSuccessIsSet(boolean value) {
if (!value) {
this.success = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
setSuccess((Everything)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
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 SUCCESS:
return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof bang_result)
return this.equals((bang_result)that);
return false;
}
public boolean equals(bang_result that) {
if (that == null)
return false;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
if (!(this_present_success && that_present_success))
return false;
if (!this.success.equals(that.success))
return false;
}
return true;
}
@Override
public int hashCode() {
List list = new ArrayList();
boolean present_success = true && (isSetSuccess());
list.add(present_success);
if (present_success)
list.add(success);
return list.hashCode();
}
@Override
public int compareTo(bang_result other) {
if (!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetSuccess()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
if (lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder("bang_result(");
boolean first = true;
sb.append("success:");
if (this.success == null) {
sb.append("null");
} else {
sb.append(this.success);
}
first = false;
sb.append(")");
return sb.toString();
}
public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (success != null) {
success.validate();
}
}
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 bang_resultStandardSchemeFactory implements SchemeFactory {
public bang_resultStandardScheme getScheme() {
return new bang_resultStandardScheme();
}
}
private static class bang_resultStandardScheme extends StandardScheme {
public void read(org.apache.thrift.protocol.TProtocol iprot, bang_result 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 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.success = new Everything();
struct.success.read(iprot);
struct.setSuccessIsSet(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, bang_result struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
if (struct.success != null) {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
struct.success.write(oprot);
oprot.writeFieldEnd();
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
private static class bang_resultTupleSchemeFactory implements SchemeFactory {
public bang_resultTupleScheme getScheme() {
return new bang_resultTupleScheme();
}
}
private static class bang_resultTupleScheme extends TupleScheme {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, bang_result struct) throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
}
oprot.writeBitSet(optionals, 1);
if (struct.isSetSuccess()) {
struct.success.write(oprot);
}
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, bang_result struct) throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new Everything();
struct.success.read(iprot);
struct.setSuccessIsSet(true);
}
}
}
private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
return (StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}
}