/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
import java.util.Collections;
import java.util.BitSet;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.facebook.thrift.*;
import com.facebook.thrift.annotations.*;
import com.facebook.thrift.async.*;
import com.facebook.thrift.meta_data.*;
import com.facebook.thrift.server.*;
import com.facebook.thrift.transport.*;
import com.facebook.thrift.protocol.*;

@SuppressWarnings({ "unused", "serial" })
public class Raiser {

  public interface Iface {

    public void doBland() throws TException;

    public void doRaise() throws Banal, Fiery, Serious, TException;

    public String get200() throws TException;

    public String get500() throws Fiery, Banal, Serious, TException;

  }

  public interface AsyncIface {

    public void doBland(AsyncMethodCallback resultHandler) throws TException;

    public void doRaise(AsyncMethodCallback resultHandler) throws TException;

    public void get200(AsyncMethodCallback resultHandler) throws TException;

    public void get500(AsyncMethodCallback resultHandler) throws TException;

  }

  public static class Client extends EventHandlerBase implements Iface, TClientIf {
    public Client(TProtocol prot)
    {
      this(prot, prot);
    }

    public Client(TProtocol iprot, TProtocol oprot)
    {
      iprot_ = iprot;
      oprot_ = oprot;
    }

    protected TProtocol iprot_;
    protected TProtocol oprot_;

    protected int seqid_;

    @Override
    public TProtocol getInputProtocol()
    {
      return this.iprot_;
    }

    @Override
    public TProtocol getOutputProtocol()
    {
      return this.oprot_;
    }

    public void doBland() throws TException
    {
      ContextStack ctx = getContextStack("Raiser.doBland", null);
      this.setContextStack(ctx);
      send_doBland();
      recv_doBland();
    }

    public void send_doBland() throws TException
    {
      ContextStack ctx = this.getContextStack();
      super.preWrite(ctx, "Raiser.doBland", null);
      oprot_.writeMessageBegin(new TMessage("doBland", TMessageType.CALL, seqid_));
      doBland_args args = new doBland_args();
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
      super.postWrite(ctx, "Raiser.doBland", args);
      return;
    }

    public void recv_doBland() throws TException
    {
      ContextStack ctx = super.getContextStack();
      long bytes;
      TMessageType mtype;
      super.preRead(ctx, "Raiser.doBland");
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      doBland_result result = new doBland_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      super.postRead(ctx, "Raiser.doBland", result);

      return;
    }

    public void doRaise() throws Banal, Fiery, Serious, TException
    {
      ContextStack ctx = getContextStack("Raiser.doRaise", null);
      this.setContextStack(ctx);
      send_doRaise();
      recv_doRaise();
    }

    public void send_doRaise() throws TException
    {
      ContextStack ctx = this.getContextStack();
      super.preWrite(ctx, "Raiser.doRaise", null);
      oprot_.writeMessageBegin(new TMessage("doRaise", TMessageType.CALL, seqid_));
      doRaise_args args = new doRaise_args();
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
      super.postWrite(ctx, "Raiser.doRaise", args);
      return;
    }

    public void recv_doRaise() throws Banal, Fiery, Serious, TException
    {
      ContextStack ctx = super.getContextStack();
      long bytes;
      TMessageType mtype;
      super.preRead(ctx, "Raiser.doRaise");
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      doRaise_result result = new doRaise_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      super.postRead(ctx, "Raiser.doRaise", result);

      if (result.b != null) {
        throw result.b;
      }
      if (result.f != null) {
        throw result.f;
      }
      if (result.s != null) {
        throw result.s;
      }
      return;
    }

    public String get200() throws TException
    {
      ContextStack ctx = getContextStack("Raiser.get200", null);
      this.setContextStack(ctx);
      send_get200();
      return recv_get200();
    }

    public void send_get200() throws TException
    {
      ContextStack ctx = this.getContextStack();
      super.preWrite(ctx, "Raiser.get200", null);
      oprot_.writeMessageBegin(new TMessage("get200", TMessageType.CALL, seqid_));
      get200_args args = new get200_args();
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
      super.postWrite(ctx, "Raiser.get200", args);
      return;
    }

    public String recv_get200() throws TException
    {
      ContextStack ctx = super.getContextStack();
      long bytes;
      TMessageType mtype;
      super.preRead(ctx, "Raiser.get200");
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      get200_result result = new get200_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      super.postRead(ctx, "Raiser.get200", result);

      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "get200 failed: unknown result");
    }

    public String get500() throws Fiery, Banal, Serious, TException
    {
      ContextStack ctx = getContextStack("Raiser.get500", null);
      this.setContextStack(ctx);
      send_get500();
      return recv_get500();
    }

    public void send_get500() throws TException
    {
      ContextStack ctx = this.getContextStack();
      super.preWrite(ctx, "Raiser.get500", null);
      oprot_.writeMessageBegin(new TMessage("get500", TMessageType.CALL, seqid_));
      get500_args args = new get500_args();
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
      super.postWrite(ctx, "Raiser.get500", args);
      return;
    }

    public String recv_get500() throws Fiery, Banal, Serious, TException
    {
      ContextStack ctx = super.getContextStack();
      long bytes;
      TMessageType mtype;
      super.preRead(ctx, "Raiser.get500");
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      get500_result result = new get500_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      super.postRead(ctx, "Raiser.get500", result);

      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.f != null) {
        throw result.f;
      }
      if (result.b != null) {
        throw result.b;
      }
      if (result.s != null) {
        throw result.s;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "get500 failed: unknown result");
    }

  }
  public static class AsyncClient extends TAsyncClient implements AsyncIface {
    public static class Factory implements TAsyncClientFactory<AsyncClient> {
      private TAsyncClientManager clientManager;
      private TProtocolFactory protocolFactory;
      public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void doBland(AsyncMethodCallback resultHandler7) throws TException {
      checkReady();
      doBland_call method_call = new doBland_call(resultHandler7, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class doBland_call extends TAsyncMethodCall {
      public doBland_call(AsyncMethodCallback resultHandler8, TAsyncClient client4, TProtocolFactory protocolFactory5, TNonblockingTransport transport6) throws TException {
        super(client4, protocolFactory5, transport6, resultHandler8, false);
      }

      public void write_args(TProtocol prot) throws TException {
        prot.writeMessageBegin(new TMessage("doBland", TMessageType.CALL, 0));
        doBland_args args = new doBland_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws TException {
        if (getState() != State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
        TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_doBland();
      }
    }

    public void doRaise(AsyncMethodCallback resultHandler12) throws TException {
      checkReady();
      doRaise_call method_call = new doRaise_call(resultHandler12, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class doRaise_call extends TAsyncMethodCall {
      public doRaise_call(AsyncMethodCallback resultHandler13, TAsyncClient client9, TProtocolFactory protocolFactory10, TNonblockingTransport transport11) throws TException {
        super(client9, protocolFactory10, transport11, resultHandler13, false);
      }

      public void write_args(TProtocol prot) throws TException {
        prot.writeMessageBegin(new TMessage("doRaise", TMessageType.CALL, 0));
        doRaise_args args = new doRaise_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws Banal, Fiery, Serious, TException {
        if (getState() != State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
        TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_doRaise();
      }
    }

    public void get200(AsyncMethodCallback resultHandler17) throws TException {
      checkReady();
      get200_call method_call = new get200_call(resultHandler17, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class get200_call extends TAsyncMethodCall {
      public get200_call(AsyncMethodCallback resultHandler18, TAsyncClient client14, TProtocolFactory protocolFactory15, TNonblockingTransport transport16) throws TException {
        super(client14, protocolFactory15, transport16, resultHandler18, false);
      }

      public void write_args(TProtocol prot) throws TException {
        prot.writeMessageBegin(new TMessage("get200", TMessageType.CALL, 0));
        get200_args args = new get200_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws TException {
        if (getState() != State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
        TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_get200();
      }
    }

    public void get500(AsyncMethodCallback resultHandler22) throws TException {
      checkReady();
      get500_call method_call = new get500_call(resultHandler22, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class get500_call extends TAsyncMethodCall {
      public get500_call(AsyncMethodCallback resultHandler23, TAsyncClient client19, TProtocolFactory protocolFactory20, TNonblockingTransport transport21) throws TException {
        super(client19, protocolFactory20, transport21, resultHandler23, false);
      }

      public void write_args(TProtocol prot) throws TException {
        prot.writeMessageBegin(new TMessage("get500", TMessageType.CALL, 0));
        get500_args args = new get500_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws Fiery, Banal, Serious, TException {
        if (getState() != State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array());
        TProtocol prot = super.client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_get500();
      }
    }

  }

  public static class Processor implements TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(Iface iface)
    {
      iface_ = iface;
      event_handler_ = new TProcessorEventHandler(); // Empty handler
      processMap_.put("doBland", new doBland());
      processMap_.put("doRaise", new doRaise());
      processMap_.put("get200", new get200());
      processMap_.put("get500", new get500());
    }

    protected static interface ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException;
    }

    public void setEventHandler(TProcessorEventHandler handler) {
      this.event_handler_ = handler;
    }

    private Iface iface_;
    protected TProcessorEventHandler event_handler_;
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();

    public boolean process(TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
    {
      TMessage msg = iprot.readMessageBegin();
      ProcessFunction fn = processMap_.get(msg.name);
      if (fn == null) {
        TProtocolUtil.skip(iprot, TType.STRUCT);
        iprot.readMessageEnd();
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
        x.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
        return true;
      }
      fn.process(msg.seqid, iprot, oprot, server_ctx);
      return true;
    }

    private class doBland implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
      {
        Object handler_ctx = event_handler_.getContext("Raiser.doBland", server_ctx);
        doBland_args args = new doBland_args();
        event_handler_.preRead(handler_ctx, "Raiser.doBland");
        args.read(iprot);
        iprot.readMessageEnd();
        event_handler_.postRead(handler_ctx, "Raiser.doBland", args);
        doBland_result result = new doBland_result();
        iface_.doBland();
        event_handler_.preWrite(handler_ctx, "Raiser.doBland", result);
        oprot.writeMessageBegin(new TMessage("doBland", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
        event_handler_.postWrite(handler_ctx, "Raiser.doBland", result);
      }

    }

    private class doRaise implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
      {
        Object handler_ctx = event_handler_.getContext("Raiser.doRaise", server_ctx);
        doRaise_args args = new doRaise_args();
        event_handler_.preRead(handler_ctx, "Raiser.doRaise");
        args.read(iprot);
        iprot.readMessageEnd();
        event_handler_.postRead(handler_ctx, "Raiser.doRaise", args);
        doRaise_result result = new doRaise_result();
        try {
          iface_.doRaise();
        } catch (Banal b) {
          result.b = b;
          event_handler_.declaredUserException(handler_ctx, "Raiser.doRaise", b);
        } catch (Fiery f) {
          result.f = f;
          event_handler_.declaredUserException(handler_ctx, "Raiser.doRaise", f);
        } catch (Serious s) {
          result.s = s;
          event_handler_.declaredUserException(handler_ctx, "Raiser.doRaise", s);
        } catch (Throwable th) {
          LOGGER.error("Internal error processing Raiser.doRaise", th);
          event_handler_.handlerError(handler_ctx, "Raiser.doRaise", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing Raiser.doRaise");
          event_handler_.preWrite(handler_ctx, "Raiser.doRaise", null);
          oprot.writeMessageBegin(new TMessage("Raiser.doRaise", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          event_handler_.postWrite(handler_ctx, "Raiser.doRaise", null);
          return;
        }
        event_handler_.preWrite(handler_ctx, "Raiser.doRaise", result);
        oprot.writeMessageBegin(new TMessage("doRaise", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
        event_handler_.postWrite(handler_ctx, "Raiser.doRaise", result);
      }

    }

    private class get200 implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
      {
        Object handler_ctx = event_handler_.getContext("Raiser.get200", server_ctx);
        get200_args args = new get200_args();
        event_handler_.preRead(handler_ctx, "Raiser.get200");
        args.read(iprot);
        iprot.readMessageEnd();
        event_handler_.postRead(handler_ctx, "Raiser.get200", args);
        get200_result result = new get200_result();
        result.success = iface_.get200();
        event_handler_.preWrite(handler_ctx, "Raiser.get200", result);
        oprot.writeMessageBegin(new TMessage("get200", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
        event_handler_.postWrite(handler_ctx, "Raiser.get200", result);
      }

    }

    private class get500 implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot, TConnectionContext server_ctx) throws TException
      {
        Object handler_ctx = event_handler_.getContext("Raiser.get500", server_ctx);
        get500_args args = new get500_args();
        event_handler_.preRead(handler_ctx, "Raiser.get500");
        args.read(iprot);
        iprot.readMessageEnd();
        event_handler_.postRead(handler_ctx, "Raiser.get500", args);
        get500_result result = new get500_result();
        try {
          result.success = iface_.get500();
        } catch (Fiery f) {
          result.f = f;
          event_handler_.declaredUserException(handler_ctx, "Raiser.get500", f);
        } catch (Banal b) {
          result.b = b;
          event_handler_.declaredUserException(handler_ctx, "Raiser.get500", b);
        } catch (Serious s) {
          result.s = s;
          event_handler_.declaredUserException(handler_ctx, "Raiser.get500", s);
        } catch (Throwable th) {
          LOGGER.error("Internal error processing Raiser.get500", th);
          event_handler_.handlerError(handler_ctx, "Raiser.get500", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing Raiser.get500");
          event_handler_.preWrite(handler_ctx, "Raiser.get500", null);
          oprot.writeMessageBegin(new TMessage("Raiser.get500", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          event_handler_.postWrite(handler_ctx, "Raiser.get500", null);
          return;
        }
        event_handler_.preWrite(handler_ctx, "Raiser.get500", result);
        oprot.writeMessageBegin(new TMessage("get500", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
        event_handler_.postWrite(handler_ctx, "Raiser.get500", result);
      }

    }

  }

  public static class doBland_args implements TBase, java.io.Serializable, Cloneable, Comparable<doBland_args>   {
    private static final TStruct STRUCT_DESC = new TStruct("doBland_args");

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(doBland_args.class, metaDataMap);
    }

    public doBland_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public doBland_args(doBland_args other) {
    }

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

    public void setFieldValue(int fieldID, Object __value) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof doBland_args))
        return false;
      doBland_args that = (doBland_args)_that;

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {});
    }

    @Override
    public int compareTo(doBland_args other) {
      if (other == null) {
        // See java.lang.Comparable docs
        throw new NullPointerException();
      }

      if (other == this) {
        return 0;
      }
      int lastComparison = 0;

      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("doBland_args");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  public static class doBland_result implements TBase, java.io.Serializable, Cloneable, Comparable<doBland_result>   {
    private static final TStruct STRUCT_DESC = new TStruct("doBland_result");

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(doBland_result.class, metaDataMap);
    }

    public doBland_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public doBland_result(doBland_result other) {
    }

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

    public void setFieldValue(int fieldID, Object __value) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof doBland_result))
        return false;
      doBland_result that = (doBland_result)_that;

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {});
    }

    @Override
    public int compareTo(doBland_result other) {
      if (other == null) {
        // See java.lang.Comparable docs
        throw new NullPointerException();
      }

      if (other == this) {
        return 0;
      }
      int lastComparison = 0;

      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("doBland_result");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  public static class doRaise_args implements TBase, java.io.Serializable, Cloneable, Comparable<doRaise_args>   {
    private static final TStruct STRUCT_DESC = new TStruct("doRaise_args");

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(doRaise_args.class, metaDataMap);
    }

    public doRaise_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public doRaise_args(doRaise_args other) {
    }

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

    public void setFieldValue(int fieldID, Object __value) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof doRaise_args))
        return false;
      doRaise_args that = (doRaise_args)_that;

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {});
    }

    @Override
    public int compareTo(doRaise_args other) {
      if (other == null) {
        // See java.lang.Comparable docs
        throw new NullPointerException();
      }

      if (other == this) {
        return 0;
      }
      int lastComparison = 0;

      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("doRaise_args");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  public static class doRaise_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("doRaise_result");
    private static final TField B_FIELD_DESC = new TField("b", TType.STRUCT, (short)1);
    private static final TField F_FIELD_DESC = new TField("f", TType.STRUCT, (short)2);
    private static final TField S_FIELD_DESC = new TField("s", TType.STRUCT, (short)3);

    public Banal b;
    public Fiery f;
    public Serious s;
    public static final int B = 1;
    public static final int F = 2;
    public static final int S = 3;

    // isset id assignments

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      tmpMetaDataMap.put(B, new FieldMetaData("b", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
      tmpMetaDataMap.put(F, new FieldMetaData("f", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
      tmpMetaDataMap.put(S, new FieldMetaData("s", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(doRaise_result.class, metaDataMap);
    }

    public doRaise_result() {
    }

    public doRaise_result(
        Banal b,
        Fiery f,
        Serious s) {
      this();
      this.b = b;
      this.f = f;
      this.s = s;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public doRaise_result(doRaise_result other) {
      if (other.isSetB()) {
        this.b = TBaseHelper.deepCopy(other.b);
      }
      if (other.isSetF()) {
        this.f = TBaseHelper.deepCopy(other.f);
      }
      if (other.isSetS()) {
        this.s = TBaseHelper.deepCopy(other.s);
      }
    }

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

    public Banal getB() {
      return this.b;
    }

    public doRaise_result setB(Banal b) {
      this.b = b;
      return this;
    }

    public void unsetB() {
      this.b = null;
    }

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

    public void setBIsSet(boolean __value) {
      if (!__value) {
        this.b = null;
      }
    }

    public Fiery getF() {
      return this.f;
    }

    public doRaise_result setF(Fiery f) {
      this.f = f;
      return this;
    }

    public void unsetF() {
      this.f = null;
    }

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

    public void setFIsSet(boolean __value) {
      if (!__value) {
        this.f = null;
      }
    }

    public Serious getS() {
      return this.s;
    }

    public doRaise_result setS(Serious s) {
      this.s = s;
      return this;
    }

    public void unsetS() {
      this.s = null;
    }

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

    public void setSIsSet(boolean __value) {
      if (!__value) {
        this.s = null;
      }
    }

    public void setFieldValue(int fieldID, Object __value) {
      switch (fieldID) {
      case B:
        if (__value == null) {
          unsetB();
        } else {
          setB((Banal)__value);
        }
        break;

      case F:
        if (__value == null) {
          unsetF();
        } else {
          setF((Fiery)__value);
        }
        break;

      case S:
        if (__value == null) {
          unsetS();
        } else {
          setS((Serious)__value);
        }
        break;

      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      case B:
        return getB();

      case F:
        return getF();

      case S:
        return getS();

      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof doRaise_result))
        return false;
      doRaise_result that = (doRaise_result)_that;

      if (!TBaseHelper.equalsNobinary(this.isSetB(), that.isSetB(), this.b, that.b)) { return false; }

      if (!TBaseHelper.equalsNobinary(this.isSetF(), that.isSetF(), this.f, that.f)) { return false; }

      if (!TBaseHelper.equalsNobinary(this.isSetS(), that.isSetS(), this.s, that.s)) { return false; }

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {b, f, s});
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          case B:
            if (__field.type == TType.STRUCT) {
              this.b = new Banal();
              this.b.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          case F:
            if (__field.type == TType.STRUCT) {
              this.f = new Fiery();
              this.f.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          case S:
            if (__field.type == TType.STRUCT) {
              this.s = new Serious();
              this.s.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetB()) {
        oprot.writeFieldBegin(B_FIELD_DESC);
        this.b.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetF()) {
        oprot.writeFieldBegin(F_FIELD_DESC);
        this.f.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetS()) {
        oprot.writeFieldBegin(S_FIELD_DESC);
        this.s.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("doRaise_result");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(indentStr);
      sb.append("b");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getB() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getB(), indent + 1, prettyPrint));
      }
      first = false;
      if (!first) sb.append("," + newLine);
      sb.append(indentStr);
      sb.append("f");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getF() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getF(), indent + 1, prettyPrint));
      }
      first = false;
      if (!first) sb.append("," + newLine);
      sb.append(indentStr);
      sb.append("s");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getS() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getS(), indent + 1, prettyPrint));
      }
      first = false;
      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  public static class get200_args implements TBase, java.io.Serializable, Cloneable, Comparable<get200_args>   {
    private static final TStruct STRUCT_DESC = new TStruct("get200_args");

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(get200_args.class, metaDataMap);
    }

    public get200_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get200_args(get200_args other) {
    }

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

    public void setFieldValue(int fieldID, Object __value) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof get200_args))
        return false;
      get200_args that = (get200_args)_that;

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {});
    }

    @Override
    public int compareTo(get200_args other) {
      if (other == null) {
        // See java.lang.Comparable docs
        throw new NullPointerException();
      }

      if (other == this) {
        return 0;
      }
      int lastComparison = 0;

      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("get200_args");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  public static class get200_result implements TBase, java.io.Serializable, Cloneable, Comparable<get200_result>   {
    private static final TStruct STRUCT_DESC = new TStruct("get200_result");
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);

    public String success;
    public static final int SUCCESS = 0;

    // isset id assignments

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(get200_result.class, metaDataMap);
    }

    public get200_result() {
    }

    public get200_result(
        String success) {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get200_result(get200_result other) {
      if (other.isSetSuccess()) {
        this.success = TBaseHelper.deepCopy(other.success);
      }
    }

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

    public String getSuccess() {
      return this.success;
    }

    public get200_result setSuccess(String 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(int fieldID, Object __value) {
      switch (fieldID) {
      case SUCCESS:
        if (__value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)__value);
        }
        break;

      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      case SUCCESS:
        return getSuccess();

      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof get200_result))
        return false;
      get200_result that = (get200_result)_that;

      if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {success});
    }

    @Override
    public int compareTo(get200_result other) {
      if (other == null) {
        // See java.lang.Comparable docs
        throw new NullPointerException();
      }

      if (other == this) {
        return 0;
      }
      int lastComparison = 0;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, other.success);
      if (lastComparison != 0) { 
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          case SUCCESS:
            if (__field.type == TType.STRING) {
              this.success = iprot.readString();
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("get200_result");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(indentStr);
      sb.append("success");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getSuccess() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint));
      }
      first = false;
      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  public static class get500_args implements TBase, java.io.Serializable, Cloneable, Comparable<get500_args>   {
    private static final TStruct STRUCT_DESC = new TStruct("get500_args");

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(get500_args.class, metaDataMap);
    }

    public get500_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get500_args(get500_args other) {
    }

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

    public void setFieldValue(int fieldID, Object __value) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof get500_args))
        return false;
      get500_args that = (get500_args)_that;

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {});
    }

    @Override
    public int compareTo(get500_args other) {
      if (other == null) {
        // See java.lang.Comparable docs
        throw new NullPointerException();
      }

      if (other == this) {
        return 0;
      }
      int lastComparison = 0;

      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("get500_args");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

  public static class get500_result implements TBase, java.io.Serializable, Cloneable   {
    private static final TStruct STRUCT_DESC = new TStruct("get500_result");
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
    private static final TField F_FIELD_DESC = new TField("f", TType.STRUCT, (short)1);
    private static final TField B_FIELD_DESC = new TField("b", TType.STRUCT, (short)2);
    private static final TField S_FIELD_DESC = new TField("s", TType.STRUCT, (short)3);

    public String success;
    public Fiery f;
    public Banal b;
    public Serious s;
    public static final int SUCCESS = 0;
    public static final int F = 1;
    public static final int B = 2;
    public static final int S = 3;

    // isset id assignments

    public static final Map<Integer, FieldMetaData> metaDataMap;

    static {
      Map<Integer, FieldMetaData> tmpMetaDataMap = new HashMap<Integer, FieldMetaData>();
      tmpMetaDataMap.put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
      tmpMetaDataMap.put(F, new FieldMetaData("f", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
      tmpMetaDataMap.put(B, new FieldMetaData("b", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
      tmpMetaDataMap.put(S, new FieldMetaData("s", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMetaDataMap);
    }

    static {
      FieldMetaData.addStructMetaDataMap(get500_result.class, metaDataMap);
    }

    public get500_result() {
    }

    public get500_result(
        String success,
        Fiery f,
        Banal b,
        Serious s) {
      this();
      this.success = success;
      this.f = f;
      this.b = b;
      this.s = s;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public get500_result(get500_result other) {
      if (other.isSetSuccess()) {
        this.success = TBaseHelper.deepCopy(other.success);
      }
      if (other.isSetF()) {
        this.f = TBaseHelper.deepCopy(other.f);
      }
      if (other.isSetB()) {
        this.b = TBaseHelper.deepCopy(other.b);
      }
      if (other.isSetS()) {
        this.s = TBaseHelper.deepCopy(other.s);
      }
    }

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

    public String getSuccess() {
      return this.success;
    }

    public get500_result setSuccess(String 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 Fiery getF() {
      return this.f;
    }

    public get500_result setF(Fiery f) {
      this.f = f;
      return this;
    }

    public void unsetF() {
      this.f = null;
    }

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

    public void setFIsSet(boolean __value) {
      if (!__value) {
        this.f = null;
      }
    }

    public Banal getB() {
      return this.b;
    }

    public get500_result setB(Banal b) {
      this.b = b;
      return this;
    }

    public void unsetB() {
      this.b = null;
    }

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

    public void setBIsSet(boolean __value) {
      if (!__value) {
        this.b = null;
      }
    }

    public Serious getS() {
      return this.s;
    }

    public get500_result setS(Serious s) {
      this.s = s;
      return this;
    }

    public void unsetS() {
      this.s = null;
    }

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

    public void setSIsSet(boolean __value) {
      if (!__value) {
        this.s = null;
      }
    }

    public void setFieldValue(int fieldID, Object __value) {
      switch (fieldID) {
      case SUCCESS:
        if (__value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)__value);
        }
        break;

      case F:
        if (__value == null) {
          unsetF();
        } else {
          setF((Fiery)__value);
        }
        break;

      case B:
        if (__value == null) {
          unsetB();
        } else {
          setB((Banal)__value);
        }
        break;

      case S:
        if (__value == null) {
          unsetS();
        } else {
          setS((Serious)__value);
        }
        break;

      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    public Object getFieldValue(int fieldID) {
      switch (fieldID) {
      case SUCCESS:
        return getSuccess();

      case F:
        return getF();

      case B:
        return getB();

      case S:
        return getS();

      default:
        throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
      }
    }

    @Override
    public boolean equals(Object _that) {
      if (_that == null)
        return false;
      if (this == _that)
        return true;
      if (!(_that instanceof get500_result))
        return false;
      get500_result that = (get500_result)_that;

      if (!TBaseHelper.equalsNobinary(this.isSetSuccess(), that.isSetSuccess(), this.success, that.success)) { return false; }

      if (!TBaseHelper.equalsNobinary(this.isSetF(), that.isSetF(), this.f, that.f)) { return false; }

      if (!TBaseHelper.equalsNobinary(this.isSetB(), that.isSetB(), this.b, that.b)) { return false; }

      if (!TBaseHelper.equalsNobinary(this.isSetS(), that.isSetS(), this.s, that.s)) { return false; }

      return true;
    }

    @Override
    public int hashCode() {
      return Arrays.deepHashCode(new Object[] {success, f, b, s});
    }

    public void read(TProtocol iprot) throws TException {
      TField __field;
      iprot.readStructBegin(metaDataMap);
      while (true)
      {
        __field = iprot.readFieldBegin();
        if (__field.type == TType.STOP) {
          break;
        }
        switch (__field.id)
        {
          case SUCCESS:
            if (__field.type == TType.STRING) {
              this.success = iprot.readString();
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          case F:
            if (__field.type == TType.STRUCT) {
              this.f = new Fiery();
              this.f.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          case B:
            if (__field.type == TType.STRUCT) {
              this.b = new Banal();
              this.b.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          case S:
            if (__field.type == TType.STRUCT) {
              this.s = new Serious();
              this.s.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, __field.type);
            }
            break;
          default:
            TProtocolUtil.skip(iprot, __field.type);
            break;
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();


      // check for required fields of primitive type, which can't be checked in the validate method
      validate();
    }

    public void write(TProtocol oprot) throws TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetF()) {
        oprot.writeFieldBegin(F_FIELD_DESC);
        this.f.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetB()) {
        oprot.writeFieldBegin(B_FIELD_DESC);
        this.b.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetS()) {
        oprot.writeFieldBegin(S_FIELD_DESC);
        this.s.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      return toString(1, true);
    }

    @Override
    public String toString(int indent, boolean prettyPrint) {
      String indentStr = prettyPrint ? TBaseHelper.getIndentedString(indent) : "";
      String newLine = prettyPrint ? "\n" : "";
      String space = prettyPrint ? " " : "";
      StringBuilder sb = new StringBuilder("get500_result");
      sb.append(space);
      sb.append("(");
      sb.append(newLine);
      boolean first = true;

      sb.append(indentStr);
      sb.append("success");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getSuccess() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getSuccess(), indent + 1, prettyPrint));
      }
      first = false;
      if (!first) sb.append("," + newLine);
      sb.append(indentStr);
      sb.append("f");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getF() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getF(), indent + 1, prettyPrint));
      }
      first = false;
      if (!first) sb.append("," + newLine);
      sb.append(indentStr);
      sb.append("b");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getB() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getB(), indent + 1, prettyPrint));
      }
      first = false;
      if (!first) sb.append("," + newLine);
      sb.append(indentStr);
      sb.append("s");
      sb.append(space);
      sb.append(":").append(space);
      if (this.getS() == null) {
        sb.append("null");
      } else {
        sb.append(TBaseHelper.toString(this.getS(), indent + 1, prettyPrint));
      }
      first = false;
      sb.append(newLine + TBaseHelper.reduceIndent(indentStr));
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws TException {
      // check for required fields
    }

  }

}
