/**
 * Autogenerated by Thrift Compiler (0.13.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.eclipse.hawk.service.api;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2021-04-18")
public class Hawk {

  public interface Iface {

    public void createInstance(java.lang.String name, java.lang.String backend, int minimumDelayMillis, int maximumDelayMillis, java.util.List<java.lang.String> enabledPlugins, java.lang.String indexFactory) throws HawkFactoryNotFound, org.apache.thrift.TException;

    public java.util.List<java.lang.String> listBackends() throws org.apache.thrift.TException;

    public java.util.List<java.lang.String> listPlugins() throws org.apache.thrift.TException;

    public java.util.List<HawkPlugin> listPluginDetails() throws org.apache.thrift.TException;

    public java.util.List<HawkInstance> listInstances() throws org.apache.thrift.TException;

    public void removeInstance(java.lang.String name) throws HawkInstanceNotFound, org.apache.thrift.TException;

    public void startInstance(java.lang.String name) throws HawkInstanceNotFound, org.apache.thrift.TException;

    public void stopInstance(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void syncInstance(java.lang.String name, boolean blockUntilDone) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void registerMetamodels(java.lang.String name, java.util.List<File> metamodel) throws HawkInstanceNotFound, InvalidMetamodel, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void unregisterMetamodels(java.lang.String name, java.util.List<java.lang.String> metamodel) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<java.lang.String> listMetamodels(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<java.lang.String> listTypeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI) throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, org.apache.thrift.TException;

    public java.util.List<java.lang.String> listAttributeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI, java.lang.String typeName) throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, HawkTypeNotFound, org.apache.thrift.TException;

    public java.util.List<MetamodelParserDetails> listMetamodelParsers(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<java.lang.String> listQueryLanguages(java.lang.String name) throws org.apache.thrift.TException;

    public QueryResult query(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException;

    public QueryReport timedQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException;

    public java.util.List<ModelElement> resolveProxies(java.lang.String name, java.util.List<java.lang.String> ids, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.lang.String asyncQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, org.apache.thrift.TException;

    public void cancelAsyncQuery(java.lang.String queryID) throws InvalidQuery, org.apache.thrift.TException;

    public QueryReport fetchAsyncQueryResults(java.lang.String queryID) throws InvalidQuery, FailedQuery, org.apache.thrift.TException;

    public void addRepository(java.lang.String name, Repository repo, Credentials credentials) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownRepositoryType, VCSAuthenticationFailed, org.apache.thrift.TException;

    public boolean isFrozen(java.lang.String name, java.lang.String uri) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void setFrozen(java.lang.String name, java.lang.String uri, boolean isFrozen) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void removeRepository(java.lang.String name, java.lang.String uri) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void updateRepositoryCredentials(java.lang.String name, java.lang.String uri, Credentials cred) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<Repository> listRepositories(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<java.lang.String> listRepositoryTypes() throws org.apache.thrift.TException;

    public java.util.List<java.lang.String> listFiles(java.lang.String name, java.util.List<java.lang.String> repository, java.util.List<java.lang.String> filePatterns) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void configurePolling(java.lang.String name, int base, int max) throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidPollingConfiguration, org.apache.thrift.TException;

    public void addDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidDerivedAttributeSpec, org.apache.thrift.TException;

    public void removeDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<DerivedAttributeSpec> listDerivedAttributes(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public void addIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidIndexedAttributeSpec, org.apache.thrift.TException;

    public void removeIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<IndexedAttributeSpec> listIndexedAttributes(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<ModelElement> getModel(java.lang.String name, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public java.util.List<ModelElement> getRootElements(java.lang.String name, HawkQueryOptions options) throws org.apache.thrift.TException;

    public Subscription watchStateChanges(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

    public Subscription watchModelChanges(java.lang.String name, java.lang.String repositoryUri, java.util.List<java.lang.String> filePath, java.lang.String clientID, SubscriptionDurability durableEvents) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException;

  }

  public interface AsyncIface {

    public void createInstance(java.lang.String name, java.lang.String backend, int minimumDelayMillis, int maximumDelayMillis, java.util.List<java.lang.String> enabledPlugins, java.lang.String indexFactory, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void listBackends(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void listPlugins(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void listPluginDetails(org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkPlugin>> resultHandler) throws org.apache.thrift.TException;

    public void listInstances(org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkInstance>> resultHandler) throws org.apache.thrift.TException;

    public void removeInstance(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void startInstance(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void stopInstance(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void syncInstance(java.lang.String name, boolean blockUntilDone, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void registerMetamodels(java.lang.String name, java.util.List<File> metamodel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void unregisterMetamodels(java.lang.String name, java.util.List<java.lang.String> metamodel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void listMetamodels(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void listTypeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void listAttributeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI, java.lang.String typeName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void listMetamodelParsers(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MetamodelParserDetails>> resultHandler) throws org.apache.thrift.TException;

    public void listQueryLanguages(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void query(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<QueryResult> resultHandler) throws org.apache.thrift.TException;

    public void timedQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<QueryReport> resultHandler) throws org.apache.thrift.TException;

    public void resolveProxies(java.lang.String name, java.util.List<java.lang.String> ids, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException;

    public void asyncQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;

    public void cancelAsyncQuery(java.lang.String queryID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void fetchAsyncQueryResults(java.lang.String queryID, org.apache.thrift.async.AsyncMethodCallback<QueryReport> resultHandler) throws org.apache.thrift.TException;

    public void addRepository(java.lang.String name, Repository repo, Credentials credentials, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void isFrozen(java.lang.String name, java.lang.String uri, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;

    public void setFrozen(java.lang.String name, java.lang.String uri, boolean isFrozen, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void removeRepository(java.lang.String name, java.lang.String uri, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void updateRepositoryCredentials(java.lang.String name, java.lang.String uri, Credentials cred, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void listRepositories(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Repository>> resultHandler) throws org.apache.thrift.TException;

    public void listRepositoryTypes(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void listFiles(java.lang.String name, java.util.List<java.lang.String> repository, java.util.List<java.lang.String> filePatterns, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException;

    public void configurePolling(java.lang.String name, int base, int max, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void addDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void removeDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void listDerivedAttributes(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<DerivedAttributeSpec>> resultHandler) throws org.apache.thrift.TException;

    public void addIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void removeIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;

    public void listIndexedAttributes(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<IndexedAttributeSpec>> resultHandler) throws org.apache.thrift.TException;

    public void getModel(java.lang.String name, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException;

    public void getRootElements(java.lang.String name, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException;

    public void watchStateChanges(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Subscription> resultHandler) throws org.apache.thrift.TException;

    public void watchModelChanges(java.lang.String name, java.lang.String repositoryUri, java.util.List<java.lang.String> filePath, java.lang.String clientID, SubscriptionDurability durableEvents, org.apache.thrift.async.AsyncMethodCallback<Subscription> resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      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 void createInstance(java.lang.String name, java.lang.String backend, int minimumDelayMillis, int maximumDelayMillis, java.util.List<java.lang.String> enabledPlugins, java.lang.String indexFactory) throws HawkFactoryNotFound, org.apache.thrift.TException
    {
      send_createInstance(name, backend, minimumDelayMillis, maximumDelayMillis, enabledPlugins, indexFactory);
      recv_createInstance();
    }

    public void send_createInstance(java.lang.String name, java.lang.String backend, int minimumDelayMillis, int maximumDelayMillis, java.util.List<java.lang.String> enabledPlugins, java.lang.String indexFactory) throws org.apache.thrift.TException
    {
      createInstance_args args = new createInstance_args();
      args.setName(name);
      args.setBackend(backend);
      args.setMinimumDelayMillis(minimumDelayMillis);
      args.setMaximumDelayMillis(maximumDelayMillis);
      args.setEnabledPlugins(enabledPlugins);
      args.setIndexFactory(indexFactory);
      sendBase("createInstance", args);
    }

    public void recv_createInstance() throws HawkFactoryNotFound, org.apache.thrift.TException
    {
      createInstance_result result = new createInstance_result();
      receiveBase(result, "createInstance");
      if (result.err1 != null) {
        throw result.err1;
      }
      return;
    }

    public java.util.List<java.lang.String> listBackends() throws org.apache.thrift.TException
    {
      send_listBackends();
      return recv_listBackends();
    }

    public void send_listBackends() throws org.apache.thrift.TException
    {
      listBackends_args args = new listBackends_args();
      sendBase("listBackends", args);
    }

    public java.util.List<java.lang.String> recv_listBackends() throws org.apache.thrift.TException
    {
      listBackends_result result = new listBackends_result();
      receiveBase(result, "listBackends");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listBackends failed: unknown result");
    }

    public java.util.List<java.lang.String> listPlugins() throws org.apache.thrift.TException
    {
      send_listPlugins();
      return recv_listPlugins();
    }

    public void send_listPlugins() throws org.apache.thrift.TException
    {
      listPlugins_args args = new listPlugins_args();
      sendBase("listPlugins", args);
    }

    public java.util.List<java.lang.String> recv_listPlugins() throws org.apache.thrift.TException
    {
      listPlugins_result result = new listPlugins_result();
      receiveBase(result, "listPlugins");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listPlugins failed: unknown result");
    }

    public java.util.List<HawkPlugin> listPluginDetails() throws org.apache.thrift.TException
    {
      send_listPluginDetails();
      return recv_listPluginDetails();
    }

    public void send_listPluginDetails() throws org.apache.thrift.TException
    {
      listPluginDetails_args args = new listPluginDetails_args();
      sendBase("listPluginDetails", args);
    }

    public java.util.List<HawkPlugin> recv_listPluginDetails() throws org.apache.thrift.TException
    {
      listPluginDetails_result result = new listPluginDetails_result();
      receiveBase(result, "listPluginDetails");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listPluginDetails failed: unknown result");
    }

    public java.util.List<HawkInstance> listInstances() throws org.apache.thrift.TException
    {
      send_listInstances();
      return recv_listInstances();
    }

    public void send_listInstances() throws org.apache.thrift.TException
    {
      listInstances_args args = new listInstances_args();
      sendBase("listInstances", args);
    }

    public java.util.List<HawkInstance> recv_listInstances() throws org.apache.thrift.TException
    {
      listInstances_result result = new listInstances_result();
      receiveBase(result, "listInstances");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listInstances failed: unknown result");
    }

    public void removeInstance(java.lang.String name) throws HawkInstanceNotFound, org.apache.thrift.TException
    {
      send_removeInstance(name);
      recv_removeInstance();
    }

    public void send_removeInstance(java.lang.String name) throws org.apache.thrift.TException
    {
      removeInstance_args args = new removeInstance_args();
      args.setName(name);
      sendBase("removeInstance", args);
    }

    public void recv_removeInstance() throws HawkInstanceNotFound, org.apache.thrift.TException
    {
      removeInstance_result result = new removeInstance_result();
      receiveBase(result, "removeInstance");
      if (result.err1 != null) {
        throw result.err1;
      }
      return;
    }

    public void startInstance(java.lang.String name) throws HawkInstanceNotFound, org.apache.thrift.TException
    {
      send_startInstance(name);
      recv_startInstance();
    }

    public void send_startInstance(java.lang.String name) throws org.apache.thrift.TException
    {
      startInstance_args args = new startInstance_args();
      args.setName(name);
      sendBase("startInstance", args);
    }

    public void recv_startInstance() throws HawkInstanceNotFound, org.apache.thrift.TException
    {
      startInstance_result result = new startInstance_result();
      receiveBase(result, "startInstance");
      if (result.err1 != null) {
        throw result.err1;
      }
      return;
    }

    public void stopInstance(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_stopInstance(name);
      recv_stopInstance();
    }

    public void send_stopInstance(java.lang.String name) throws org.apache.thrift.TException
    {
      stopInstance_args args = new stopInstance_args();
      args.setName(name);
      sendBase("stopInstance", args);
    }

    public void recv_stopInstance() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      stopInstance_result result = new stopInstance_result();
      receiveBase(result, "stopInstance");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public void syncInstance(java.lang.String name, boolean blockUntilDone) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_syncInstance(name, blockUntilDone);
      recv_syncInstance();
    }

    public void send_syncInstance(java.lang.String name, boolean blockUntilDone) throws org.apache.thrift.TException
    {
      syncInstance_args args = new syncInstance_args();
      args.setName(name);
      args.setBlockUntilDone(blockUntilDone);
      sendBase("syncInstance", args);
    }

    public void recv_syncInstance() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      syncInstance_result result = new syncInstance_result();
      receiveBase(result, "syncInstance");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public void registerMetamodels(java.lang.String name, java.util.List<File> metamodel) throws HawkInstanceNotFound, InvalidMetamodel, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_registerMetamodels(name, metamodel);
      recv_registerMetamodels();
    }

    public void send_registerMetamodels(java.lang.String name, java.util.List<File> metamodel) throws org.apache.thrift.TException
    {
      registerMetamodels_args args = new registerMetamodels_args();
      args.setName(name);
      args.setMetamodel(metamodel);
      sendBase("registerMetamodels", args);
    }

    public void recv_registerMetamodels() throws HawkInstanceNotFound, InvalidMetamodel, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      registerMetamodels_result result = new registerMetamodels_result();
      receiveBase(result, "registerMetamodels");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      return;
    }

    public void unregisterMetamodels(java.lang.String name, java.util.List<java.lang.String> metamodel) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_unregisterMetamodels(name, metamodel);
      recv_unregisterMetamodels();
    }

    public void send_unregisterMetamodels(java.lang.String name, java.util.List<java.lang.String> metamodel) throws org.apache.thrift.TException
    {
      unregisterMetamodels_args args = new unregisterMetamodels_args();
      args.setName(name);
      args.setMetamodel(metamodel);
      sendBase("unregisterMetamodels", args);
    }

    public void recv_unregisterMetamodels() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      unregisterMetamodels_result result = new unregisterMetamodels_result();
      receiveBase(result, "unregisterMetamodels");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public java.util.List<java.lang.String> listMetamodels(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_listMetamodels(name);
      return recv_listMetamodels();
    }

    public void send_listMetamodels(java.lang.String name) throws org.apache.thrift.TException
    {
      listMetamodels_args args = new listMetamodels_args();
      args.setName(name);
      sendBase("listMetamodels", args);
    }

    public java.util.List<java.lang.String> recv_listMetamodels() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      listMetamodels_result result = new listMetamodels_result();
      receiveBase(result, "listMetamodels");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listMetamodels failed: unknown result");
    }

    public java.util.List<java.lang.String> listTypeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI) throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, org.apache.thrift.TException
    {
      send_listTypeNames(hawkInstanceName, metamodelURI);
      return recv_listTypeNames();
    }

    public void send_listTypeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI) throws org.apache.thrift.TException
    {
      listTypeNames_args args = new listTypeNames_args();
      args.setHawkInstanceName(hawkInstanceName);
      args.setMetamodelURI(metamodelURI);
      sendBase("listTypeNames", args);
    }

    public java.util.List<java.lang.String> recv_listTypeNames() throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, org.apache.thrift.TException
    {
      listTypeNames_result result = new listTypeNames_result();
      receiveBase(result, "listTypeNames");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listTypeNames failed: unknown result");
    }

    public java.util.List<java.lang.String> listAttributeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI, java.lang.String typeName) throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, HawkTypeNotFound, org.apache.thrift.TException
    {
      send_listAttributeNames(hawkInstanceName, metamodelURI, typeName);
      return recv_listAttributeNames();
    }

    public void send_listAttributeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI, java.lang.String typeName) throws org.apache.thrift.TException
    {
      listAttributeNames_args args = new listAttributeNames_args();
      args.setHawkInstanceName(hawkInstanceName);
      args.setMetamodelURI(metamodelURI);
      args.setTypeName(typeName);
      sendBase("listAttributeNames", args);
    }

    public java.util.List<java.lang.String> recv_listAttributeNames() throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, HawkTypeNotFound, org.apache.thrift.TException
    {
      listAttributeNames_result result = new listAttributeNames_result();
      receiveBase(result, "listAttributeNames");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      if (result.err4 != null) {
        throw result.err4;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listAttributeNames failed: unknown result");
    }

    public java.util.List<MetamodelParserDetails> listMetamodelParsers(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_listMetamodelParsers(name);
      return recv_listMetamodelParsers();
    }

    public void send_listMetamodelParsers(java.lang.String name) throws org.apache.thrift.TException
    {
      listMetamodelParsers_args args = new listMetamodelParsers_args();
      args.setName(name);
      sendBase("listMetamodelParsers", args);
    }

    public java.util.List<MetamodelParserDetails> recv_listMetamodelParsers() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      listMetamodelParsers_result result = new listMetamodelParsers_result();
      receiveBase(result, "listMetamodelParsers");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listMetamodelParsers failed: unknown result");
    }

    public java.util.List<java.lang.String> listQueryLanguages(java.lang.String name) throws org.apache.thrift.TException
    {
      send_listQueryLanguages(name);
      return recv_listQueryLanguages();
    }

    public void send_listQueryLanguages(java.lang.String name) throws org.apache.thrift.TException
    {
      listQueryLanguages_args args = new listQueryLanguages_args();
      args.setName(name);
      sendBase("listQueryLanguages", args);
    }

    public java.util.List<java.lang.String> recv_listQueryLanguages() throws org.apache.thrift.TException
    {
      listQueryLanguages_result result = new listQueryLanguages_result();
      receiveBase(result, "listQueryLanguages");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listQueryLanguages failed: unknown result");
    }

    public QueryResult query(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException
    {
      send_query(name, query, language, options);
      return recv_query();
    }

    public void send_query(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws org.apache.thrift.TException
    {
      query_args args = new query_args();
      args.setName(name);
      args.setQuery(query);
      args.setLanguage(language);
      args.setOptions(options);
      sendBase("query", args);
    }

    public QueryResult recv_query() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException
    {
      query_result result = new query_result();
      receiveBase(result, "query");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      if (result.err4 != null) {
        throw result.err4;
      }
      if (result.err5 != null) {
        throw result.err5;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "query failed: unknown result");
    }

    public QueryReport timedQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException
    {
      send_timedQuery(name, query, language, options);
      return recv_timedQuery();
    }

    public void send_timedQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws org.apache.thrift.TException
    {
      timedQuery_args args = new timedQuery_args();
      args.setName(name);
      args.setQuery(query);
      args.setLanguage(language);
      args.setOptions(options);
      sendBase("timedQuery", args);
    }

    public QueryReport recv_timedQuery() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException
    {
      timedQuery_result result = new timedQuery_result();
      receiveBase(result, "timedQuery");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      if (result.err4 != null) {
        throw result.err4;
      }
      if (result.err5 != null) {
        throw result.err5;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "timedQuery failed: unknown result");
    }

    public java.util.List<ModelElement> resolveProxies(java.lang.String name, java.util.List<java.lang.String> ids, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_resolveProxies(name, ids, options);
      return recv_resolveProxies();
    }

    public void send_resolveProxies(java.lang.String name, java.util.List<java.lang.String> ids, HawkQueryOptions options) throws org.apache.thrift.TException
    {
      resolveProxies_args args = new resolveProxies_args();
      args.setName(name);
      args.setIds(ids);
      args.setOptions(options);
      sendBase("resolveProxies", args);
    }

    public java.util.List<ModelElement> recv_resolveProxies() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      resolveProxies_result result = new resolveProxies_result();
      receiveBase(result, "resolveProxies");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resolveProxies failed: unknown result");
    }

    public java.lang.String asyncQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, org.apache.thrift.TException
    {
      send_asyncQuery(name, query, language, options);
      return recv_asyncQuery();
    }

    public void send_asyncQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options) throws org.apache.thrift.TException
    {
      asyncQuery_args args = new asyncQuery_args();
      args.setName(name);
      args.setQuery(query);
      args.setLanguage(language);
      args.setOptions(options);
      sendBase("asyncQuery", args);
    }

    public java.lang.String recv_asyncQuery() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, org.apache.thrift.TException
    {
      asyncQuery_result result = new asyncQuery_result();
      receiveBase(result, "asyncQuery");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      if (result.err4 != null) {
        throw result.err4;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "asyncQuery failed: unknown result");
    }

    public void cancelAsyncQuery(java.lang.String queryID) throws InvalidQuery, org.apache.thrift.TException
    {
      send_cancelAsyncQuery(queryID);
      recv_cancelAsyncQuery();
    }

    public void send_cancelAsyncQuery(java.lang.String queryID) throws org.apache.thrift.TException
    {
      cancelAsyncQuery_args args = new cancelAsyncQuery_args();
      args.setQueryID(queryID);
      sendBase("cancelAsyncQuery", args);
    }

    public void recv_cancelAsyncQuery() throws InvalidQuery, org.apache.thrift.TException
    {
      cancelAsyncQuery_result result = new cancelAsyncQuery_result();
      receiveBase(result, "cancelAsyncQuery");
      if (result.err1 != null) {
        throw result.err1;
      }
      return;
    }

    public QueryReport fetchAsyncQueryResults(java.lang.String queryID) throws InvalidQuery, FailedQuery, org.apache.thrift.TException
    {
      send_fetchAsyncQueryResults(queryID);
      return recv_fetchAsyncQueryResults();
    }

    public void send_fetchAsyncQueryResults(java.lang.String queryID) throws org.apache.thrift.TException
    {
      fetchAsyncQueryResults_args args = new fetchAsyncQueryResults_args();
      args.setQueryID(queryID);
      sendBase("fetchAsyncQueryResults", args);
    }

    public QueryReport recv_fetchAsyncQueryResults() throws InvalidQuery, FailedQuery, org.apache.thrift.TException
    {
      fetchAsyncQueryResults_result result = new fetchAsyncQueryResults_result();
      receiveBase(result, "fetchAsyncQueryResults");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchAsyncQueryResults failed: unknown result");
    }

    public void addRepository(java.lang.String name, Repository repo, Credentials credentials) throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownRepositoryType, VCSAuthenticationFailed, org.apache.thrift.TException
    {
      send_addRepository(name, repo, credentials);
      recv_addRepository();
    }

    public void send_addRepository(java.lang.String name, Repository repo, Credentials credentials) throws org.apache.thrift.TException
    {
      addRepository_args args = new addRepository_args();
      args.setName(name);
      args.setRepo(repo);
      args.setCredentials(credentials);
      sendBase("addRepository", args);
    }

    public void recv_addRepository() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownRepositoryType, VCSAuthenticationFailed, org.apache.thrift.TException
    {
      addRepository_result result = new addRepository_result();
      receiveBase(result, "addRepository");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      if (result.err4 != null) {
        throw result.err4;
      }
      return;
    }

    public boolean isFrozen(java.lang.String name, java.lang.String uri) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_isFrozen(name, uri);
      return recv_isFrozen();
    }

    public void send_isFrozen(java.lang.String name, java.lang.String uri) throws org.apache.thrift.TException
    {
      isFrozen_args args = new isFrozen_args();
      args.setName(name);
      args.setUri(uri);
      sendBase("isFrozen", args);
    }

    public boolean recv_isFrozen() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      isFrozen_result result = new isFrozen_result();
      receiveBase(result, "isFrozen");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isFrozen failed: unknown result");
    }

    public void setFrozen(java.lang.String name, java.lang.String uri, boolean isFrozen) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_setFrozen(name, uri, isFrozen);
      recv_setFrozen();
    }

    public void send_setFrozen(java.lang.String name, java.lang.String uri, boolean isFrozen) throws org.apache.thrift.TException
    {
      setFrozen_args args = new setFrozen_args();
      args.setName(name);
      args.setUri(uri);
      args.setIsFrozen(isFrozen);
      sendBase("setFrozen", args);
    }

    public void recv_setFrozen() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      setFrozen_result result = new setFrozen_result();
      receiveBase(result, "setFrozen");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public void removeRepository(java.lang.String name, java.lang.String uri) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_removeRepository(name, uri);
      recv_removeRepository();
    }

    public void send_removeRepository(java.lang.String name, java.lang.String uri) throws org.apache.thrift.TException
    {
      removeRepository_args args = new removeRepository_args();
      args.setName(name);
      args.setUri(uri);
      sendBase("removeRepository", args);
    }

    public void recv_removeRepository() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      removeRepository_result result = new removeRepository_result();
      receiveBase(result, "removeRepository");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public void updateRepositoryCredentials(java.lang.String name, java.lang.String uri, Credentials cred) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_updateRepositoryCredentials(name, uri, cred);
      recv_updateRepositoryCredentials();
    }

    public void send_updateRepositoryCredentials(java.lang.String name, java.lang.String uri, Credentials cred) throws org.apache.thrift.TException
    {
      updateRepositoryCredentials_args args = new updateRepositoryCredentials_args();
      args.setName(name);
      args.setUri(uri);
      args.setCred(cred);
      sendBase("updateRepositoryCredentials", args);
    }

    public void recv_updateRepositoryCredentials() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      updateRepositoryCredentials_result result = new updateRepositoryCredentials_result();
      receiveBase(result, "updateRepositoryCredentials");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public java.util.List<Repository> listRepositories(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_listRepositories(name);
      return recv_listRepositories();
    }

    public void send_listRepositories(java.lang.String name) throws org.apache.thrift.TException
    {
      listRepositories_args args = new listRepositories_args();
      args.setName(name);
      sendBase("listRepositories", args);
    }

    public java.util.List<Repository> recv_listRepositories() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      listRepositories_result result = new listRepositories_result();
      receiveBase(result, "listRepositories");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listRepositories failed: unknown result");
    }

    public java.util.List<java.lang.String> listRepositoryTypes() throws org.apache.thrift.TException
    {
      send_listRepositoryTypes();
      return recv_listRepositoryTypes();
    }

    public void send_listRepositoryTypes() throws org.apache.thrift.TException
    {
      listRepositoryTypes_args args = new listRepositoryTypes_args();
      sendBase("listRepositoryTypes", args);
    }

    public java.util.List<java.lang.String> recv_listRepositoryTypes() throws org.apache.thrift.TException
    {
      listRepositoryTypes_result result = new listRepositoryTypes_result();
      receiveBase(result, "listRepositoryTypes");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listRepositoryTypes failed: unknown result");
    }

    public java.util.List<java.lang.String> listFiles(java.lang.String name, java.util.List<java.lang.String> repository, java.util.List<java.lang.String> filePatterns) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_listFiles(name, repository, filePatterns);
      return recv_listFiles();
    }

    public void send_listFiles(java.lang.String name, java.util.List<java.lang.String> repository, java.util.List<java.lang.String> filePatterns) throws org.apache.thrift.TException
    {
      listFiles_args args = new listFiles_args();
      args.setName(name);
      args.setRepository(repository);
      args.setFilePatterns(filePatterns);
      sendBase("listFiles", args);
    }

    public java.util.List<java.lang.String> recv_listFiles() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      listFiles_result result = new listFiles_result();
      receiveBase(result, "listFiles");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listFiles failed: unknown result");
    }

    public void configurePolling(java.lang.String name, int base, int max) throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidPollingConfiguration, org.apache.thrift.TException
    {
      send_configurePolling(name, base, max);
      recv_configurePolling();
    }

    public void send_configurePolling(java.lang.String name, int base, int max) throws org.apache.thrift.TException
    {
      configurePolling_args args = new configurePolling_args();
      args.setName(name);
      args.setBase(base);
      args.setMax(max);
      sendBase("configurePolling", args);
    }

    public void recv_configurePolling() throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidPollingConfiguration, org.apache.thrift.TException
    {
      configurePolling_result result = new configurePolling_result();
      receiveBase(result, "configurePolling");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      return;
    }

    public void addDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidDerivedAttributeSpec, org.apache.thrift.TException
    {
      send_addDerivedAttribute(name, spec);
      recv_addDerivedAttribute();
    }

    public void send_addDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec) throws org.apache.thrift.TException
    {
      addDerivedAttribute_args args = new addDerivedAttribute_args();
      args.setName(name);
      args.setSpec(spec);
      sendBase("addDerivedAttribute", args);
    }

    public void recv_addDerivedAttribute() throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidDerivedAttributeSpec, org.apache.thrift.TException
    {
      addDerivedAttribute_result result = new addDerivedAttribute_result();
      receiveBase(result, "addDerivedAttribute");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      return;
    }

    public void removeDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_removeDerivedAttribute(name, spec);
      recv_removeDerivedAttribute();
    }

    public void send_removeDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec) throws org.apache.thrift.TException
    {
      removeDerivedAttribute_args args = new removeDerivedAttribute_args();
      args.setName(name);
      args.setSpec(spec);
      sendBase("removeDerivedAttribute", args);
    }

    public void recv_removeDerivedAttribute() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      removeDerivedAttribute_result result = new removeDerivedAttribute_result();
      receiveBase(result, "removeDerivedAttribute");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public java.util.List<DerivedAttributeSpec> listDerivedAttributes(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_listDerivedAttributes(name);
      return recv_listDerivedAttributes();
    }

    public void send_listDerivedAttributes(java.lang.String name) throws org.apache.thrift.TException
    {
      listDerivedAttributes_args args = new listDerivedAttributes_args();
      args.setName(name);
      sendBase("listDerivedAttributes", args);
    }

    public java.util.List<DerivedAttributeSpec> recv_listDerivedAttributes() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      listDerivedAttributes_result result = new listDerivedAttributes_result();
      receiveBase(result, "listDerivedAttributes");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listDerivedAttributes failed: unknown result");
    }

    public void addIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidIndexedAttributeSpec, org.apache.thrift.TException
    {
      send_addIndexedAttribute(name, spec);
      recv_addIndexedAttribute();
    }

    public void send_addIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec) throws org.apache.thrift.TException
    {
      addIndexedAttribute_args args = new addIndexedAttribute_args();
      args.setName(name);
      args.setSpec(spec);
      sendBase("addIndexedAttribute", args);
    }

    public void recv_addIndexedAttribute() throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidIndexedAttributeSpec, org.apache.thrift.TException
    {
      addIndexedAttribute_result result = new addIndexedAttribute_result();
      receiveBase(result, "addIndexedAttribute");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      if (result.err3 != null) {
        throw result.err3;
      }
      return;
    }

    public void removeIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_removeIndexedAttribute(name, spec);
      recv_removeIndexedAttribute();
    }

    public void send_removeIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec) throws org.apache.thrift.TException
    {
      removeIndexedAttribute_args args = new removeIndexedAttribute_args();
      args.setName(name);
      args.setSpec(spec);
      sendBase("removeIndexedAttribute", args);
    }

    public void recv_removeIndexedAttribute() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      removeIndexedAttribute_result result = new removeIndexedAttribute_result();
      receiveBase(result, "removeIndexedAttribute");
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      return;
    }

    public java.util.List<IndexedAttributeSpec> listIndexedAttributes(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_listIndexedAttributes(name);
      return recv_listIndexedAttributes();
    }

    public void send_listIndexedAttributes(java.lang.String name) throws org.apache.thrift.TException
    {
      listIndexedAttributes_args args = new listIndexedAttributes_args();
      args.setName(name);
      sendBase("listIndexedAttributes", args);
    }

    public java.util.List<IndexedAttributeSpec> recv_listIndexedAttributes() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      listIndexedAttributes_result result = new listIndexedAttributes_result();
      receiveBase(result, "listIndexedAttributes");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listIndexedAttributes failed: unknown result");
    }

    public java.util.List<ModelElement> getModel(java.lang.String name, HawkQueryOptions options) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_getModel(name, options);
      return recv_getModel();
    }

    public void send_getModel(java.lang.String name, HawkQueryOptions options) throws org.apache.thrift.TException
    {
      getModel_args args = new getModel_args();
      args.setName(name);
      args.setOptions(options);
      sendBase("getModel", args);
    }

    public java.util.List<ModelElement> recv_getModel() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      getModel_result result = new getModel_result();
      receiveBase(result, "getModel");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getModel failed: unknown result");
    }

    public java.util.List<ModelElement> getRootElements(java.lang.String name, HawkQueryOptions options) throws org.apache.thrift.TException
    {
      send_getRootElements(name, options);
      return recv_getRootElements();
    }

    public void send_getRootElements(java.lang.String name, HawkQueryOptions options) throws org.apache.thrift.TException
    {
      getRootElements_args args = new getRootElements_args();
      args.setName(name);
      args.setOptions(options);
      sendBase("getRootElements", args);
    }

    public java.util.List<ModelElement> recv_getRootElements() throws org.apache.thrift.TException
    {
      getRootElements_result result = new getRootElements_result();
      receiveBase(result, "getRootElements");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRootElements failed: unknown result");
    }

    public Subscription watchStateChanges(java.lang.String name) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_watchStateChanges(name);
      return recv_watchStateChanges();
    }

    public void send_watchStateChanges(java.lang.String name) throws org.apache.thrift.TException
    {
      watchStateChanges_args args = new watchStateChanges_args();
      args.setName(name);
      sendBase("watchStateChanges", args);
    }

    public Subscription recv_watchStateChanges() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      watchStateChanges_result result = new watchStateChanges_result();
      receiveBase(result, "watchStateChanges");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "watchStateChanges failed: unknown result");
    }

    public Subscription watchModelChanges(java.lang.String name, java.lang.String repositoryUri, java.util.List<java.lang.String> filePath, java.lang.String clientID, SubscriptionDurability durableEvents) throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      send_watchModelChanges(name, repositoryUri, filePath, clientID, durableEvents);
      return recv_watchModelChanges();
    }

    public void send_watchModelChanges(java.lang.String name, java.lang.String repositoryUri, java.util.List<java.lang.String> filePath, java.lang.String clientID, SubscriptionDurability durableEvents) throws org.apache.thrift.TException
    {
      watchModelChanges_args args = new watchModelChanges_args();
      args.setName(name);
      args.setRepositoryUri(repositoryUri);
      args.setFilePath(filePath);
      args.setClientID(clientID);
      args.setDurableEvents(durableEvents);
      sendBase("watchModelChanges", args);
    }

    public Subscription recv_watchModelChanges() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException
    {
      watchModelChanges_result result = new watchModelChanges_result();
      receiveBase(result, "watchModelChanges");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.err1 != null) {
        throw result.err1;
      }
      if (result.err2 != null) {
        throw result.err2;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "watchModelChanges failed: unknown result");
    }

  }
  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      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 createInstance(java.lang.String name, java.lang.String backend, int minimumDelayMillis, int maximumDelayMillis, java.util.List<java.lang.String> enabledPlugins, java.lang.String indexFactory, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      createInstance_call method_call = new createInstance_call(name, backend, minimumDelayMillis, maximumDelayMillis, enabledPlugins, indexFactory, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class createInstance_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private java.lang.String backend;
      private int minimumDelayMillis;
      private int maximumDelayMillis;
      private java.util.List<java.lang.String> enabledPlugins;
      private java.lang.String indexFactory;
      public createInstance_call(java.lang.String name, java.lang.String backend, int minimumDelayMillis, int maximumDelayMillis, java.util.List<java.lang.String> enabledPlugins, java.lang.String indexFactory, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.backend = backend;
        this.minimumDelayMillis = minimumDelayMillis;
        this.maximumDelayMillis = maximumDelayMillis;
        this.enabledPlugins = enabledPlugins;
        this.indexFactory = indexFactory;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
        createInstance_args args = new createInstance_args();
        args.setName(name);
        args.setBackend(backend);
        args.setMinimumDelayMillis(minimumDelayMillis);
        args.setMaximumDelayMillis(maximumDelayMillis);
        args.setEnabledPlugins(enabledPlugins);
        args.setIndexFactory(indexFactory);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkFactoryNotFound, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void listBackends(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listBackends_call method_call = new listBackends_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listBackends_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      public listBackends_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listBackends", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listBackends_args args = new listBackends_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listBackends();
      }
    }

    public void listPlugins(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listPlugins_call method_call = new listPlugins_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listPlugins_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      public listPlugins_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listPlugins", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listPlugins_args args = new listPlugins_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listPlugins();
      }
    }

    public void listPluginDetails(org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkPlugin>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listPluginDetails_call method_call = new listPluginDetails_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listPluginDetails_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<HawkPlugin>> {
      public listPluginDetails_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkPlugin>> 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);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listPluginDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listPluginDetails_args args = new listPluginDetails_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<HawkPlugin> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listPluginDetails();
      }
    }

    public void listInstances(org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkInstance>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listInstances_call method_call = new listInstances_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listInstances_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<HawkInstance>> {
      public listInstances_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkInstance>> 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);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listInstances", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listInstances_args args = new listInstances_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<HawkInstance> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listInstances();
      }
    }

    public void removeInstance(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      removeInstance_call method_call = new removeInstance_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class removeInstance_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      public removeInstance_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
        removeInstance_args args = new removeInstance_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void startInstance(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      startInstance_call method_call = new startInstance_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class startInstance_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      public startInstance_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
        startInstance_args args = new startInstance_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void stopInstance(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      stopInstance_call method_call = new stopInstance_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class stopInstance_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      public stopInstance_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("stopInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
        stopInstance_args args = new stopInstance_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void syncInstance(java.lang.String name, boolean blockUntilDone, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      syncInstance_call method_call = new syncInstance_call(name, blockUntilDone, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class syncInstance_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private boolean blockUntilDone;
      public syncInstance_call(java.lang.String name, boolean blockUntilDone, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.blockUntilDone = blockUntilDone;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("syncInstance", org.apache.thrift.protocol.TMessageType.CALL, 0));
        syncInstance_args args = new syncInstance_args();
        args.setName(name);
        args.setBlockUntilDone(blockUntilDone);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void registerMetamodels(java.lang.String name, java.util.List<File> metamodel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      registerMetamodels_call method_call = new registerMetamodels_call(name, metamodel, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class registerMetamodels_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private java.util.List<File> metamodel;
      public registerMetamodels_call(java.lang.String name, java.util.List<File> metamodel, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.metamodel = metamodel;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerMetamodels", org.apache.thrift.protocol.TMessageType.CALL, 0));
        registerMetamodels_args args = new registerMetamodels_args();
        args.setName(name);
        args.setMetamodel(metamodel);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, InvalidMetamodel, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void unregisterMetamodels(java.lang.String name, java.util.List<java.lang.String> metamodel, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      unregisterMetamodels_call method_call = new unregisterMetamodels_call(name, metamodel, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class unregisterMetamodels_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private java.util.List<java.lang.String> metamodel;
      public unregisterMetamodels_call(java.lang.String name, java.util.List<java.lang.String> metamodel, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.metamodel = metamodel;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("unregisterMetamodels", org.apache.thrift.protocol.TMessageType.CALL, 0));
        unregisterMetamodels_args args = new unregisterMetamodels_args();
        args.setName(name);
        args.setMetamodel(metamodel);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void listMetamodels(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listMetamodels_call method_call = new listMetamodels_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listMetamodels_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      private java.lang.String name;
      public listMetamodels_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listMetamodels", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listMetamodels_args args = new listMetamodels_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listMetamodels();
      }
    }

    public void listTypeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listTypeNames_call method_call = new listTypeNames_call(hawkInstanceName, metamodelURI, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listTypeNames_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      private java.lang.String hawkInstanceName;
      private java.lang.String metamodelURI;
      public listTypeNames_call(java.lang.String hawkInstanceName, java.lang.String metamodelURI, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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.hawkInstanceName = hawkInstanceName;
        this.metamodelURI = metamodelURI;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listTypeNames", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listTypeNames_args args = new listTypeNames_args();
        args.setHawkInstanceName(hawkInstanceName);
        args.setMetamodelURI(metamodelURI);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listTypeNames();
      }
    }

    public void listAttributeNames(java.lang.String hawkInstanceName, java.lang.String metamodelURI, java.lang.String typeName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listAttributeNames_call method_call = new listAttributeNames_call(hawkInstanceName, metamodelURI, typeName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listAttributeNames_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      private java.lang.String hawkInstanceName;
      private java.lang.String metamodelURI;
      private java.lang.String typeName;
      public listAttributeNames_call(java.lang.String hawkInstanceName, java.lang.String metamodelURI, java.lang.String typeName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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.hawkInstanceName = hawkInstanceName;
        this.metamodelURI = metamodelURI;
        this.typeName = typeName;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listAttributeNames", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listAttributeNames_args args = new listAttributeNames_args();
        args.setHawkInstanceName(hawkInstanceName);
        args.setMetamodelURI(metamodelURI);
        args.setTypeName(typeName);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, HawkMetamodelNotFound, HawkTypeNotFound, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listAttributeNames();
      }
    }

    public void listMetamodelParsers(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MetamodelParserDetails>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listMetamodelParsers_call method_call = new listMetamodelParsers_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listMetamodelParsers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<MetamodelParserDetails>> {
      private java.lang.String name;
      public listMetamodelParsers_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MetamodelParserDetails>> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listMetamodelParsers", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listMetamodelParsers_args args = new listMetamodelParsers_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<MetamodelParserDetails> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listMetamodelParsers();
      }
    }

    public void listQueryLanguages(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listQueryLanguages_call method_call = new listQueryLanguages_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listQueryLanguages_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      private java.lang.String name;
      public listQueryLanguages_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listQueryLanguages", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listQueryLanguages_args args = new listQueryLanguages_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listQueryLanguages();
      }
    }

    public void query(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<QueryResult> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      query_call method_call = new query_call(name, query, language, options, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class query_call extends org.apache.thrift.async.TAsyncMethodCall<QueryResult> {
      private java.lang.String name;
      private java.lang.String query;
      private java.lang.String language;
      private HawkQueryOptions options;
      public query_call(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<QueryResult> 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.name = name;
        this.query = query;
        this.language = language;
        this.options = options;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("query", org.apache.thrift.protocol.TMessageType.CALL, 0));
        query_args args = new query_args();
        args.setName(name);
        args.setQuery(query);
        args.setLanguage(language);
        args.setOptions(options);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public QueryResult getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_query();
      }
    }

    public void timedQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<QueryReport> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      timedQuery_call method_call = new timedQuery_call(name, query, language, options, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class timedQuery_call extends org.apache.thrift.async.TAsyncMethodCall<QueryReport> {
      private java.lang.String name;
      private java.lang.String query;
      private java.lang.String language;
      private HawkQueryOptions options;
      public timedQuery_call(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<QueryReport> 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.name = name;
        this.query = query;
        this.language = language;
        this.options = options;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("timedQuery", org.apache.thrift.protocol.TMessageType.CALL, 0));
        timedQuery_args args = new timedQuery_args();
        args.setName(name);
        args.setQuery(query);
        args.setLanguage(language);
        args.setOptions(options);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public QueryReport getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, FailedQuery, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_timedQuery();
      }
    }

    public void resolveProxies(java.lang.String name, java.util.List<java.lang.String> ids, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      resolveProxies_call method_call = new resolveProxies_call(name, ids, options, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class resolveProxies_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ModelElement>> {
      private java.lang.String name;
      private java.util.List<java.lang.String> ids;
      private HawkQueryOptions options;
      public resolveProxies_call(java.lang.String name, java.util.List<java.lang.String> ids, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> 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.name = name;
        this.ids = ids;
        this.options = options;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resolveProxies", org.apache.thrift.protocol.TMessageType.CALL, 0));
        resolveProxies_args args = new resolveProxies_args();
        args.setName(name);
        args.setIds(ids);
        args.setOptions(options);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<ModelElement> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_resolveProxies();
      }
    }

    public void asyncQuery(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      asyncQuery_call method_call = new asyncQuery_call(name, query, language, options, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class asyncQuery_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
      private java.lang.String name;
      private java.lang.String query;
      private java.lang.String language;
      private HawkQueryOptions options;
      public asyncQuery_call(java.lang.String name, java.lang.String query, java.lang.String language, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> 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.name = name;
        this.query = query;
        this.language = language;
        this.options = options;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("asyncQuery", org.apache.thrift.protocol.TMessageType.CALL, 0));
        asyncQuery_args args = new asyncQuery_args();
        args.setName(name);
        args.setQuery(query);
        args.setLanguage(language);
        args.setOptions(options);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.lang.String getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownQueryLanguage, InvalidQuery, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_asyncQuery();
      }
    }

    public void cancelAsyncQuery(java.lang.String queryID, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      cancelAsyncQuery_call method_call = new cancelAsyncQuery_call(queryID, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class cancelAsyncQuery_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String queryID;
      public cancelAsyncQuery_call(java.lang.String queryID, org.apache.thrift.async.AsyncMethodCallback<Void> 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.queryID = queryID;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelAsyncQuery", org.apache.thrift.protocol.TMessageType.CALL, 0));
        cancelAsyncQuery_args args = new cancelAsyncQuery_args();
        args.setQueryID(queryID);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws InvalidQuery, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void fetchAsyncQueryResults(java.lang.String queryID, org.apache.thrift.async.AsyncMethodCallback<QueryReport> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      fetchAsyncQueryResults_call method_call = new fetchAsyncQueryResults_call(queryID, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class fetchAsyncQueryResults_call extends org.apache.thrift.async.TAsyncMethodCall<QueryReport> {
      private java.lang.String queryID;
      public fetchAsyncQueryResults_call(java.lang.String queryID, org.apache.thrift.async.AsyncMethodCallback<QueryReport> 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.queryID = queryID;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchAsyncQueryResults", org.apache.thrift.protocol.TMessageType.CALL, 0));
        fetchAsyncQueryResults_args args = new fetchAsyncQueryResults_args();
        args.setQueryID(queryID);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public QueryReport getResult() throws InvalidQuery, FailedQuery, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_fetchAsyncQueryResults();
      }
    }

    public void addRepository(java.lang.String name, Repository repo, Credentials credentials, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addRepository_call method_call = new addRepository_call(name, repo, credentials, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addRepository_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private Repository repo;
      private Credentials credentials;
      public addRepository_call(java.lang.String name, Repository repo, Credentials credentials, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.repo = repo;
        this.credentials = credentials;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addRepository", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addRepository_args args = new addRepository_args();
        args.setName(name);
        args.setRepo(repo);
        args.setCredentials(credentials);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, UnknownRepositoryType, VCSAuthenticationFailed, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void isFrozen(java.lang.String name, java.lang.String uri, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isFrozen_call method_call = new isFrozen_call(name, uri, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isFrozen_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
      private java.lang.String name;
      private java.lang.String uri;
      public isFrozen_call(java.lang.String name, java.lang.String uri, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> 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.name = name;
        this.uri = uri;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isFrozen", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isFrozen_args args = new isFrozen_args();
        args.setName(name);
        args.setUri(uri);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.lang.Boolean getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_isFrozen();
      }
    }

    public void setFrozen(java.lang.String name, java.lang.String uri, boolean isFrozen, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      setFrozen_call method_call = new setFrozen_call(name, uri, isFrozen, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class setFrozen_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private java.lang.String uri;
      private boolean isFrozen;
      public setFrozen_call(java.lang.String name, java.lang.String uri, boolean isFrozen, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.uri = uri;
        this.isFrozen = isFrozen;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setFrozen", org.apache.thrift.protocol.TMessageType.CALL, 0));
        setFrozen_args args = new setFrozen_args();
        args.setName(name);
        args.setUri(uri);
        args.setIsFrozen(isFrozen);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void removeRepository(java.lang.String name, java.lang.String uri, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      removeRepository_call method_call = new removeRepository_call(name, uri, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class removeRepository_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private java.lang.String uri;
      public removeRepository_call(java.lang.String name, java.lang.String uri, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.uri = uri;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeRepository", org.apache.thrift.protocol.TMessageType.CALL, 0));
        removeRepository_args args = new removeRepository_args();
        args.setName(name);
        args.setUri(uri);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void updateRepositoryCredentials(java.lang.String name, java.lang.String uri, Credentials cred, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateRepositoryCredentials_call method_call = new updateRepositoryCredentials_call(name, uri, cred, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateRepositoryCredentials_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private java.lang.String uri;
      private Credentials cred;
      public updateRepositoryCredentials_call(java.lang.String name, java.lang.String uri, Credentials cred, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.uri = uri;
        this.cred = cred;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateRepositoryCredentials", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateRepositoryCredentials_args args = new updateRepositoryCredentials_args();
        args.setName(name);
        args.setUri(uri);
        args.setCred(cred);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void listRepositories(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Repository>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listRepositories_call method_call = new listRepositories_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listRepositories_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<Repository>> {
      private java.lang.String name;
      public listRepositories_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Repository>> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listRepositories", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listRepositories_args args = new listRepositories_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<Repository> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listRepositories();
      }
    }

    public void listRepositoryTypes(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listRepositoryTypes_call method_call = new listRepositoryTypes_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listRepositoryTypes_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      public listRepositoryTypes_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listRepositoryTypes", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listRepositoryTypes_args args = new listRepositoryTypes_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listRepositoryTypes();
      }
    }

    public void listFiles(java.lang.String name, java.util.List<java.lang.String> repository, java.util.List<java.lang.String> filePatterns, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listFiles_call method_call = new listFiles_call(name, repository, filePatterns, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listFiles_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<java.lang.String>> {
      private java.lang.String name;
      private java.util.List<java.lang.String> repository;
      private java.util.List<java.lang.String> filePatterns;
      public listFiles_call(java.lang.String name, java.util.List<java.lang.String> repository, java.util.List<java.lang.String> filePatterns, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> 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.name = name;
        this.repository = repository;
        this.filePatterns = filePatterns;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listFiles", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listFiles_args args = new listFiles_args();
        args.setName(name);
        args.setRepository(repository);
        args.setFilePatterns(filePatterns);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<java.lang.String> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listFiles();
      }
    }

    public void configurePolling(java.lang.String name, int base, int max, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      configurePolling_call method_call = new configurePolling_call(name, base, max, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class configurePolling_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private int base;
      private int max;
      public configurePolling_call(java.lang.String name, int base, int max, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.base = base;
        this.max = max;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("configurePolling", org.apache.thrift.protocol.TMessageType.CALL, 0));
        configurePolling_args args = new configurePolling_args();
        args.setName(name);
        args.setBase(base);
        args.setMax(max);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidPollingConfiguration, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void addDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addDerivedAttribute_call method_call = new addDerivedAttribute_call(name, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addDerivedAttribute_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private DerivedAttributeSpec spec;
      public addDerivedAttribute_call(java.lang.String name, DerivedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addDerivedAttribute", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addDerivedAttribute_args args = new addDerivedAttribute_args();
        args.setName(name);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidDerivedAttributeSpec, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void removeDerivedAttribute(java.lang.String name, DerivedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      removeDerivedAttribute_call method_call = new removeDerivedAttribute_call(name, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class removeDerivedAttribute_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private DerivedAttributeSpec spec;
      public removeDerivedAttribute_call(java.lang.String name, DerivedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeDerivedAttribute", org.apache.thrift.protocol.TMessageType.CALL, 0));
        removeDerivedAttribute_args args = new removeDerivedAttribute_args();
        args.setName(name);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void listDerivedAttributes(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<DerivedAttributeSpec>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listDerivedAttributes_call method_call = new listDerivedAttributes_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listDerivedAttributes_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<DerivedAttributeSpec>> {
      private java.lang.String name;
      public listDerivedAttributes_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<DerivedAttributeSpec>> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listDerivedAttributes", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listDerivedAttributes_args args = new listDerivedAttributes_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<DerivedAttributeSpec> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listDerivedAttributes();
      }
    }

    public void addIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addIndexedAttribute_call method_call = new addIndexedAttribute_call(name, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addIndexedAttribute_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private IndexedAttributeSpec spec;
      public addIndexedAttribute_call(java.lang.String name, IndexedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addIndexedAttribute", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addIndexedAttribute_args args = new addIndexedAttribute_args();
        args.setName(name);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, InvalidIndexedAttributeSpec, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void removeIndexedAttribute(java.lang.String name, IndexedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      removeIndexedAttribute_call method_call = new removeIndexedAttribute_call(name, spec, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class removeIndexedAttribute_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
      private java.lang.String name;
      private IndexedAttributeSpec spec;
      public removeIndexedAttribute_call(java.lang.String name, IndexedAttributeSpec spec, org.apache.thrift.async.AsyncMethodCallback<Void> 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.name = name;
        this.spec = spec;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("removeIndexedAttribute", org.apache.thrift.protocol.TMessageType.CALL, 0));
        removeIndexedAttribute_args args = new removeIndexedAttribute_args();
        args.setName(name);
        args.setSpec(spec);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Void getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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 null;
      }
    }

    public void listIndexedAttributes(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<IndexedAttributeSpec>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      listIndexedAttributes_call method_call = new listIndexedAttributes_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class listIndexedAttributes_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<IndexedAttributeSpec>> {
      private java.lang.String name;
      public listIndexedAttributes_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<java.util.List<IndexedAttributeSpec>> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listIndexedAttributes", org.apache.thrift.protocol.TMessageType.CALL, 0));
        listIndexedAttributes_args args = new listIndexedAttributes_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<IndexedAttributeSpec> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_listIndexedAttributes();
      }
    }

    public void getModel(java.lang.String name, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getModel_call method_call = new getModel_call(name, options, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getModel_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ModelElement>> {
      private java.lang.String name;
      private HawkQueryOptions options;
      public getModel_call(java.lang.String name, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> 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.name = name;
        this.options = options;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getModel", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getModel_args args = new getModel_args();
        args.setName(name);
        args.setOptions(options);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<ModelElement> getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_getModel();
      }
    }

    public void getRootElements(java.lang.String name, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getRootElements_call method_call = new getRootElements_call(name, options, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getRootElements_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ModelElement>> {
      private java.lang.String name;
      private HawkQueryOptions options;
      public getRootElements_call(java.lang.String name, HawkQueryOptions options, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> 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.name = name;
        this.options = options;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRootElements", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getRootElements_args args = new getRootElements_args();
        args.setName(name);
        args.setOptions(options);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public java.util.List<ModelElement> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_getRootElements();
      }
    }

    public void watchStateChanges(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Subscription> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      watchStateChanges_call method_call = new watchStateChanges_call(name, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class watchStateChanges_call extends org.apache.thrift.async.TAsyncMethodCall<Subscription> {
      private java.lang.String name;
      public watchStateChanges_call(java.lang.String name, org.apache.thrift.async.AsyncMethodCallback<Subscription> 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.name = name;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("watchStateChanges", org.apache.thrift.protocol.TMessageType.CALL, 0));
        watchStateChanges_args args = new watchStateChanges_args();
        args.setName(name);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Subscription getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_watchStateChanges();
      }
    }

    public void watchModelChanges(java.lang.String name, java.lang.String repositoryUri, java.util.List<java.lang.String> filePath, java.lang.String clientID, SubscriptionDurability durableEvents, org.apache.thrift.async.AsyncMethodCallback<Subscription> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      watchModelChanges_call method_call = new watchModelChanges_call(name, repositoryUri, filePath, clientID, durableEvents, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class watchModelChanges_call extends org.apache.thrift.async.TAsyncMethodCall<Subscription> {
      private java.lang.String name;
      private java.lang.String repositoryUri;
      private java.util.List<java.lang.String> filePath;
      private java.lang.String clientID;
      private SubscriptionDurability durableEvents;
      public watchModelChanges_call(java.lang.String name, java.lang.String repositoryUri, java.util.List<java.lang.String> filePath, java.lang.String clientID, SubscriptionDurability durableEvents, org.apache.thrift.async.AsyncMethodCallback<Subscription> 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.name = name;
        this.repositoryUri = repositoryUri;
        this.filePath = filePath;
        this.clientID = clientID;
        this.durableEvents = durableEvents;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("watchModelChanges", org.apache.thrift.protocol.TMessageType.CALL, 0));
        watchModelChanges_args args = new watchModelChanges_args();
        args.setName(name);
        args.setRepositoryUri(repositoryUri);
        args.setFilePath(filePath);
        args.setClientID(clientID);
        args.setDurableEvents(durableEvents);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Subscription getResult() throws HawkInstanceNotFound, HawkInstanceNotRunning, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new java.lang.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_watchModelChanges();
      }
    }

  }

  public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
    private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends Iface> java.util.Map<java.lang.String,  org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("createInstance", new createInstance());
      processMap.put("listBackends", new listBackends());
      processMap.put("listPlugins", new listPlugins());
      processMap.put("listPluginDetails", new listPluginDetails());
      processMap.put("listInstances", new listInstances());
      processMap.put("removeInstance", new removeInstance());
      processMap.put("startInstance", new startInstance());
      processMap.put("stopInstance", new stopInstance());
      processMap.put("syncInstance", new syncInstance());
      processMap.put("registerMetamodels", new registerMetamodels());
      processMap.put("unregisterMetamodels", new unregisterMetamodels());
      processMap.put("listMetamodels", new listMetamodels());
      processMap.put("listTypeNames", new listTypeNames());
      processMap.put("listAttributeNames", new listAttributeNames());
      processMap.put("listMetamodelParsers", new listMetamodelParsers());
      processMap.put("listQueryLanguages", new listQueryLanguages());
      processMap.put("query", new query());
      processMap.put("timedQuery", new timedQuery());
      processMap.put("resolveProxies", new resolveProxies());
      processMap.put("asyncQuery", new asyncQuery());
      processMap.put("cancelAsyncQuery", new cancelAsyncQuery());
      processMap.put("fetchAsyncQueryResults", new fetchAsyncQueryResults());
      processMap.put("addRepository", new addRepository());
      processMap.put("isFrozen", new isFrozen());
      processMap.put("setFrozen", new setFrozen());
      processMap.put("removeRepository", new removeRepository());
      processMap.put("updateRepositoryCredentials", new updateRepositoryCredentials());
      processMap.put("listRepositories", new listRepositories());
      processMap.put("listRepositoryTypes", new listRepositoryTypes());
      processMap.put("listFiles", new listFiles());
      processMap.put("configurePolling", new configurePolling());
      processMap.put("addDerivedAttribute", new addDerivedAttribute());
      processMap.put("removeDerivedAttribute", new removeDerivedAttribute());
      processMap.put("listDerivedAttributes", new listDerivedAttributes());
      processMap.put("addIndexedAttribute", new addIndexedAttribute());
      processMap.put("removeIndexedAttribute", new removeIndexedAttribute());
      processMap.put("listIndexedAttributes", new listIndexedAttributes());
      processMap.put("getModel", new getModel());
      processMap.put("getRootElements", new getRootElements());
      processMap.put("watchStateChanges", new watchStateChanges());
      processMap.put("watchModelChanges", new watchModelChanges());
      return processMap;
    }

    public static class createInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInstance_args> {
      public createInstance() {
        super("createInstance");
      }

      public createInstance_args getEmptyArgsInstance() {
        return new createInstance_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public createInstance_result getResult(I iface, createInstance_args args) throws org.apache.thrift.TException {
        createInstance_result result = new createInstance_result();
        try {
          iface.createInstance(args.name, args.backend, args.minimumDelayMillis, args.maximumDelayMillis, args.enabledPlugins, args.indexFactory);
        } catch (HawkFactoryNotFound err1) {
          result.err1 = err1;
        }
        return result;
      }
    }

    public static class listBackends<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listBackends_args> {
      public listBackends() {
        super("listBackends");
      }

      public listBackends_args getEmptyArgsInstance() {
        return new listBackends_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listBackends_result getResult(I iface, listBackends_args args) throws org.apache.thrift.TException {
        listBackends_result result = new listBackends_result();
        result.success = iface.listBackends();
        return result;
      }
    }

    public static class listPlugins<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listPlugins_args> {
      public listPlugins() {
        super("listPlugins");
      }

      public listPlugins_args getEmptyArgsInstance() {
        return new listPlugins_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listPlugins_result getResult(I iface, listPlugins_args args) throws org.apache.thrift.TException {
        listPlugins_result result = new listPlugins_result();
        result.success = iface.listPlugins();
        return result;
      }
    }

    public static class listPluginDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listPluginDetails_args> {
      public listPluginDetails() {
        super("listPluginDetails");
      }

      public listPluginDetails_args getEmptyArgsInstance() {
        return new listPluginDetails_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listPluginDetails_result getResult(I iface, listPluginDetails_args args) throws org.apache.thrift.TException {
        listPluginDetails_result result = new listPluginDetails_result();
        result.success = iface.listPluginDetails();
        return result;
      }
    }

    public static class listInstances<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listInstances_args> {
      public listInstances() {
        super("listInstances");
      }

      public listInstances_args getEmptyArgsInstance() {
        return new listInstances_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listInstances_result getResult(I iface, listInstances_args args) throws org.apache.thrift.TException {
        listInstances_result result = new listInstances_result();
        result.success = iface.listInstances();
        return result;
      }
    }

    public static class removeInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeInstance_args> {
      public removeInstance() {
        super("removeInstance");
      }

      public removeInstance_args getEmptyArgsInstance() {
        return new removeInstance_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public removeInstance_result getResult(I iface, removeInstance_args args) throws org.apache.thrift.TException {
        removeInstance_result result = new removeInstance_result();
        try {
          iface.removeInstance(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        }
        return result;
      }
    }

    public static class startInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, startInstance_args> {
      public startInstance() {
        super("startInstance");
      }

      public startInstance_args getEmptyArgsInstance() {
        return new startInstance_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public startInstance_result getResult(I iface, startInstance_args args) throws org.apache.thrift.TException {
        startInstance_result result = new startInstance_result();
        try {
          iface.startInstance(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        }
        return result;
      }
    }

    public static class stopInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, stopInstance_args> {
      public stopInstance() {
        super("stopInstance");
      }

      public stopInstance_args getEmptyArgsInstance() {
        return new stopInstance_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public stopInstance_result getResult(I iface, stopInstance_args args) throws org.apache.thrift.TException {
        stopInstance_result result = new stopInstance_result();
        try {
          iface.stopInstance(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class syncInstance<I extends Iface> extends org.apache.thrift.ProcessFunction<I, syncInstance_args> {
      public syncInstance() {
        super("syncInstance");
      }

      public syncInstance_args getEmptyArgsInstance() {
        return new syncInstance_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public syncInstance_result getResult(I iface, syncInstance_args args) throws org.apache.thrift.TException {
        syncInstance_result result = new syncInstance_result();
        try {
          iface.syncInstance(args.name, args.blockUntilDone);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class registerMetamodels<I extends Iface> extends org.apache.thrift.ProcessFunction<I, registerMetamodels_args> {
      public registerMetamodels() {
        super("registerMetamodels");
      }

      public registerMetamodels_args getEmptyArgsInstance() {
        return new registerMetamodels_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public registerMetamodels_result getResult(I iface, registerMetamodels_args args) throws org.apache.thrift.TException {
        registerMetamodels_result result = new registerMetamodels_result();
        try {
          iface.registerMetamodels(args.name, args.metamodel);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (InvalidMetamodel err2) {
          result.err2 = err2;
        } catch (HawkInstanceNotRunning err3) {
          result.err3 = err3;
        }
        return result;
      }
    }

    public static class unregisterMetamodels<I extends Iface> extends org.apache.thrift.ProcessFunction<I, unregisterMetamodels_args> {
      public unregisterMetamodels() {
        super("unregisterMetamodels");
      }

      public unregisterMetamodels_args getEmptyArgsInstance() {
        return new unregisterMetamodels_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public unregisterMetamodels_result getResult(I iface, unregisterMetamodels_args args) throws org.apache.thrift.TException {
        unregisterMetamodels_result result = new unregisterMetamodels_result();
        try {
          iface.unregisterMetamodels(args.name, args.metamodel);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class listMetamodels<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listMetamodels_args> {
      public listMetamodels() {
        super("listMetamodels");
      }

      public listMetamodels_args getEmptyArgsInstance() {
        return new listMetamodels_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listMetamodels_result getResult(I iface, listMetamodels_args args) throws org.apache.thrift.TException {
        listMetamodels_result result = new listMetamodels_result();
        try {
          result.success = iface.listMetamodels(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class listTypeNames<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listTypeNames_args> {
      public listTypeNames() {
        super("listTypeNames");
      }

      public listTypeNames_args getEmptyArgsInstance() {
        return new listTypeNames_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listTypeNames_result getResult(I iface, listTypeNames_args args) throws org.apache.thrift.TException {
        listTypeNames_result result = new listTypeNames_result();
        try {
          result.success = iface.listTypeNames(args.hawkInstanceName, args.metamodelURI);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (HawkMetamodelNotFound err3) {
          result.err3 = err3;
        }
        return result;
      }
    }

    public static class listAttributeNames<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listAttributeNames_args> {
      public listAttributeNames() {
        super("listAttributeNames");
      }

      public listAttributeNames_args getEmptyArgsInstance() {
        return new listAttributeNames_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listAttributeNames_result getResult(I iface, listAttributeNames_args args) throws org.apache.thrift.TException {
        listAttributeNames_result result = new listAttributeNames_result();
        try {
          result.success = iface.listAttributeNames(args.hawkInstanceName, args.metamodelURI, args.typeName);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (HawkMetamodelNotFound err3) {
          result.err3 = err3;
        } catch (HawkTypeNotFound err4) {
          result.err4 = err4;
        }
        return result;
      }
    }

    public static class listMetamodelParsers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listMetamodelParsers_args> {
      public listMetamodelParsers() {
        super("listMetamodelParsers");
      }

      public listMetamodelParsers_args getEmptyArgsInstance() {
        return new listMetamodelParsers_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listMetamodelParsers_result getResult(I iface, listMetamodelParsers_args args) throws org.apache.thrift.TException {
        listMetamodelParsers_result result = new listMetamodelParsers_result();
        try {
          result.success = iface.listMetamodelParsers(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class listQueryLanguages<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listQueryLanguages_args> {
      public listQueryLanguages() {
        super("listQueryLanguages");
      }

      public listQueryLanguages_args getEmptyArgsInstance() {
        return new listQueryLanguages_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listQueryLanguages_result getResult(I iface, listQueryLanguages_args args) throws org.apache.thrift.TException {
        listQueryLanguages_result result = new listQueryLanguages_result();
        result.success = iface.listQueryLanguages(args.name);
        return result;
      }
    }

    public static class query<I extends Iface> extends org.apache.thrift.ProcessFunction<I, query_args> {
      public query() {
        super("query");
      }

      public query_args getEmptyArgsInstance() {
        return new query_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public query_result getResult(I iface, query_args args) throws org.apache.thrift.TException {
        query_result result = new query_result();
        try {
          result.success = iface.query(args.name, args.query, args.language, args.options);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (UnknownQueryLanguage err3) {
          result.err3 = err3;
        } catch (InvalidQuery err4) {
          result.err4 = err4;
        } catch (FailedQuery err5) {
          result.err5 = err5;
        }
        return result;
      }
    }

    public static class timedQuery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, timedQuery_args> {
      public timedQuery() {
        super("timedQuery");
      }

      public timedQuery_args getEmptyArgsInstance() {
        return new timedQuery_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public timedQuery_result getResult(I iface, timedQuery_args args) throws org.apache.thrift.TException {
        timedQuery_result result = new timedQuery_result();
        try {
          result.success = iface.timedQuery(args.name, args.query, args.language, args.options);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (UnknownQueryLanguage err3) {
          result.err3 = err3;
        } catch (InvalidQuery err4) {
          result.err4 = err4;
        } catch (FailedQuery err5) {
          result.err5 = err5;
        }
        return result;
      }
    }

    public static class resolveProxies<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resolveProxies_args> {
      public resolveProxies() {
        super("resolveProxies");
      }

      public resolveProxies_args getEmptyArgsInstance() {
        return new resolveProxies_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public resolveProxies_result getResult(I iface, resolveProxies_args args) throws org.apache.thrift.TException {
        resolveProxies_result result = new resolveProxies_result();
        try {
          result.success = iface.resolveProxies(args.name, args.ids, args.options);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class asyncQuery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, asyncQuery_args> {
      public asyncQuery() {
        super("asyncQuery");
      }

      public asyncQuery_args getEmptyArgsInstance() {
        return new asyncQuery_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public asyncQuery_result getResult(I iface, asyncQuery_args args) throws org.apache.thrift.TException {
        asyncQuery_result result = new asyncQuery_result();
        try {
          result.success = iface.asyncQuery(args.name, args.query, args.language, args.options);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (UnknownQueryLanguage err3) {
          result.err3 = err3;
        } catch (InvalidQuery err4) {
          result.err4 = err4;
        }
        return result;
      }
    }

    public static class cancelAsyncQuery<I extends Iface> extends org.apache.thrift.ProcessFunction<I, cancelAsyncQuery_args> {
      public cancelAsyncQuery() {
        super("cancelAsyncQuery");
      }

      public cancelAsyncQuery_args getEmptyArgsInstance() {
        return new cancelAsyncQuery_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public cancelAsyncQuery_result getResult(I iface, cancelAsyncQuery_args args) throws org.apache.thrift.TException {
        cancelAsyncQuery_result result = new cancelAsyncQuery_result();
        try {
          iface.cancelAsyncQuery(args.queryID);
        } catch (InvalidQuery err1) {
          result.err1 = err1;
        }
        return result;
      }
    }

    public static class fetchAsyncQueryResults<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchAsyncQueryResults_args> {
      public fetchAsyncQueryResults() {
        super("fetchAsyncQueryResults");
      }

      public fetchAsyncQueryResults_args getEmptyArgsInstance() {
        return new fetchAsyncQueryResults_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public fetchAsyncQueryResults_result getResult(I iface, fetchAsyncQueryResults_args args) throws org.apache.thrift.TException {
        fetchAsyncQueryResults_result result = new fetchAsyncQueryResults_result();
        try {
          result.success = iface.fetchAsyncQueryResults(args.queryID);
        } catch (InvalidQuery err1) {
          result.err1 = err1;
        } catch (FailedQuery err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class addRepository<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addRepository_args> {
      public addRepository() {
        super("addRepository");
      }

      public addRepository_args getEmptyArgsInstance() {
        return new addRepository_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public addRepository_result getResult(I iface, addRepository_args args) throws org.apache.thrift.TException {
        addRepository_result result = new addRepository_result();
        try {
          iface.addRepository(args.name, args.repo, args.credentials);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (UnknownRepositoryType err3) {
          result.err3 = err3;
        } catch (VCSAuthenticationFailed err4) {
          result.err4 = err4;
        }
        return result;
      }
    }

    public static class isFrozen<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isFrozen_args> {
      public isFrozen() {
        super("isFrozen");
      }

      public isFrozen_args getEmptyArgsInstance() {
        return new isFrozen_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public isFrozen_result getResult(I iface, isFrozen_args args) throws org.apache.thrift.TException {
        isFrozen_result result = new isFrozen_result();
        try {
          result.success = iface.isFrozen(args.name, args.uri);
          result.setSuccessIsSet(true);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class setFrozen<I extends Iface> extends org.apache.thrift.ProcessFunction<I, setFrozen_args> {
      public setFrozen() {
        super("setFrozen");
      }

      public setFrozen_args getEmptyArgsInstance() {
        return new setFrozen_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public setFrozen_result getResult(I iface, setFrozen_args args) throws org.apache.thrift.TException {
        setFrozen_result result = new setFrozen_result();
        try {
          iface.setFrozen(args.name, args.uri, args.isFrozen);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class removeRepository<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeRepository_args> {
      public removeRepository() {
        super("removeRepository");
      }

      public removeRepository_args getEmptyArgsInstance() {
        return new removeRepository_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public removeRepository_result getResult(I iface, removeRepository_args args) throws org.apache.thrift.TException {
        removeRepository_result result = new removeRepository_result();
        try {
          iface.removeRepository(args.name, args.uri);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class updateRepositoryCredentials<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateRepositoryCredentials_args> {
      public updateRepositoryCredentials() {
        super("updateRepositoryCredentials");
      }

      public updateRepositoryCredentials_args getEmptyArgsInstance() {
        return new updateRepositoryCredentials_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public updateRepositoryCredentials_result getResult(I iface, updateRepositoryCredentials_args args) throws org.apache.thrift.TException {
        updateRepositoryCredentials_result result = new updateRepositoryCredentials_result();
        try {
          iface.updateRepositoryCredentials(args.name, args.uri, args.cred);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class listRepositories<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listRepositories_args> {
      public listRepositories() {
        super("listRepositories");
      }

      public listRepositories_args getEmptyArgsInstance() {
        return new listRepositories_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listRepositories_result getResult(I iface, listRepositories_args args) throws org.apache.thrift.TException {
        listRepositories_result result = new listRepositories_result();
        try {
          result.success = iface.listRepositories(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class listRepositoryTypes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listRepositoryTypes_args> {
      public listRepositoryTypes() {
        super("listRepositoryTypes");
      }

      public listRepositoryTypes_args getEmptyArgsInstance() {
        return new listRepositoryTypes_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listRepositoryTypes_result getResult(I iface, listRepositoryTypes_args args) throws org.apache.thrift.TException {
        listRepositoryTypes_result result = new listRepositoryTypes_result();
        result.success = iface.listRepositoryTypes();
        return result;
      }
    }

    public static class listFiles<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listFiles_args> {
      public listFiles() {
        super("listFiles");
      }

      public listFiles_args getEmptyArgsInstance() {
        return new listFiles_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listFiles_result getResult(I iface, listFiles_args args) throws org.apache.thrift.TException {
        listFiles_result result = new listFiles_result();
        try {
          result.success = iface.listFiles(args.name, args.repository, args.filePatterns);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class configurePolling<I extends Iface> extends org.apache.thrift.ProcessFunction<I, configurePolling_args> {
      public configurePolling() {
        super("configurePolling");
      }

      public configurePolling_args getEmptyArgsInstance() {
        return new configurePolling_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public configurePolling_result getResult(I iface, configurePolling_args args) throws org.apache.thrift.TException {
        configurePolling_result result = new configurePolling_result();
        try {
          iface.configurePolling(args.name, args.base, args.max);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (InvalidPollingConfiguration err3) {
          result.err3 = err3;
        }
        return result;
      }
    }

    public static class addDerivedAttribute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addDerivedAttribute_args> {
      public addDerivedAttribute() {
        super("addDerivedAttribute");
      }

      public addDerivedAttribute_args getEmptyArgsInstance() {
        return new addDerivedAttribute_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public addDerivedAttribute_result getResult(I iface, addDerivedAttribute_args args) throws org.apache.thrift.TException {
        addDerivedAttribute_result result = new addDerivedAttribute_result();
        try {
          iface.addDerivedAttribute(args.name, args.spec);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (InvalidDerivedAttributeSpec err3) {
          result.err3 = err3;
        }
        return result;
      }
    }

    public static class removeDerivedAttribute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeDerivedAttribute_args> {
      public removeDerivedAttribute() {
        super("removeDerivedAttribute");
      }

      public removeDerivedAttribute_args getEmptyArgsInstance() {
        return new removeDerivedAttribute_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public removeDerivedAttribute_result getResult(I iface, removeDerivedAttribute_args args) throws org.apache.thrift.TException {
        removeDerivedAttribute_result result = new removeDerivedAttribute_result();
        try {
          iface.removeDerivedAttribute(args.name, args.spec);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class listDerivedAttributes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listDerivedAttributes_args> {
      public listDerivedAttributes() {
        super("listDerivedAttributes");
      }

      public listDerivedAttributes_args getEmptyArgsInstance() {
        return new listDerivedAttributes_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listDerivedAttributes_result getResult(I iface, listDerivedAttributes_args args) throws org.apache.thrift.TException {
        listDerivedAttributes_result result = new listDerivedAttributes_result();
        try {
          result.success = iface.listDerivedAttributes(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class addIndexedAttribute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addIndexedAttribute_args> {
      public addIndexedAttribute() {
        super("addIndexedAttribute");
      }

      public addIndexedAttribute_args getEmptyArgsInstance() {
        return new addIndexedAttribute_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public addIndexedAttribute_result getResult(I iface, addIndexedAttribute_args args) throws org.apache.thrift.TException {
        addIndexedAttribute_result result = new addIndexedAttribute_result();
        try {
          iface.addIndexedAttribute(args.name, args.spec);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        } catch (InvalidIndexedAttributeSpec err3) {
          result.err3 = err3;
        }
        return result;
      }
    }

    public static class removeIndexedAttribute<I extends Iface> extends org.apache.thrift.ProcessFunction<I, removeIndexedAttribute_args> {
      public removeIndexedAttribute() {
        super("removeIndexedAttribute");
      }

      public removeIndexedAttribute_args getEmptyArgsInstance() {
        return new removeIndexedAttribute_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public removeIndexedAttribute_result getResult(I iface, removeIndexedAttribute_args args) throws org.apache.thrift.TException {
        removeIndexedAttribute_result result = new removeIndexedAttribute_result();
        try {
          iface.removeIndexedAttribute(args.name, args.spec);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class listIndexedAttributes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, listIndexedAttributes_args> {
      public listIndexedAttributes() {
        super("listIndexedAttributes");
      }

      public listIndexedAttributes_args getEmptyArgsInstance() {
        return new listIndexedAttributes_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public listIndexedAttributes_result getResult(I iface, listIndexedAttributes_args args) throws org.apache.thrift.TException {
        listIndexedAttributes_result result = new listIndexedAttributes_result();
        try {
          result.success = iface.listIndexedAttributes(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class getModel<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getModel_args> {
      public getModel() {
        super("getModel");
      }

      public getModel_args getEmptyArgsInstance() {
        return new getModel_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public getModel_result getResult(I iface, getModel_args args) throws org.apache.thrift.TException {
        getModel_result result = new getModel_result();
        try {
          result.success = iface.getModel(args.name, args.options);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class getRootElements<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getRootElements_args> {
      public getRootElements() {
        super("getRootElements");
      }

      public getRootElements_args getEmptyArgsInstance() {
        return new getRootElements_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public getRootElements_result getResult(I iface, getRootElements_args args) throws org.apache.thrift.TException {
        getRootElements_result result = new getRootElements_result();
        result.success = iface.getRootElements(args.name, args.options);
        return result;
      }
    }

    public static class watchStateChanges<I extends Iface> extends org.apache.thrift.ProcessFunction<I, watchStateChanges_args> {
      public watchStateChanges() {
        super("watchStateChanges");
      }

      public watchStateChanges_args getEmptyArgsInstance() {
        return new watchStateChanges_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public watchStateChanges_result getResult(I iface, watchStateChanges_args args) throws org.apache.thrift.TException {
        watchStateChanges_result result = new watchStateChanges_result();
        try {
          result.success = iface.watchStateChanges(args.name);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

    public static class watchModelChanges<I extends Iface> extends org.apache.thrift.ProcessFunction<I, watchModelChanges_args> {
      public watchModelChanges() {
        super("watchModelChanges");
      }

      public watchModelChanges_args getEmptyArgsInstance() {
        return new watchModelChanges_args();
      }

      protected boolean isOneway() {
        return false;
      }

      @Override
      protected boolean rethrowUnhandledExceptions() {
        return false;
      }

      public watchModelChanges_result getResult(I iface, watchModelChanges_args args) throws org.apache.thrift.TException {
        watchModelChanges_result result = new watchModelChanges_result();
        try {
          result.success = iface.watchModelChanges(args.name, args.repositoryUri, args.filePath, args.clientID, args.durableEvents);
        } catch (HawkInstanceNotFound err1) {
          result.err1 = err1;
        } catch (HawkInstanceNotRunning err2) {
          result.err2 = err2;
        }
        return result;
      }
    }

  }

  public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
    private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
    public AsyncProcessor(I iface) {
      super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
    }

    protected AsyncProcessor(I iface, java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends AsyncIface> java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
      processMap.put("createInstance", new createInstance());
      processMap.put("listBackends", new listBackends());
      processMap.put("listPlugins", new listPlugins());
      processMap.put("listPluginDetails", new listPluginDetails());
      processMap.put("listInstances", new listInstances());
      processMap.put("removeInstance", new removeInstance());
      processMap.put("startInstance", new startInstance());
      processMap.put("stopInstance", new stopInstance());
      processMap.put("syncInstance", new syncInstance());
      processMap.put("registerMetamodels", new registerMetamodels());
      processMap.put("unregisterMetamodels", new unregisterMetamodels());
      processMap.put("listMetamodels", new listMetamodels());
      processMap.put("listTypeNames", new listTypeNames());
      processMap.put("listAttributeNames", new listAttributeNames());
      processMap.put("listMetamodelParsers", new listMetamodelParsers());
      processMap.put("listQueryLanguages", new listQueryLanguages());
      processMap.put("query", new query());
      processMap.put("timedQuery", new timedQuery());
      processMap.put("resolveProxies", new resolveProxies());
      processMap.put("asyncQuery", new asyncQuery());
      processMap.put("cancelAsyncQuery", new cancelAsyncQuery());
      processMap.put("fetchAsyncQueryResults", new fetchAsyncQueryResults());
      processMap.put("addRepository", new addRepository());
      processMap.put("isFrozen", new isFrozen());
      processMap.put("setFrozen", new setFrozen());
      processMap.put("removeRepository", new removeRepository());
      processMap.put("updateRepositoryCredentials", new updateRepositoryCredentials());
      processMap.put("listRepositories", new listRepositories());
      processMap.put("listRepositoryTypes", new listRepositoryTypes());
      processMap.put("listFiles", new listFiles());
      processMap.put("configurePolling", new configurePolling());
      processMap.put("addDerivedAttribute", new addDerivedAttribute());
      processMap.put("removeDerivedAttribute", new removeDerivedAttribute());
      processMap.put("listDerivedAttributes", new listDerivedAttributes());
      processMap.put("addIndexedAttribute", new addIndexedAttribute());
      processMap.put("removeIndexedAttribute", new removeIndexedAttribute());
      processMap.put("listIndexedAttributes", new listIndexedAttributes());
      processMap.put("getModel", new getModel());
      processMap.put("getRootElements", new getRootElements());
      processMap.put("watchStateChanges", new watchStateChanges());
      processMap.put("watchModelChanges", new watchModelChanges());
      return processMap;
    }

    public static class createInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createInstance_args, Void> {
      public createInstance() {
        super("createInstance");
      }

      public createInstance_args getEmptyArgsInstance() {
        return new createInstance_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            createInstance_result result = new createInstance_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            createInstance_result result = new createInstance_result();
            if (e instanceof HawkFactoryNotFound) {
              result.err1 = (HawkFactoryNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, createInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.createInstance(args.name, args.backend, args.minimumDelayMillis, args.maximumDelayMillis, args.enabledPlugins, args.indexFactory,resultHandler);
      }
    }

    public static class listBackends<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listBackends_args, java.util.List<java.lang.String>> {
      public listBackends() {
        super("listBackends");
      }

      public listBackends_args getEmptyArgsInstance() {
        return new listBackends_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listBackends_result result = new listBackends_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listBackends_result result = new listBackends_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listBackends_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listBackends(resultHandler);
      }
    }

    public static class listPlugins<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listPlugins_args, java.util.List<java.lang.String>> {
      public listPlugins() {
        super("listPlugins");
      }

      public listPlugins_args getEmptyArgsInstance() {
        return new listPlugins_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listPlugins_result result = new listPlugins_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listPlugins_result result = new listPlugins_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listPlugins_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listPlugins(resultHandler);
      }
    }

    public static class listPluginDetails<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listPluginDetails_args, java.util.List<HawkPlugin>> {
      public listPluginDetails() {
        super("listPluginDetails");
      }

      public listPluginDetails_args getEmptyArgsInstance() {
        return new listPluginDetails_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkPlugin>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkPlugin>>() { 
          public void onComplete(java.util.List<HawkPlugin> o) {
            listPluginDetails_result result = new listPluginDetails_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listPluginDetails_result result = new listPluginDetails_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listPluginDetails_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkPlugin>> resultHandler) throws org.apache.thrift.TException {
        iface.listPluginDetails(resultHandler);
      }
    }

    public static class listInstances<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listInstances_args, java.util.List<HawkInstance>> {
      public listInstances() {
        super("listInstances");
      }

      public listInstances_args getEmptyArgsInstance() {
        return new listInstances_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkInstance>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkInstance>>() { 
          public void onComplete(java.util.List<HawkInstance> o) {
            listInstances_result result = new listInstances_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listInstances_result result = new listInstances_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listInstances_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<HawkInstance>> resultHandler) throws org.apache.thrift.TException {
        iface.listInstances(resultHandler);
      }
    }

    public static class removeInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeInstance_args, Void> {
      public removeInstance() {
        super("removeInstance");
      }

      public removeInstance_args getEmptyArgsInstance() {
        return new removeInstance_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            removeInstance_result result = new removeInstance_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            removeInstance_result result = new removeInstance_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, removeInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeInstance(args.name,resultHandler);
      }
    }

    public static class startInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startInstance_args, Void> {
      public startInstance() {
        super("startInstance");
      }

      public startInstance_args getEmptyArgsInstance() {
        return new startInstance_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            startInstance_result result = new startInstance_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            startInstance_result result = new startInstance_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, startInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.startInstance(args.name,resultHandler);
      }
    }

    public static class stopInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, stopInstance_args, Void> {
      public stopInstance() {
        super("stopInstance");
      }

      public stopInstance_args getEmptyArgsInstance() {
        return new stopInstance_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            stopInstance_result result = new stopInstance_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            stopInstance_result result = new stopInstance_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, stopInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.stopInstance(args.name,resultHandler);
      }
    }

    public static class syncInstance<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, syncInstance_args, Void> {
      public syncInstance() {
        super("syncInstance");
      }

      public syncInstance_args getEmptyArgsInstance() {
        return new syncInstance_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            syncInstance_result result = new syncInstance_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            syncInstance_result result = new syncInstance_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, syncInstance_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.syncInstance(args.name, args.blockUntilDone,resultHandler);
      }
    }

    public static class registerMetamodels<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerMetamodels_args, Void> {
      public registerMetamodels() {
        super("registerMetamodels");
      }

      public registerMetamodels_args getEmptyArgsInstance() {
        return new registerMetamodels_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            registerMetamodels_result result = new registerMetamodels_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            registerMetamodels_result result = new registerMetamodels_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof InvalidMetamodel) {
              result.err2 = (InvalidMetamodel) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err3 = (HawkInstanceNotRunning) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, registerMetamodels_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.registerMetamodels(args.name, args.metamodel,resultHandler);
      }
    }

    public static class unregisterMetamodels<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, unregisterMetamodels_args, Void> {
      public unregisterMetamodels() {
        super("unregisterMetamodels");
      }

      public unregisterMetamodels_args getEmptyArgsInstance() {
        return new unregisterMetamodels_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            unregisterMetamodels_result result = new unregisterMetamodels_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            unregisterMetamodels_result result = new unregisterMetamodels_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, unregisterMetamodels_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.unregisterMetamodels(args.name, args.metamodel,resultHandler);
      }
    }

    public static class listMetamodels<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listMetamodels_args, java.util.List<java.lang.String>> {
      public listMetamodels() {
        super("listMetamodels");
      }

      public listMetamodels_args getEmptyArgsInstance() {
        return new listMetamodels_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listMetamodels_result result = new listMetamodels_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listMetamodels_result result = new listMetamodels_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listMetamodels_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listMetamodels(args.name,resultHandler);
      }
    }

    public static class listTypeNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listTypeNames_args, java.util.List<java.lang.String>> {
      public listTypeNames() {
        super("listTypeNames");
      }

      public listTypeNames_args getEmptyArgsInstance() {
        return new listTypeNames_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listTypeNames_result result = new listTypeNames_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listTypeNames_result result = new listTypeNames_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof HawkMetamodelNotFound) {
              result.err3 = (HawkMetamodelNotFound) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listTypeNames_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listTypeNames(args.hawkInstanceName, args.metamodelURI,resultHandler);
      }
    }

    public static class listAttributeNames<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listAttributeNames_args, java.util.List<java.lang.String>> {
      public listAttributeNames() {
        super("listAttributeNames");
      }

      public listAttributeNames_args getEmptyArgsInstance() {
        return new listAttributeNames_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listAttributeNames_result result = new listAttributeNames_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listAttributeNames_result result = new listAttributeNames_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof HawkMetamodelNotFound) {
              result.err3 = (HawkMetamodelNotFound) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof HawkTypeNotFound) {
              result.err4 = (HawkTypeNotFound) e;
              result.setErr4IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listAttributeNames_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listAttributeNames(args.hawkInstanceName, args.metamodelURI, args.typeName,resultHandler);
      }
    }

    public static class listMetamodelParsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listMetamodelParsers_args, java.util.List<MetamodelParserDetails>> {
      public listMetamodelParsers() {
        super("listMetamodelParsers");
      }

      public listMetamodelParsers_args getEmptyArgsInstance() {
        return new listMetamodelParsers_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<MetamodelParserDetails>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<MetamodelParserDetails>>() { 
          public void onComplete(java.util.List<MetamodelParserDetails> o) {
            listMetamodelParsers_result result = new listMetamodelParsers_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listMetamodelParsers_result result = new listMetamodelParsers_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listMetamodelParsers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MetamodelParserDetails>> resultHandler) throws org.apache.thrift.TException {
        iface.listMetamodelParsers(args.name,resultHandler);
      }
    }

    public static class listQueryLanguages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listQueryLanguages_args, java.util.List<java.lang.String>> {
      public listQueryLanguages() {
        super("listQueryLanguages");
      }

      public listQueryLanguages_args getEmptyArgsInstance() {
        return new listQueryLanguages_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listQueryLanguages_result result = new listQueryLanguages_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listQueryLanguages_result result = new listQueryLanguages_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listQueryLanguages_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listQueryLanguages(args.name,resultHandler);
      }
    }

    public static class query<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, query_args, QueryResult> {
      public query() {
        super("query");
      }

      public query_args getEmptyArgsInstance() {
        return new query_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<QueryResult> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<QueryResult>() { 
          public void onComplete(QueryResult o) {
            query_result result = new query_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            query_result result = new query_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof UnknownQueryLanguage) {
              result.err3 = (UnknownQueryLanguage) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof InvalidQuery) {
              result.err4 = (InvalidQuery) e;
              result.setErr4IsSet(true);
              msg = result;
            } else if (e instanceof FailedQuery) {
              result.err5 = (FailedQuery) e;
              result.setErr5IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, query_args args, org.apache.thrift.async.AsyncMethodCallback<QueryResult> resultHandler) throws org.apache.thrift.TException {
        iface.query(args.name, args.query, args.language, args.options,resultHandler);
      }
    }

    public static class timedQuery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, timedQuery_args, QueryReport> {
      public timedQuery() {
        super("timedQuery");
      }

      public timedQuery_args getEmptyArgsInstance() {
        return new timedQuery_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<QueryReport> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<QueryReport>() { 
          public void onComplete(QueryReport o) {
            timedQuery_result result = new timedQuery_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            timedQuery_result result = new timedQuery_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof UnknownQueryLanguage) {
              result.err3 = (UnknownQueryLanguage) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof InvalidQuery) {
              result.err4 = (InvalidQuery) e;
              result.setErr4IsSet(true);
              msg = result;
            } else if (e instanceof FailedQuery) {
              result.err5 = (FailedQuery) e;
              result.setErr5IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, timedQuery_args args, org.apache.thrift.async.AsyncMethodCallback<QueryReport> resultHandler) throws org.apache.thrift.TException {
        iface.timedQuery(args.name, args.query, args.language, args.options,resultHandler);
      }
    }

    public static class resolveProxies<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, resolveProxies_args, java.util.List<ModelElement>> {
      public resolveProxies() {
        super("resolveProxies");
      }

      public resolveProxies_args getEmptyArgsInstance() {
        return new resolveProxies_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>>() { 
          public void onComplete(java.util.List<ModelElement> o) {
            resolveProxies_result result = new resolveProxies_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            resolveProxies_result result = new resolveProxies_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, resolveProxies_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException {
        iface.resolveProxies(args.name, args.ids, args.options,resultHandler);
      }
    }

    public static class asyncQuery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, asyncQuery_args, java.lang.String> {
      public asyncQuery() {
        super("asyncQuery");
      }

      public asyncQuery_args getEmptyArgsInstance() {
        return new asyncQuery_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { 
          public void onComplete(java.lang.String o) {
            asyncQuery_result result = new asyncQuery_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            asyncQuery_result result = new asyncQuery_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof UnknownQueryLanguage) {
              result.err3 = (UnknownQueryLanguage) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof InvalidQuery) {
              result.err4 = (InvalidQuery) e;
              result.setErr4IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, asyncQuery_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
        iface.asyncQuery(args.name, args.query, args.language, args.options,resultHandler);
      }
    }

    public static class cancelAsyncQuery<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, cancelAsyncQuery_args, Void> {
      public cancelAsyncQuery() {
        super("cancelAsyncQuery");
      }

      public cancelAsyncQuery_args getEmptyArgsInstance() {
        return new cancelAsyncQuery_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            cancelAsyncQuery_result result = new cancelAsyncQuery_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            cancelAsyncQuery_result result = new cancelAsyncQuery_result();
            if (e instanceof InvalidQuery) {
              result.err1 = (InvalidQuery) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, cancelAsyncQuery_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.cancelAsyncQuery(args.queryID,resultHandler);
      }
    }

    public static class fetchAsyncQueryResults<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, fetchAsyncQueryResults_args, QueryReport> {
      public fetchAsyncQueryResults() {
        super("fetchAsyncQueryResults");
      }

      public fetchAsyncQueryResults_args getEmptyArgsInstance() {
        return new fetchAsyncQueryResults_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<QueryReport> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<QueryReport>() { 
          public void onComplete(QueryReport o) {
            fetchAsyncQueryResults_result result = new fetchAsyncQueryResults_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            fetchAsyncQueryResults_result result = new fetchAsyncQueryResults_result();
            if (e instanceof InvalidQuery) {
              result.err1 = (InvalidQuery) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof FailedQuery) {
              result.err2 = (FailedQuery) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, fetchAsyncQueryResults_args args, org.apache.thrift.async.AsyncMethodCallback<QueryReport> resultHandler) throws org.apache.thrift.TException {
        iface.fetchAsyncQueryResults(args.queryID,resultHandler);
      }
    }

    public static class addRepository<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addRepository_args, Void> {
      public addRepository() {
        super("addRepository");
      }

      public addRepository_args getEmptyArgsInstance() {
        return new addRepository_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            addRepository_result result = new addRepository_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            addRepository_result result = new addRepository_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof UnknownRepositoryType) {
              result.err3 = (UnknownRepositoryType) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof VCSAuthenticationFailed) {
              result.err4 = (VCSAuthenticationFailed) e;
              result.setErr4IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, addRepository_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.addRepository(args.name, args.repo, args.credentials,resultHandler);
      }
    }

    public static class isFrozen<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isFrozen_args, java.lang.Boolean> {
      public isFrozen() {
        super("isFrozen");
      }

      public isFrozen_args getEmptyArgsInstance() {
        return new isFrozen_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
          public void onComplete(java.lang.Boolean o) {
            isFrozen_result result = new isFrozen_result();
            result.success = o;
            result.setSuccessIsSet(true);
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            isFrozen_result result = new isFrozen_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, isFrozen_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
        iface.isFrozen(args.name, args.uri,resultHandler);
      }
    }

    public static class setFrozen<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setFrozen_args, Void> {
      public setFrozen() {
        super("setFrozen");
      }

      public setFrozen_args getEmptyArgsInstance() {
        return new setFrozen_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            setFrozen_result result = new setFrozen_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            setFrozen_result result = new setFrozen_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, setFrozen_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.setFrozen(args.name, args.uri, args.isFrozen,resultHandler);
      }
    }

    public static class removeRepository<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeRepository_args, Void> {
      public removeRepository() {
        super("removeRepository");
      }

      public removeRepository_args getEmptyArgsInstance() {
        return new removeRepository_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            removeRepository_result result = new removeRepository_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            removeRepository_result result = new removeRepository_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, removeRepository_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeRepository(args.name, args.uri,resultHandler);
      }
    }

    public static class updateRepositoryCredentials<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateRepositoryCredentials_args, Void> {
      public updateRepositoryCredentials() {
        super("updateRepositoryCredentials");
      }

      public updateRepositoryCredentials_args getEmptyArgsInstance() {
        return new updateRepositoryCredentials_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            updateRepositoryCredentials_result result = new updateRepositoryCredentials_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            updateRepositoryCredentials_result result = new updateRepositoryCredentials_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, updateRepositoryCredentials_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.updateRepositoryCredentials(args.name, args.uri, args.cred,resultHandler);
      }
    }

    public static class listRepositories<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listRepositories_args, java.util.List<Repository>> {
      public listRepositories() {
        super("listRepositories");
      }

      public listRepositories_args getEmptyArgsInstance() {
        return new listRepositories_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<Repository>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<Repository>>() { 
          public void onComplete(java.util.List<Repository> o) {
            listRepositories_result result = new listRepositories_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listRepositories_result result = new listRepositories_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listRepositories_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Repository>> resultHandler) throws org.apache.thrift.TException {
        iface.listRepositories(args.name,resultHandler);
      }
    }

    public static class listRepositoryTypes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listRepositoryTypes_args, java.util.List<java.lang.String>> {
      public listRepositoryTypes() {
        super("listRepositoryTypes");
      }

      public listRepositoryTypes_args getEmptyArgsInstance() {
        return new listRepositoryTypes_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listRepositoryTypes_result result = new listRepositoryTypes_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listRepositoryTypes_result result = new listRepositoryTypes_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listRepositoryTypes_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listRepositoryTypes(resultHandler);
      }
    }

    public static class listFiles<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listFiles_args, java.util.List<java.lang.String>> {
      public listFiles() {
        super("listFiles");
      }

      public listFiles_args getEmptyArgsInstance() {
        return new listFiles_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>>() { 
          public void onComplete(java.util.List<java.lang.String> o) {
            listFiles_result result = new listFiles_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listFiles_result result = new listFiles_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listFiles_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<java.lang.String>> resultHandler) throws org.apache.thrift.TException {
        iface.listFiles(args.name, args.repository, args.filePatterns,resultHandler);
      }
    }

    public static class configurePolling<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, configurePolling_args, Void> {
      public configurePolling() {
        super("configurePolling");
      }

      public configurePolling_args getEmptyArgsInstance() {
        return new configurePolling_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            configurePolling_result result = new configurePolling_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            configurePolling_result result = new configurePolling_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof InvalidPollingConfiguration) {
              result.err3 = (InvalidPollingConfiguration) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, configurePolling_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.configurePolling(args.name, args.base, args.max,resultHandler);
      }
    }

    public static class addDerivedAttribute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addDerivedAttribute_args, Void> {
      public addDerivedAttribute() {
        super("addDerivedAttribute");
      }

      public addDerivedAttribute_args getEmptyArgsInstance() {
        return new addDerivedAttribute_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            addDerivedAttribute_result result = new addDerivedAttribute_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            addDerivedAttribute_result result = new addDerivedAttribute_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof InvalidDerivedAttributeSpec) {
              result.err3 = (InvalidDerivedAttributeSpec) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, addDerivedAttribute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.addDerivedAttribute(args.name, args.spec,resultHandler);
      }
    }

    public static class removeDerivedAttribute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeDerivedAttribute_args, Void> {
      public removeDerivedAttribute() {
        super("removeDerivedAttribute");
      }

      public removeDerivedAttribute_args getEmptyArgsInstance() {
        return new removeDerivedAttribute_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            removeDerivedAttribute_result result = new removeDerivedAttribute_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            removeDerivedAttribute_result result = new removeDerivedAttribute_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, removeDerivedAttribute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeDerivedAttribute(args.name, args.spec,resultHandler);
      }
    }

    public static class listDerivedAttributes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listDerivedAttributes_args, java.util.List<DerivedAttributeSpec>> {
      public listDerivedAttributes() {
        super("listDerivedAttributes");
      }

      public listDerivedAttributes_args getEmptyArgsInstance() {
        return new listDerivedAttributes_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<DerivedAttributeSpec>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<DerivedAttributeSpec>>() { 
          public void onComplete(java.util.List<DerivedAttributeSpec> o) {
            listDerivedAttributes_result result = new listDerivedAttributes_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listDerivedAttributes_result result = new listDerivedAttributes_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listDerivedAttributes_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<DerivedAttributeSpec>> resultHandler) throws org.apache.thrift.TException {
        iface.listDerivedAttributes(args.name,resultHandler);
      }
    }

    public static class addIndexedAttribute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addIndexedAttribute_args, Void> {
      public addIndexedAttribute() {
        super("addIndexedAttribute");
      }

      public addIndexedAttribute_args getEmptyArgsInstance() {
        return new addIndexedAttribute_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            addIndexedAttribute_result result = new addIndexedAttribute_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            addIndexedAttribute_result result = new addIndexedAttribute_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof InvalidIndexedAttributeSpec) {
              result.err3 = (InvalidIndexedAttributeSpec) e;
              result.setErr3IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, addIndexedAttribute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.addIndexedAttribute(args.name, args.spec,resultHandler);
      }
    }

    public static class removeIndexedAttribute<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeIndexedAttribute_args, Void> {
      public removeIndexedAttribute() {
        super("removeIndexedAttribute");
      }

      public removeIndexedAttribute_args getEmptyArgsInstance() {
        return new removeIndexedAttribute_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Void>() { 
          public void onComplete(Void o) {
            removeIndexedAttribute_result result = new removeIndexedAttribute_result();
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            removeIndexedAttribute_result result = new removeIndexedAttribute_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, removeIndexedAttribute_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
        iface.removeIndexedAttribute(args.name, args.spec,resultHandler);
      }
    }

    public static class listIndexedAttributes<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, listIndexedAttributes_args, java.util.List<IndexedAttributeSpec>> {
      public listIndexedAttributes() {
        super("listIndexedAttributes");
      }

      public listIndexedAttributes_args getEmptyArgsInstance() {
        return new listIndexedAttributes_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<IndexedAttributeSpec>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<IndexedAttributeSpec>>() { 
          public void onComplete(java.util.List<IndexedAttributeSpec> o) {
            listIndexedAttributes_result result = new listIndexedAttributes_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            listIndexedAttributes_result result = new listIndexedAttributes_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, listIndexedAttributes_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<IndexedAttributeSpec>> resultHandler) throws org.apache.thrift.TException {
        iface.listIndexedAttributes(args.name,resultHandler);
      }
    }

    public static class getModel<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getModel_args, java.util.List<ModelElement>> {
      public getModel() {
        super("getModel");
      }

      public getModel_args getEmptyArgsInstance() {
        return new getModel_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>>() { 
          public void onComplete(java.util.List<ModelElement> o) {
            getModel_result result = new getModel_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            getModel_result result = new getModel_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getModel_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException {
        iface.getModel(args.name, args.options,resultHandler);
      }
    }

    public static class getRootElements<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getRootElements_args, java.util.List<ModelElement>> {
      public getRootElements() {
        super("getRootElements");
      }

      public getRootElements_args getEmptyArgsInstance() {
        return new getRootElements_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>>() { 
          public void onComplete(java.util.List<ModelElement> o) {
            getRootElements_result result = new getRootElements_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            getRootElements_result result = new getRootElements_result();
            if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, getRootElements_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ModelElement>> resultHandler) throws org.apache.thrift.TException {
        iface.getRootElements(args.name, args.options,resultHandler);
      }
    }

    public static class watchStateChanges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, watchStateChanges_args, Subscription> {
      public watchStateChanges() {
        super("watchStateChanges");
      }

      public watchStateChanges_args getEmptyArgsInstance() {
        return new watchStateChanges_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Subscription> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Subscription>() { 
          public void onComplete(Subscription o) {
            watchStateChanges_result result = new watchStateChanges_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            watchStateChanges_result result = new watchStateChanges_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, watchStateChanges_args args, org.apache.thrift.async.AsyncMethodCallback<Subscription> resultHandler) throws org.apache.thrift.TException {
        iface.watchStateChanges(args.name,resultHandler);
      }
    }

    public static class watchModelChanges<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, watchModelChanges_args, Subscription> {
      public watchModelChanges() {
        super("watchModelChanges");
      }

      public watchModelChanges_args getEmptyArgsInstance() {
        return new watchModelChanges_args();
      }

      public org.apache.thrift.async.AsyncMethodCallback<Subscription> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
        final org.apache.thrift.AsyncProcessFunction fcall = this;
        return new org.apache.thrift.async.AsyncMethodCallback<Subscription>() { 
          public void onComplete(Subscription o) {
            watchModelChanges_result result = new watchModelChanges_result();
            result.success = o;
            try {
              fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
            } catch (org.apache.thrift.transport.TTransportException e) {
              _LOGGER.error("TTransportException writing to internal frame buffer", e);
              fb.close();
            } catch (java.lang.Exception e) {
              _LOGGER.error("Exception writing to internal frame buffer", e);
              onError(e);
            }
          }
          public void onError(java.lang.Exception e) {
            byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
            org.apache.thrift.TSerializable msg;
            watchModelChanges_result result = new watchModelChanges_result();
            if (e instanceof HawkInstanceNotFound) {
              result.err1 = (HawkInstanceNotFound) e;
              result.setErr1IsSet(true);
              msg = result;
            } else if (e instanceof HawkInstanceNotRunning) {
              result.err2 = (HawkInstanceNotRunning) e;
              result.setErr2IsSet(true);
              msg = result;
            } else if (e instanceof org.apache.thrift.transport.TTransportException) {
              _LOGGER.error("TTransportException inside handler", e);
              fb.close();
              return;
            } else if (e instanceof org.apache.thrift.TApplicationException) {
              _LOGGER.error("TApplicationException inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = (org.apache.thrift.TApplicationException)e;
            } else {
              _LOGGER.error("Exception inside handler", e);
              msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
              msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
            }
            try {
              fcall.sendResponse(fb,msg,msgType,seqid);
            } catch (java.lang.Exception ex) {
              _LOGGER.error("Exception writing to internal frame buffer", ex);
              fb.close();
            }
          }
        };
      }

      protected boolean isOneway() {
        return false;
      }

      public void start(I iface, watchModelChanges_args args, org.apache.thrift.async.AsyncMethodCallback<Subscription> resultHandler) throws org.apache.thrift.TException {
        iface.watchModelChanges(args.name, args.repositoryUri, args.filePath, args.clientID, args.durableEvents,resultHandler);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField BACKEND_FIELD_DESC = new org.apache.thrift.protocol.TField("backend", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField MINIMUM_DELAY_MILLIS_FIELD_DESC = new org.apache.thrift.protocol.TField("minimumDelayMillis", org.apache.thrift.protocol.TType.I32, (short)3);
    private static final org.apache.thrift.protocol.TField MAXIMUM_DELAY_MILLIS_FIELD_DESC = new org.apache.thrift.protocol.TField("maximumDelayMillis", org.apache.thrift.protocol.TType.I32, (short)4);
    private static final org.apache.thrift.protocol.TField ENABLED_PLUGINS_FIELD_DESC = new org.apache.thrift.protocol.TField("enabledPlugins", org.apache.thrift.protocol.TType.LIST, (short)5);
    private static final org.apache.thrift.protocol.TField INDEX_FACTORY_FIELD_DESC = new org.apache.thrift.protocol.TField("indexFactory", org.apache.thrift.protocol.TType.STRING, (short)6);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createInstance_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createInstance_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String backend; // required
    public int minimumDelayMillis; // required
    public int maximumDelayMillis; // required
    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> enabledPlugins; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String indexFactory; // 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 {
      NAME((short)1, "name"),
      BACKEND((short)2, "backend"),
      MINIMUM_DELAY_MILLIS((short)3, "minimumDelayMillis"),
      MAXIMUM_DELAY_MILLIS((short)4, "maximumDelayMillis"),
      ENABLED_PLUGINS((short)5, "enabledPlugins"),
      INDEX_FACTORY((short)6, "indexFactory");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // BACKEND
            return BACKEND;
          case 3: // MINIMUM_DELAY_MILLIS
            return MINIMUM_DELAY_MILLIS;
          case 4: // MAXIMUM_DELAY_MILLIS
            return MAXIMUM_DELAY_MILLIS;
          case 5: // ENABLED_PLUGINS
            return ENABLED_PLUGINS;
          case 6: // INDEX_FACTORY
            return INDEX_FACTORY;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __MINIMUMDELAYMILLIS_ISSET_ID = 0;
    private static final int __MAXIMUMDELAYMILLIS_ISSET_ID = 1;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BACKEND, new org.apache.thrift.meta_data.FieldMetaData("backend", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.MINIMUM_DELAY_MILLIS, new org.apache.thrift.meta_data.FieldMetaData("minimumDelayMillis", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.MAXIMUM_DELAY_MILLIS, new org.apache.thrift.meta_data.FieldMetaData("maximumDelayMillis", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.ENABLED_PLUGINS, new org.apache.thrift.meta_data.FieldMetaData("enabledPlugins", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.INDEX_FACTORY, new org.apache.thrift.meta_data.FieldMetaData("indexFactory", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInstance_args.class, metaDataMap);
    }

    public createInstance_args() {
    }

    public createInstance_args(
      java.lang.String name,
      java.lang.String backend,
      int minimumDelayMillis,
      int maximumDelayMillis,
      java.util.List<java.lang.String> enabledPlugins,
      java.lang.String indexFactory)
    {
      this();
      this.name = name;
      this.backend = backend;
      this.minimumDelayMillis = minimumDelayMillis;
      setMinimumDelayMillisIsSet(true);
      this.maximumDelayMillis = maximumDelayMillis;
      setMaximumDelayMillisIsSet(true);
      this.enabledPlugins = enabledPlugins;
      this.indexFactory = indexFactory;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createInstance_args(createInstance_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetBackend()) {
        this.backend = other.backend;
      }
      this.minimumDelayMillis = other.minimumDelayMillis;
      this.maximumDelayMillis = other.maximumDelayMillis;
      if (other.isSetEnabledPlugins()) {
        java.util.List<java.lang.String> __this__enabledPlugins = new java.util.ArrayList<java.lang.String>(other.enabledPlugins);
        this.enabledPlugins = __this__enabledPlugins;
      }
      if (other.isSetIndexFactory()) {
        this.indexFactory = other.indexFactory;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.backend = null;
      setMinimumDelayMillisIsSet(false);
      this.minimumDelayMillis = 0;
      setMaximumDelayMillisIsSet(false);
      this.maximumDelayMillis = 0;
      this.enabledPlugins = null;
      this.indexFactory = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public createInstance_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getBackend() {
      return this.backend;
    }

    public createInstance_args setBackend(@org.apache.thrift.annotation.Nullable java.lang.String backend) {
      this.backend = backend;
      return this;
    }

    public void unsetBackend() {
      this.backend = null;
    }

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

    public void setBackendIsSet(boolean value) {
      if (!value) {
        this.backend = null;
      }
    }

    public int getMinimumDelayMillis() {
      return this.minimumDelayMillis;
    }

    public createInstance_args setMinimumDelayMillis(int minimumDelayMillis) {
      this.minimumDelayMillis = minimumDelayMillis;
      setMinimumDelayMillisIsSet(true);
      return this;
    }

    public void unsetMinimumDelayMillis() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MINIMUMDELAYMILLIS_ISSET_ID);
    }

    /** Returns true if field minimumDelayMillis is set (has been assigned a value) and false otherwise */
    public boolean isSetMinimumDelayMillis() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MINIMUMDELAYMILLIS_ISSET_ID);
    }

    public void setMinimumDelayMillisIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MINIMUMDELAYMILLIS_ISSET_ID, value);
    }

    public int getMaximumDelayMillis() {
      return this.maximumDelayMillis;
    }

    public createInstance_args setMaximumDelayMillis(int maximumDelayMillis) {
      this.maximumDelayMillis = maximumDelayMillis;
      setMaximumDelayMillisIsSet(true);
      return this;
    }

    public void unsetMaximumDelayMillis() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXIMUMDELAYMILLIS_ISSET_ID);
    }

    /** Returns true if field maximumDelayMillis is set (has been assigned a value) and false otherwise */
    public boolean isSetMaximumDelayMillis() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXIMUMDELAYMILLIS_ISSET_ID);
    }

    public void setMaximumDelayMillisIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXIMUMDELAYMILLIS_ISSET_ID, value);
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getEnabledPluginsIterator() {
      return (this.enabledPlugins == null) ? null : this.enabledPlugins.iterator();
    }

    public void addToEnabledPlugins(java.lang.String elem) {
      if (this.enabledPlugins == null) {
        this.enabledPlugins = new java.util.ArrayList<java.lang.String>();
      }
      this.enabledPlugins.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getEnabledPlugins() {
      return this.enabledPlugins;
    }

    public createInstance_args setEnabledPlugins(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> enabledPlugins) {
      this.enabledPlugins = enabledPlugins;
      return this;
    }

    public void unsetEnabledPlugins() {
      this.enabledPlugins = null;
    }

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

    public void setEnabledPluginsIsSet(boolean value) {
      if (!value) {
        this.enabledPlugins = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getIndexFactory() {
      return this.indexFactory;
    }

    public createInstance_args setIndexFactory(@org.apache.thrift.annotation.Nullable java.lang.String indexFactory) {
      this.indexFactory = indexFactory;
      return this;
    }

    public void unsetIndexFactory() {
      this.indexFactory = null;
    }

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

    public void setIndexFactoryIsSet(boolean value) {
      if (!value) {
        this.indexFactory = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case BACKEND:
        if (value == null) {
          unsetBackend();
        } else {
          setBackend((java.lang.String)value);
        }
        break;

      case MINIMUM_DELAY_MILLIS:
        if (value == null) {
          unsetMinimumDelayMillis();
        } else {
          setMinimumDelayMillis((java.lang.Integer)value);
        }
        break;

      case MAXIMUM_DELAY_MILLIS:
        if (value == null) {
          unsetMaximumDelayMillis();
        } else {
          setMaximumDelayMillis((java.lang.Integer)value);
        }
        break;

      case ENABLED_PLUGINS:
        if (value == null) {
          unsetEnabledPlugins();
        } else {
          setEnabledPlugins((java.util.List<java.lang.String>)value);
        }
        break;

      case INDEX_FACTORY:
        if (value == null) {
          unsetIndexFactory();
        } else {
          setIndexFactory((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case BACKEND:
        return getBackend();

      case MINIMUM_DELAY_MILLIS:
        return getMinimumDelayMillis();

      case MAXIMUM_DELAY_MILLIS:
        return getMaximumDelayMillis();

      case ENABLED_PLUGINS:
        return getEnabledPlugins();

      case INDEX_FACTORY:
        return getIndexFactory();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case BACKEND:
        return isSetBackend();
      case MINIMUM_DELAY_MILLIS:
        return isSetMinimumDelayMillis();
      case MAXIMUM_DELAY_MILLIS:
        return isSetMaximumDelayMillis();
      case ENABLED_PLUGINS:
        return isSetEnabledPlugins();
      case INDEX_FACTORY:
        return isSetIndexFactory();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(createInstance_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_backend = true && this.isSetBackend();
      boolean that_present_backend = true && that.isSetBackend();
      if (this_present_backend || that_present_backend) {
        if (!(this_present_backend && that_present_backend))
          return false;
        if (!this.backend.equals(that.backend))
          return false;
      }

      boolean this_present_minimumDelayMillis = true;
      boolean that_present_minimumDelayMillis = true;
      if (this_present_minimumDelayMillis || that_present_minimumDelayMillis) {
        if (!(this_present_minimumDelayMillis && that_present_minimumDelayMillis))
          return false;
        if (this.minimumDelayMillis != that.minimumDelayMillis)
          return false;
      }

      boolean this_present_maximumDelayMillis = true;
      boolean that_present_maximumDelayMillis = true;
      if (this_present_maximumDelayMillis || that_present_maximumDelayMillis) {
        if (!(this_present_maximumDelayMillis && that_present_maximumDelayMillis))
          return false;
        if (this.maximumDelayMillis != that.maximumDelayMillis)
          return false;
      }

      boolean this_present_enabledPlugins = true && this.isSetEnabledPlugins();
      boolean that_present_enabledPlugins = true && that.isSetEnabledPlugins();
      if (this_present_enabledPlugins || that_present_enabledPlugins) {
        if (!(this_present_enabledPlugins && that_present_enabledPlugins))
          return false;
        if (!this.enabledPlugins.equals(that.enabledPlugins))
          return false;
      }

      boolean this_present_indexFactory = true && this.isSetIndexFactory();
      boolean that_present_indexFactory = true && that.isSetIndexFactory();
      if (this_present_indexFactory || that_present_indexFactory) {
        if (!(this_present_indexFactory && that_present_indexFactory))
          return false;
        if (!this.indexFactory.equals(that.indexFactory))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetBackend()) ? 131071 : 524287);
      if (isSetBackend())
        hashCode = hashCode * 8191 + backend.hashCode();

      hashCode = hashCode * 8191 + minimumDelayMillis;

      hashCode = hashCode * 8191 + maximumDelayMillis;

      hashCode = hashCode * 8191 + ((isSetEnabledPlugins()) ? 131071 : 524287);
      if (isSetEnabledPlugins())
        hashCode = hashCode * 8191 + enabledPlugins.hashCode();

      hashCode = hashCode * 8191 + ((isSetIndexFactory()) ? 131071 : 524287);
      if (isSetIndexFactory())
        hashCode = hashCode * 8191 + indexFactory.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBackend()).compareTo(other.isSetBackend());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBackend()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.backend, other.backend);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMinimumDelayMillis()).compareTo(other.isSetMinimumDelayMillis());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMinimumDelayMillis()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minimumDelayMillis, other.minimumDelayMillis);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMaximumDelayMillis()).compareTo(other.isSetMaximumDelayMillis());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMaximumDelayMillis()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maximumDelayMillis, other.maximumDelayMillis);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetEnabledPlugins()).compareTo(other.isSetEnabledPlugins());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEnabledPlugins()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.enabledPlugins, other.enabledPlugins);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetIndexFactory()).compareTo(other.isSetIndexFactory());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIndexFactory()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.indexFactory, other.indexFactory);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("createInstance_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("backend:");
      if (this.backend == null) {
        sb.append("null");
      } else {
        sb.append(this.backend);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("minimumDelayMillis:");
      sb.append(this.minimumDelayMillis);
      first = false;
      if (!first) sb.append(", ");
      sb.append("maximumDelayMillis:");
      sb.append(this.maximumDelayMillis);
      first = false;
      if (!first) sb.append(", ");
      sb.append("enabledPlugins:");
      if (this.enabledPlugins == null) {
        sb.append("null");
      } else {
        sb.append(this.enabledPlugins);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("indexFactory:");
      if (this.indexFactory == null) {
        sb.append("null");
      } else {
        sb.append(this.indexFactory);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (backend == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'backend' was not present! Struct: " + toString());
      }
      // alas, we cannot check 'minimumDelayMillis' because it's a primitive and you chose the non-beans generator.
      // alas, we cannot check 'maximumDelayMillis' because it's a primitive and you chose the non-beans generator.
      // 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, java.lang.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 createInstance_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public createInstance_argsStandardScheme getScheme() {
        return new createInstance_argsStandardScheme();
      }
    }

    private static class createInstance_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<createInstance_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createInstance_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // BACKEND
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.backend = iprot.readString();
                struct.setBackendIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // MINIMUM_DELAY_MILLIS
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.minimumDelayMillis = iprot.readI32();
                struct.setMinimumDelayMillisIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // MAXIMUM_DELAY_MILLIS
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.maximumDelayMillis = iprot.readI32();
                struct.setMaximumDelayMillisIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // ENABLED_PLUGINS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list226 = iprot.readListBegin();
                  struct.enabledPlugins = new java.util.ArrayList<java.lang.String>(_list226.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem227;
                  for (int _i228 = 0; _i228 < _list226.size; ++_i228)
                  {
                    _elem227 = iprot.readString();
                    struct.enabledPlugins.add(_elem227);
                  }
                  iprot.readListEnd();
                }
                struct.setEnabledPluginsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 6: // INDEX_FACTORY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.indexFactory = iprot.readString();
                struct.setIndexFactoryIsSet(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
        if (!struct.isSetMinimumDelayMillis()) {
          throw new org.apache.thrift.protocol.TProtocolException("Required field 'minimumDelayMillis' was not found in serialized data! Struct: " + toString());
        }
        if (!struct.isSetMaximumDelayMillis()) {
          throw new org.apache.thrift.protocol.TProtocolException("Required field 'maximumDelayMillis' was not found in serialized data! Struct: " + toString());
        }
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, createInstance_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.backend != null) {
          oprot.writeFieldBegin(BACKEND_FIELD_DESC);
          oprot.writeString(struct.backend);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(MINIMUM_DELAY_MILLIS_FIELD_DESC);
        oprot.writeI32(struct.minimumDelayMillis);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(MAXIMUM_DELAY_MILLIS_FIELD_DESC);
        oprot.writeI32(struct.maximumDelayMillis);
        oprot.writeFieldEnd();
        if (struct.enabledPlugins != null) {
          oprot.writeFieldBegin(ENABLED_PLUGINS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.enabledPlugins.size()));
            for (java.lang.String _iter229 : struct.enabledPlugins)
            {
              oprot.writeString(_iter229);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.indexFactory != null) {
          oprot.writeFieldBegin(INDEX_FACTORY_FIELD_DESC);
          oprot.writeString(struct.indexFactory);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createInstance_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public createInstance_argsTupleScheme getScheme() {
        return new createInstance_argsTupleScheme();
      }
    }

    private static class createInstance_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<createInstance_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.backend);
        oprot.writeI32(struct.minimumDelayMillis);
        oprot.writeI32(struct.maximumDelayMillis);
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetEnabledPlugins()) {
          optionals.set(0);
        }
        if (struct.isSetIndexFactory()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetEnabledPlugins()) {
          {
            oprot.writeI32(struct.enabledPlugins.size());
            for (java.lang.String _iter230 : struct.enabledPlugins)
            {
              oprot.writeString(_iter230);
            }
          }
        }
        if (struct.isSetIndexFactory()) {
          oprot.writeString(struct.indexFactory);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.backend = iprot.readString();
        struct.setBackendIsSet(true);
        struct.minimumDelayMillis = iprot.readI32();
        struct.setMinimumDelayMillisIsSet(true);
        struct.maximumDelayMillis = iprot.readI32();
        struct.setMaximumDelayMillisIsSet(true);
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.enabledPlugins = new java.util.ArrayList<java.lang.String>(_list231.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem232;
            for (int _i233 = 0; _i233 < _list231.size; ++_i233)
            {
              _elem232 = iprot.readString();
              struct.enabledPlugins.add(_elem232);
            }
          }
          struct.setEnabledPluginsIsSet(true);
        }
        if (incoming.get(1)) {
          struct.indexFactory = iprot.readString();
          struct.setIndexFactoryIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createInstance_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createInstance_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkFactoryNotFound err1; // 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 {
      ERR1((short)1, "err1");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkFactoryNotFound.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInstance_result.class, metaDataMap);
    }

    public createInstance_result() {
    }

    public createInstance_result(
      HawkFactoryNotFound err1)
    {
      this();
      this.err1 = err1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createInstance_result(createInstance_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkFactoryNotFound(other.err1);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkFactoryNotFound getErr1() {
      return this.err1;
    }

    public createInstance_result setErr1(@org.apache.thrift.annotation.Nullable HawkFactoryNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkFactoryNotFound)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(createInstance_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("createInstance_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      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, java.lang.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 createInstance_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public createInstance_resultStandardScheme getScheme() {
        return new createInstance_resultStandardScheme();
      }
    }

    private static class createInstance_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<createInstance_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, createInstance_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkFactoryNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(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, createInstance_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class createInstance_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public createInstance_resultTupleScheme getScheme() {
        return new createInstance_resultTupleScheme();
      }
    }

    private static class createInstance_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<createInstance_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, createInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, createInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.err1 = new HawkFactoryNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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


    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listBackends_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listBackends_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listBackends_args.class, metaDataMap);
    }

    public listBackends_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listBackends_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listBackends_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, java.lang.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 listBackends_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listBackends_argsStandardScheme getScheme() {
        return new listBackends_argsStandardScheme();
      }
    }

    private static class listBackends_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listBackends_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listBackends_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, listBackends_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class listBackends_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listBackends_argsTupleScheme getScheme() {
        return new listBackends_argsTupleScheme();
      }
    }

    private static class listBackends_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listBackends_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listBackends_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listBackends_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listBackends_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listBackends_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listBackends_result.class, metaDataMap);
    }

    public listBackends_result() {
    }

    public listBackends_result(
      java.util.List<java.lang.String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listBackends_result(listBackends_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listBackends_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listBackends_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listBackends_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
    }

    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, java.lang.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 listBackends_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listBackends_resultStandardScheme getScheme() {
        return new listBackends_resultStandardScheme();
      }
    }

    private static class listBackends_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listBackends_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listBackends_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list234 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list234.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem235;
                  for (int _i236 = 0; _i236 < _list234.size; ++_i236)
                  {
                    _elem235 = iprot.readString();
                    struct.success.add(_elem235);
                  }
                  iprot.readListEnd();
                }
                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, listBackends_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter237 : struct.success)
            {
              oprot.writeString(_iter237);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listBackends_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listBackends_resultTupleScheme getScheme() {
        return new listBackends_resultTupleScheme();
      }
    }

    private static class listBackends_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listBackends_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listBackends_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter238 : struct.success)
            {
              oprot.writeString(_iter238);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listBackends_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list239.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem240;
            for (int _i241 = 0; _i241 < _list239.size; ++_i241)
            {
              _elem240 = iprot.readString();
              struct.success.add(_elem240);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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


    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listPlugins_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listPlugins_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listPlugins_args.class, metaDataMap);
    }

    public listPlugins_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listPlugins_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listPlugins_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, java.lang.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 listPlugins_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPlugins_argsStandardScheme getScheme() {
        return new listPlugins_argsStandardScheme();
      }
    }

    private static class listPlugins_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listPlugins_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listPlugins_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, listPlugins_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class listPlugins_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPlugins_argsTupleScheme getScheme() {
        return new listPlugins_argsTupleScheme();
      }
    }

    private static class listPlugins_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listPlugins_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listPlugins_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listPlugins_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listPlugins_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listPlugins_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listPlugins_result.class, metaDataMap);
    }

    public listPlugins_result() {
    }

    public listPlugins_result(
      java.util.List<java.lang.String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listPlugins_result(listPlugins_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listPlugins_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listPlugins_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listPlugins_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
    }

    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, java.lang.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 listPlugins_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPlugins_resultStandardScheme getScheme() {
        return new listPlugins_resultStandardScheme();
      }
    }

    private static class listPlugins_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listPlugins_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listPlugins_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list242 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list242.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem243;
                  for (int _i244 = 0; _i244 < _list242.size; ++_i244)
                  {
                    _elem243 = iprot.readString();
                    struct.success.add(_elem243);
                  }
                  iprot.readListEnd();
                }
                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, listPlugins_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter245 : struct.success)
            {
              oprot.writeString(_iter245);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listPlugins_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPlugins_resultTupleScheme getScheme() {
        return new listPlugins_resultTupleScheme();
      }
    }

    private static class listPlugins_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listPlugins_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listPlugins_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter246 : struct.success)
            {
              oprot.writeString(_iter246);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listPlugins_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list247.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem248;
            for (int _i249 = 0; _i249 < _list247.size; ++_i249)
            {
              _elem248 = iprot.readString();
              struct.success.add(_elem248);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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


    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listPluginDetails_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listPluginDetails_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listPluginDetails_args.class, metaDataMap);
    }

    public listPluginDetails_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listPluginDetails_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listPluginDetails_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, java.lang.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 listPluginDetails_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPluginDetails_argsStandardScheme getScheme() {
        return new listPluginDetails_argsStandardScheme();
      }
    }

    private static class listPluginDetails_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listPluginDetails_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listPluginDetails_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, listPluginDetails_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class listPluginDetails_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPluginDetails_argsTupleScheme getScheme() {
        return new listPluginDetails_argsTupleScheme();
      }
    }

    private static class listPluginDetails_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listPluginDetails_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listPluginDetails_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listPluginDetails_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listPluginDetails_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listPluginDetails_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<HawkPlugin> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkPlugin.class))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listPluginDetails_result.class, metaDataMap);
    }

    public listPluginDetails_result() {
    }

    public listPluginDetails_result(
      java.util.List<HawkPlugin> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listPluginDetails_result(listPluginDetails_result other) {
      if (other.isSetSuccess()) {
        java.util.List<HawkPlugin> __this__success = new java.util.ArrayList<HawkPlugin>(other.success.size());
        for (HawkPlugin other_element : other.success) {
          __this__success.add(new HawkPlugin(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<HawkPlugin> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(HawkPlugin elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<HawkPlugin>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<HawkPlugin> getSuccess() {
      return this.success;
    }

    public listPluginDetails_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<HawkPlugin> 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, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<HawkPlugin>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listPluginDetails_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listPluginDetails_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
    }

    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, java.lang.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 listPluginDetails_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPluginDetails_resultStandardScheme getScheme() {
        return new listPluginDetails_resultStandardScheme();
      }
    }

    private static class listPluginDetails_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listPluginDetails_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listPluginDetails_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list250 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<HawkPlugin>(_list250.size);
                  @org.apache.thrift.annotation.Nullable HawkPlugin _elem251;
                  for (int _i252 = 0; _i252 < _list250.size; ++_i252)
                  {
                    _elem251 = new HawkPlugin();
                    _elem251.read(iprot);
                    struct.success.add(_elem251);
                  }
                  iprot.readListEnd();
                }
                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, listPluginDetails_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (HawkPlugin _iter253 : struct.success)
            {
              _iter253.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listPluginDetails_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listPluginDetails_resultTupleScheme getScheme() {
        return new listPluginDetails_resultTupleScheme();
      }
    }

    private static class listPluginDetails_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listPluginDetails_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listPluginDetails_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (HawkPlugin _iter254 : struct.success)
            {
              _iter254.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listPluginDetails_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<HawkPlugin>(_list255.size);
            @org.apache.thrift.annotation.Nullable HawkPlugin _elem256;
            for (int _i257 = 0; _i257 < _list255.size; ++_i257)
            {
              _elem256 = new HawkPlugin();
              _elem256.read(iprot);
              struct.success.add(_elem256);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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


    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listInstances_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listInstances_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listInstances_args.class, metaDataMap);
    }

    public listInstances_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listInstances_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listInstances_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, java.lang.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 listInstances_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listInstances_argsStandardScheme getScheme() {
        return new listInstances_argsStandardScheme();
      }
    }

    private static class listInstances_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listInstances_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listInstances_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, listInstances_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class listInstances_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listInstances_argsTupleScheme getScheme() {
        return new listInstances_argsTupleScheme();
      }
    }

    private static class listInstances_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listInstances_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listInstances_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listInstances_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listInstances_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listInstances_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<HawkInstance> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstance.class))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listInstances_result.class, metaDataMap);
    }

    public listInstances_result() {
    }

    public listInstances_result(
      java.util.List<HawkInstance> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listInstances_result(listInstances_result other) {
      if (other.isSetSuccess()) {
        java.util.List<HawkInstance> __this__success = new java.util.ArrayList<HawkInstance>(other.success.size());
        for (HawkInstance other_element : other.success) {
          __this__success.add(new HawkInstance(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<HawkInstance> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(HawkInstance elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<HawkInstance>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<HawkInstance> getSuccess() {
      return this.success;
    }

    public listInstances_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<HawkInstance> 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, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<HawkInstance>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listInstances_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listInstances_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
    }

    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, java.lang.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 listInstances_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listInstances_resultStandardScheme getScheme() {
        return new listInstances_resultStandardScheme();
      }
    }

    private static class listInstances_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listInstances_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listInstances_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list258 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<HawkInstance>(_list258.size);
                  @org.apache.thrift.annotation.Nullable HawkInstance _elem259;
                  for (int _i260 = 0; _i260 < _list258.size; ++_i260)
                  {
                    _elem259 = new HawkInstance();
                    _elem259.read(iprot);
                    struct.success.add(_elem259);
                  }
                  iprot.readListEnd();
                }
                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, listInstances_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (HawkInstance _iter261 : struct.success)
            {
              _iter261.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listInstances_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listInstances_resultTupleScheme getScheme() {
        return new listInstances_resultTupleScheme();
      }
    }

    private static class listInstances_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listInstances_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listInstances_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (HawkInstance _iter262 : struct.success)
            {
              _iter262.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listInstances_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<HawkInstance>(_list263.size);
            @org.apache.thrift.annotation.Nullable HawkInstance _elem264;
            for (int _i265 = 0; _i265 < _list263.size; ++_i265)
            {
              _elem264 = new HawkInstance();
              _elem264.read(iprot);
              struct.success.add(_elem264);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeInstance_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeInstance_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeInstance_args.class, metaDataMap);
    }

    public removeInstance_args() {
    }

    public removeInstance_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeInstance_args(removeInstance_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public removeInstance_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeInstance_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeInstance_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 removeInstance_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeInstance_argsStandardScheme getScheme() {
        return new removeInstance_argsStandardScheme();
      }
    }

    private static class removeInstance_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeInstance_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeInstance_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, removeInstance_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeInstance_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeInstance_argsTupleScheme getScheme() {
        return new removeInstance_argsTupleScheme();
      }
    }

    private static class removeInstance_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeInstance_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeInstance_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeInstance_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // 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 {
      ERR1((short)1, "err1");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeInstance_result.class, metaDataMap);
    }

    public removeInstance_result() {
    }

    public removeInstance_result(
      HawkInstanceNotFound err1)
    {
      this();
      this.err1 = err1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeInstance_result(removeInstance_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public removeInstance_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeInstance_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeInstance_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      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, java.lang.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 removeInstance_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeInstance_resultStandardScheme getScheme() {
        return new removeInstance_resultStandardScheme();
      }
    }

    private static class removeInstance_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeInstance_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeInstance_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(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, removeInstance_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeInstance_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeInstance_resultTupleScheme getScheme() {
        return new removeInstance_resultTupleScheme();
      }
    }

    private static class removeInstance_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeInstance_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new startInstance_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new startInstance_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startInstance_args.class, metaDataMap);
    }

    public startInstance_args() {
    }

    public startInstance_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startInstance_args(startInstance_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public startInstance_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(startInstance_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("startInstance_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 startInstance_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public startInstance_argsStandardScheme getScheme() {
        return new startInstance_argsStandardScheme();
      }
    }

    private static class startInstance_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<startInstance_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startInstance_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, startInstance_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startInstance_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public startInstance_argsTupleScheme getScheme() {
        return new startInstance_argsTupleScheme();
      }
    }

    private static class startInstance_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<startInstance_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new startInstance_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new startInstance_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // 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 {
      ERR1((short)1, "err1");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startInstance_result.class, metaDataMap);
    }

    public startInstance_result() {
    }

    public startInstance_result(
      HawkInstanceNotFound err1)
    {
      this();
      this.err1 = err1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public startInstance_result(startInstance_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public startInstance_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(startInstance_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("startInstance_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      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, java.lang.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 startInstance_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public startInstance_resultStandardScheme getScheme() {
        return new startInstance_resultStandardScheme();
      }
    }

    private static class startInstance_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<startInstance_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, startInstance_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(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, startInstance_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class startInstance_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public startInstance_resultTupleScheme getScheme() {
        return new startInstance_resultTupleScheme();
      }
    }

    private static class startInstance_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<startInstance_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, startInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, startInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new stopInstance_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new stopInstance_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopInstance_args.class, metaDataMap);
    }

    public stopInstance_args() {
    }

    public stopInstance_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public stopInstance_args(stopInstance_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public stopInstance_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(stopInstance_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("stopInstance_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 stopInstance_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public stopInstance_argsStandardScheme getScheme() {
        return new stopInstance_argsStandardScheme();
      }
    }

    private static class stopInstance_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<stopInstance_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, stopInstance_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, stopInstance_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class stopInstance_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public stopInstance_argsTupleScheme getScheme() {
        return new stopInstance_argsTupleScheme();
      }
    }

    private static class stopInstance_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<stopInstance_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, stopInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, stopInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new stopInstance_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new stopInstance_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(stopInstance_result.class, metaDataMap);
    }

    public stopInstance_result() {
    }

    public stopInstance_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public stopInstance_result(stopInstance_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public stopInstance_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public stopInstance_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(stopInstance_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("stopInstance_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 stopInstance_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public stopInstance_resultStandardScheme getScheme() {
        return new stopInstance_resultStandardScheme();
      }
    }

    private static class stopInstance_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<stopInstance_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, stopInstance_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, stopInstance_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class stopInstance_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public stopInstance_resultTupleScheme getScheme() {
        return new stopInstance_resultTupleScheme();
      }
    }

    private static class stopInstance_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<stopInstance_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, stopInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, stopInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField BLOCK_UNTIL_DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("blockUntilDone", org.apache.thrift.protocol.TType.BOOL, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new syncInstance_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new syncInstance_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public boolean blockUntilDone; // 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 {
      NAME((short)1, "name"),
      BLOCK_UNTIL_DONE((short)2, "blockUntilDone");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // BLOCK_UNTIL_DONE
            return BLOCK_UNTIL_DONE;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __BLOCKUNTILDONE_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BLOCK_UNTIL_DONE, new org.apache.thrift.meta_data.FieldMetaData("blockUntilDone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(syncInstance_args.class, metaDataMap);
    }

    public syncInstance_args() {
      this.blockUntilDone = false;

    }

    public syncInstance_args(
      java.lang.String name,
      boolean blockUntilDone)
    {
      this();
      this.name = name;
      this.blockUntilDone = blockUntilDone;
      setBlockUntilDoneIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public syncInstance_args(syncInstance_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetName()) {
        this.name = other.name;
      }
      this.blockUntilDone = other.blockUntilDone;
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.blockUntilDone = false;

    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public syncInstance_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public boolean isBlockUntilDone() {
      return this.blockUntilDone;
    }

    public syncInstance_args setBlockUntilDone(boolean blockUntilDone) {
      this.blockUntilDone = blockUntilDone;
      setBlockUntilDoneIsSet(true);
      return this;
    }

    public void unsetBlockUntilDone() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BLOCKUNTILDONE_ISSET_ID);
    }

    /** Returns true if field blockUntilDone is set (has been assigned a value) and false otherwise */
    public boolean isSetBlockUntilDone() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BLOCKUNTILDONE_ISSET_ID);
    }

    public void setBlockUntilDoneIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BLOCKUNTILDONE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case BLOCK_UNTIL_DONE:
        if (value == null) {
          unsetBlockUntilDone();
        } else {
          setBlockUntilDone((java.lang.Boolean)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case BLOCK_UNTIL_DONE:
        return isBlockUntilDone();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case BLOCK_UNTIL_DONE:
        return isSetBlockUntilDone();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(syncInstance_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_blockUntilDone = true;
      boolean that_present_blockUntilDone = true;
      if (this_present_blockUntilDone || that_present_blockUntilDone) {
        if (!(this_present_blockUntilDone && that_present_blockUntilDone))
          return false;
        if (this.blockUntilDone != that.blockUntilDone)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((blockUntilDone) ? 131071 : 524287);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBlockUntilDone()).compareTo(other.isSetBlockUntilDone());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBlockUntilDone()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockUntilDone, other.blockUntilDone);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("syncInstance_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("blockUntilDone:");
      sb.append(this.blockUntilDone);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 syncInstance_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public syncInstance_argsStandardScheme getScheme() {
        return new syncInstance_argsStandardScheme();
      }
    }

    private static class syncInstance_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<syncInstance_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, syncInstance_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // BLOCK_UNTIL_DONE
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.blockUntilDone = iprot.readBool();
                struct.setBlockUntilDoneIsSet(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, syncInstance_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(BLOCK_UNTIL_DONE_FIELD_DESC);
        oprot.writeBool(struct.blockUntilDone);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class syncInstance_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public syncInstance_argsTupleScheme getScheme() {
        return new syncInstance_argsTupleScheme();
      }
    }

    private static class syncInstance_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<syncInstance_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, syncInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetBlockUntilDone()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetBlockUntilDone()) {
          oprot.writeBool(struct.blockUntilDone);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, syncInstance_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.blockUntilDone = iprot.readBool();
          struct.setBlockUntilDoneIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new syncInstance_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new syncInstance_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(syncInstance_result.class, metaDataMap);
    }

    public syncInstance_result() {
    }

    public syncInstance_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public syncInstance_result(syncInstance_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public syncInstance_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public syncInstance_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(syncInstance_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("syncInstance_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 syncInstance_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public syncInstance_resultStandardScheme getScheme() {
        return new syncInstance_resultStandardScheme();
      }
    }

    private static class syncInstance_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<syncInstance_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, syncInstance_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, syncInstance_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class syncInstance_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public syncInstance_resultTupleScheme getScheme() {
        return new syncInstance_resultTupleScheme();
      }
    }

    private static class syncInstance_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<syncInstance_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, syncInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, syncInstance_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField METAMODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("metamodel", org.apache.thrift.protocol.TType.LIST, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerMetamodels_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerMetamodels_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.util.List<File> metamodel; // 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 {
      NAME((short)1, "name"),
      METAMODEL((short)2, "metamodel");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // METAMODEL
            return METAMODEL;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.METAMODEL, new org.apache.thrift.meta_data.FieldMetaData("metamodel", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, File.class))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerMetamodels_args.class, metaDataMap);
    }

    public registerMetamodels_args() {
    }

    public registerMetamodels_args(
      java.lang.String name,
      java.util.List<File> metamodel)
    {
      this();
      this.name = name;
      this.metamodel = metamodel;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerMetamodels_args(registerMetamodels_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetMetamodel()) {
        java.util.List<File> __this__metamodel = new java.util.ArrayList<File>(other.metamodel.size());
        for (File other_element : other.metamodel) {
          __this__metamodel.add(new File(other_element));
        }
        this.metamodel = __this__metamodel;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.metamodel = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public registerMetamodels_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<File> getMetamodelIterator() {
      return (this.metamodel == null) ? null : this.metamodel.iterator();
    }

    public void addToMetamodel(File elem) {
      if (this.metamodel == null) {
        this.metamodel = new java.util.ArrayList<File>();
      }
      this.metamodel.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<File> getMetamodel() {
      return this.metamodel;
    }

    public registerMetamodels_args setMetamodel(@org.apache.thrift.annotation.Nullable java.util.List<File> metamodel) {
      this.metamodel = metamodel;
      return this;
    }

    public void unsetMetamodel() {
      this.metamodel = null;
    }

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

    public void setMetamodelIsSet(boolean value) {
      if (!value) {
        this.metamodel = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case METAMODEL:
        if (value == null) {
          unsetMetamodel();
        } else {
          setMetamodel((java.util.List<File>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case METAMODEL:
        return getMetamodel();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case METAMODEL:
        return isSetMetamodel();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(registerMetamodels_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_metamodel = true && this.isSetMetamodel();
      boolean that_present_metamodel = true && that.isSetMetamodel();
      if (this_present_metamodel || that_present_metamodel) {
        if (!(this_present_metamodel && that_present_metamodel))
          return false;
        if (!this.metamodel.equals(that.metamodel))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetMetamodel()) ? 131071 : 524287);
      if (isSetMetamodel())
        hashCode = hashCode * 8191 + metamodel.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMetamodel()).compareTo(other.isSetMetamodel());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMetamodel()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metamodel, other.metamodel);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("registerMetamodels_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("metamodel:");
      if (this.metamodel == null) {
        sb.append("null");
      } else {
        sb.append(this.metamodel);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (metamodel == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'metamodel' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 registerMetamodels_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public registerMetamodels_argsStandardScheme getScheme() {
        return new registerMetamodels_argsStandardScheme();
      }
    }

    private static class registerMetamodels_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<registerMetamodels_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerMetamodels_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // METAMODEL
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list266 = iprot.readListBegin();
                  struct.metamodel = new java.util.ArrayList<File>(_list266.size);
                  @org.apache.thrift.annotation.Nullable File _elem267;
                  for (int _i268 = 0; _i268 < _list266.size; ++_i268)
                  {
                    _elem267 = new File();
                    _elem267.read(iprot);
                    struct.metamodel.add(_elem267);
                  }
                  iprot.readListEnd();
                }
                struct.setMetamodelIsSet(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, registerMetamodels_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.metamodel != null) {
          oprot.writeFieldBegin(METAMODEL_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.metamodel.size()));
            for (File _iter269 : struct.metamodel)
            {
              _iter269.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class registerMetamodels_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public registerMetamodels_argsTupleScheme getScheme() {
        return new registerMetamodels_argsTupleScheme();
      }
    }

    private static class registerMetamodels_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<registerMetamodels_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, registerMetamodels_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        {
          oprot.writeI32(struct.metamodel.size());
          for (File _iter270 : struct.metamodel)
          {
            _iter270.write(oprot);
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerMetamodels_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        {
          org.apache.thrift.protocol.TList _list271 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
          struct.metamodel = new java.util.ArrayList<File>(_list271.size);
          @org.apache.thrift.annotation.Nullable File _elem272;
          for (int _i273 = 0; _i273 < _list271.size; ++_i273)
          {
            _elem272 = new File();
            _elem272.read(iprot);
            struct.metamodel.add(_elem272);
          }
        }
        struct.setMetamodelIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerMetamodels_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerMetamodels_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable InvalidMetamodel err2; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err3; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidMetamodel.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerMetamodels_result.class, metaDataMap);
    }

    public registerMetamodels_result() {
    }

    public registerMetamodels_result(
      HawkInstanceNotFound err1,
      InvalidMetamodel err2,
      HawkInstanceNotRunning err3)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public registerMetamodels_result(registerMetamodels_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new InvalidMetamodel(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new HawkInstanceNotRunning(other.err3);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public registerMetamodels_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidMetamodel getErr2() {
      return this.err2;
    }

    public registerMetamodels_result setErr2(@org.apache.thrift.annotation.Nullable InvalidMetamodel err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr3() {
      return this.err3;
    }

    public registerMetamodels_result setErr3(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((InvalidMetamodel)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(registerMetamodels_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("registerMetamodels_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      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, java.lang.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 registerMetamodels_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public registerMetamodels_resultStandardScheme getScheme() {
        return new registerMetamodels_resultStandardScheme();
      }
    }

    private static class registerMetamodels_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<registerMetamodels_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, registerMetamodels_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new InvalidMetamodel();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new HawkInstanceNotRunning();
                struct.err3.read(iprot);
                struct.setErr3IsSet(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, registerMetamodels_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class registerMetamodels_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public registerMetamodels_resultTupleScheme getScheme() {
        return new registerMetamodels_resultTupleScheme();
      }
    }

    private static class registerMetamodels_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<registerMetamodels_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, registerMetamodels_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        if (struct.isSetErr3()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, registerMetamodels_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new InvalidMetamodel();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err3 = new HawkInstanceNotRunning();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField METAMODEL_FIELD_DESC = new org.apache.thrift.protocol.TField("metamodel", org.apache.thrift.protocol.TType.LIST, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unregisterMetamodels_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unregisterMetamodels_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> metamodel; // 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 {
      NAME((short)1, "name"),
      METAMODEL((short)2, "metamodel");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // METAMODEL
            return METAMODEL;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.METAMODEL, new org.apache.thrift.meta_data.FieldMetaData("metamodel", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unregisterMetamodels_args.class, metaDataMap);
    }

    public unregisterMetamodels_args() {
    }

    public unregisterMetamodels_args(
      java.lang.String name,
      java.util.List<java.lang.String> metamodel)
    {
      this();
      this.name = name;
      this.metamodel = metamodel;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public unregisterMetamodels_args(unregisterMetamodels_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetMetamodel()) {
        java.util.List<java.lang.String> __this__metamodel = new java.util.ArrayList<java.lang.String>(other.metamodel);
        this.metamodel = __this__metamodel;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.metamodel = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public unregisterMetamodels_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getMetamodelIterator() {
      return (this.metamodel == null) ? null : this.metamodel.iterator();
    }

    public void addToMetamodel(java.lang.String elem) {
      if (this.metamodel == null) {
        this.metamodel = new java.util.ArrayList<java.lang.String>();
      }
      this.metamodel.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getMetamodel() {
      return this.metamodel;
    }

    public unregisterMetamodels_args setMetamodel(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> metamodel) {
      this.metamodel = metamodel;
      return this;
    }

    public void unsetMetamodel() {
      this.metamodel = null;
    }

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

    public void setMetamodelIsSet(boolean value) {
      if (!value) {
        this.metamodel = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case METAMODEL:
        if (value == null) {
          unsetMetamodel();
        } else {
          setMetamodel((java.util.List<java.lang.String>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case METAMODEL:
        return getMetamodel();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case METAMODEL:
        return isSetMetamodel();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(unregisterMetamodels_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_metamodel = true && this.isSetMetamodel();
      boolean that_present_metamodel = true && that.isSetMetamodel();
      if (this_present_metamodel || that_present_metamodel) {
        if (!(this_present_metamodel && that_present_metamodel))
          return false;
        if (!this.metamodel.equals(that.metamodel))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetMetamodel()) ? 131071 : 524287);
      if (isSetMetamodel())
        hashCode = hashCode * 8191 + metamodel.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMetamodel()).compareTo(other.isSetMetamodel());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMetamodel()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metamodel, other.metamodel);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("unregisterMetamodels_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("metamodel:");
      if (this.metamodel == null) {
        sb.append("null");
      } else {
        sb.append(this.metamodel);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (metamodel == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'metamodel' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 unregisterMetamodels_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public unregisterMetamodels_argsStandardScheme getScheme() {
        return new unregisterMetamodels_argsStandardScheme();
      }
    }

    private static class unregisterMetamodels_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<unregisterMetamodels_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, unregisterMetamodels_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // METAMODEL
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list274 = iprot.readListBegin();
                  struct.metamodel = new java.util.ArrayList<java.lang.String>(_list274.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem275;
                  for (int _i276 = 0; _i276 < _list274.size; ++_i276)
                  {
                    _elem275 = iprot.readString();
                    struct.metamodel.add(_elem275);
                  }
                  iprot.readListEnd();
                }
                struct.setMetamodelIsSet(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, unregisterMetamodels_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.metamodel != null) {
          oprot.writeFieldBegin(METAMODEL_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.metamodel.size()));
            for (java.lang.String _iter277 : struct.metamodel)
            {
              oprot.writeString(_iter277);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class unregisterMetamodels_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public unregisterMetamodels_argsTupleScheme getScheme() {
        return new unregisterMetamodels_argsTupleScheme();
      }
    }

    private static class unregisterMetamodels_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<unregisterMetamodels_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, unregisterMetamodels_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        {
          oprot.writeI32(struct.metamodel.size());
          for (java.lang.String _iter278 : struct.metamodel)
          {
            oprot.writeString(_iter278);
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, unregisterMetamodels_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        {
          org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.metamodel = new java.util.ArrayList<java.lang.String>(_list279.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem280;
          for (int _i281 = 0; _i281 < _list279.size; ++_i281)
          {
            _elem280 = iprot.readString();
            struct.metamodel.add(_elem280);
          }
        }
        struct.setMetamodelIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new unregisterMetamodels_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new unregisterMetamodels_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unregisterMetamodels_result.class, metaDataMap);
    }

    public unregisterMetamodels_result() {
    }

    public unregisterMetamodels_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public unregisterMetamodels_result(unregisterMetamodels_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public unregisterMetamodels_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public unregisterMetamodels_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(unregisterMetamodels_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("unregisterMetamodels_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 unregisterMetamodels_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public unregisterMetamodels_resultStandardScheme getScheme() {
        return new unregisterMetamodels_resultStandardScheme();
      }
    }

    private static class unregisterMetamodels_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<unregisterMetamodels_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, unregisterMetamodels_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, unregisterMetamodels_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class unregisterMetamodels_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public unregisterMetamodels_resultTupleScheme getScheme() {
        return new unregisterMetamodels_resultTupleScheme();
      }
    }

    private static class unregisterMetamodels_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<unregisterMetamodels_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, unregisterMetamodels_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, unregisterMetamodels_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listMetamodels_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listMetamodels_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listMetamodels_args.class, metaDataMap);
    }

    public listMetamodels_args() {
    }

    public listMetamodels_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listMetamodels_args(listMetamodels_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public listMetamodels_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listMetamodels_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listMetamodels_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listMetamodels_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodels_argsStandardScheme getScheme() {
        return new listMetamodels_argsStandardScheme();
      }
    }

    private static class listMetamodels_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listMetamodels_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listMetamodels_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, listMetamodels_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listMetamodels_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodels_argsTupleScheme getScheme() {
        return new listMetamodels_argsTupleScheme();
      }
    }

    private static class listMetamodels_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listMetamodels_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listMetamodels_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listMetamodels_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listMetamodels_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listMetamodels_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listMetamodels_result.class, metaDataMap);
    }

    public listMetamodels_result() {
    }

    public listMetamodels_result(
      java.util.List<java.lang.String> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listMetamodels_result(listMetamodels_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listMetamodels_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listMetamodels_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listMetamodels_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listMetamodels_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listMetamodels_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 listMetamodels_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodels_resultStandardScheme getScheme() {
        return new listMetamodels_resultStandardScheme();
      }
    }

    private static class listMetamodels_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listMetamodels_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listMetamodels_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list282 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list282.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem283;
                  for (int _i284 = 0; _i284 < _list282.size; ++_i284)
                  {
                    _elem283 = iprot.readString();
                    struct.success.add(_elem283);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, listMetamodels_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter285 : struct.success)
            {
              oprot.writeString(_iter285);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listMetamodels_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodels_resultTupleScheme getScheme() {
        return new listMetamodels_resultTupleScheme();
      }
    }

    private static class listMetamodels_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listMetamodels_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listMetamodels_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter286 : struct.success)
            {
              oprot.writeString(_iter286);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listMetamodels_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list287.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem288;
            for (int _i289 = 0; _i289 < _list287.size; ++_i289)
            {
              _elem288 = iprot.readString();
              struct.success.add(_elem288);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField HAWK_INSTANCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hawkInstanceName", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField METAMODEL_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("metamodelURI", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listTypeNames_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listTypeNames_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String hawkInstanceName; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String metamodelURI; // 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 {
      HAWK_INSTANCE_NAME((short)1, "hawkInstanceName"),
      METAMODEL_URI((short)2, "metamodelURI");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // HAWK_INSTANCE_NAME
            return HAWK_INSTANCE_NAME;
          case 2: // METAMODEL_URI
            return METAMODEL_URI;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.HAWK_INSTANCE_NAME, new org.apache.thrift.meta_data.FieldMetaData("hawkInstanceName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.METAMODEL_URI, new org.apache.thrift.meta_data.FieldMetaData("metamodelURI", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listTypeNames_args.class, metaDataMap);
    }

    public listTypeNames_args() {
    }

    public listTypeNames_args(
      java.lang.String hawkInstanceName,
      java.lang.String metamodelURI)
    {
      this();
      this.hawkInstanceName = hawkInstanceName;
      this.metamodelURI = metamodelURI;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listTypeNames_args(listTypeNames_args other) {
      if (other.isSetHawkInstanceName()) {
        this.hawkInstanceName = other.hawkInstanceName;
      }
      if (other.isSetMetamodelURI()) {
        this.metamodelURI = other.metamodelURI;
      }
    }

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

    @Override
    public void clear() {
      this.hawkInstanceName = null;
      this.metamodelURI = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getHawkInstanceName() {
      return this.hawkInstanceName;
    }

    public listTypeNames_args setHawkInstanceName(@org.apache.thrift.annotation.Nullable java.lang.String hawkInstanceName) {
      this.hawkInstanceName = hawkInstanceName;
      return this;
    }

    public void unsetHawkInstanceName() {
      this.hawkInstanceName = null;
    }

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

    public void setHawkInstanceNameIsSet(boolean value) {
      if (!value) {
        this.hawkInstanceName = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getMetamodelURI() {
      return this.metamodelURI;
    }

    public listTypeNames_args setMetamodelURI(@org.apache.thrift.annotation.Nullable java.lang.String metamodelURI) {
      this.metamodelURI = metamodelURI;
      return this;
    }

    public void unsetMetamodelURI() {
      this.metamodelURI = null;
    }

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

    public void setMetamodelURIIsSet(boolean value) {
      if (!value) {
        this.metamodelURI = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case HAWK_INSTANCE_NAME:
        if (value == null) {
          unsetHawkInstanceName();
        } else {
          setHawkInstanceName((java.lang.String)value);
        }
        break;

      case METAMODEL_URI:
        if (value == null) {
          unsetMetamodelURI();
        } else {
          setMetamodelURI((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case HAWK_INSTANCE_NAME:
        return getHawkInstanceName();

      case METAMODEL_URI:
        return getMetamodelURI();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case HAWK_INSTANCE_NAME:
        return isSetHawkInstanceName();
      case METAMODEL_URI:
        return isSetMetamodelURI();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listTypeNames_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_hawkInstanceName = true && this.isSetHawkInstanceName();
      boolean that_present_hawkInstanceName = true && that.isSetHawkInstanceName();
      if (this_present_hawkInstanceName || that_present_hawkInstanceName) {
        if (!(this_present_hawkInstanceName && that_present_hawkInstanceName))
          return false;
        if (!this.hawkInstanceName.equals(that.hawkInstanceName))
          return false;
      }

      boolean this_present_metamodelURI = true && this.isSetMetamodelURI();
      boolean that_present_metamodelURI = true && that.isSetMetamodelURI();
      if (this_present_metamodelURI || that_present_metamodelURI) {
        if (!(this_present_metamodelURI && that_present_metamodelURI))
          return false;
        if (!this.metamodelURI.equals(that.metamodelURI))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetHawkInstanceName()) ? 131071 : 524287);
      if (isSetHawkInstanceName())
        hashCode = hashCode * 8191 + hawkInstanceName.hashCode();

      hashCode = hashCode * 8191 + ((isSetMetamodelURI()) ? 131071 : 524287);
      if (isSetMetamodelURI())
        hashCode = hashCode * 8191 + metamodelURI.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetHawkInstanceName()).compareTo(other.isSetHawkInstanceName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHawkInstanceName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hawkInstanceName, other.hawkInstanceName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMetamodelURI()).compareTo(other.isSetMetamodelURI());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMetamodelURI()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metamodelURI, other.metamodelURI);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listTypeNames_args(");
      boolean first = true;

      sb.append("hawkInstanceName:");
      if (this.hawkInstanceName == null) {
        sb.append("null");
      } else {
        sb.append(this.hawkInstanceName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("metamodelURI:");
      if (this.metamodelURI == null) {
        sb.append("null");
      } else {
        sb.append(this.metamodelURI);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (hawkInstanceName == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'hawkInstanceName' was not present! Struct: " + toString());
      }
      if (metamodelURI == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'metamodelURI' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listTypeNames_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listTypeNames_argsStandardScheme getScheme() {
        return new listTypeNames_argsStandardScheme();
      }
    }

    private static class listTypeNames_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listTypeNames_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listTypeNames_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: // HAWK_INSTANCE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.hawkInstanceName = iprot.readString();
                struct.setHawkInstanceNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // METAMODEL_URI
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.metamodelURI = iprot.readString();
                struct.setMetamodelURIIsSet(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, listTypeNames_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.hawkInstanceName != null) {
          oprot.writeFieldBegin(HAWK_INSTANCE_NAME_FIELD_DESC);
          oprot.writeString(struct.hawkInstanceName);
          oprot.writeFieldEnd();
        }
        if (struct.metamodelURI != null) {
          oprot.writeFieldBegin(METAMODEL_URI_FIELD_DESC);
          oprot.writeString(struct.metamodelURI);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listTypeNames_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listTypeNames_argsTupleScheme getScheme() {
        return new listTypeNames_argsTupleScheme();
      }
    }

    private static class listTypeNames_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listTypeNames_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listTypeNames_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.hawkInstanceName);
        oprot.writeString(struct.metamodelURI);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listTypeNames_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.hawkInstanceName = iprot.readString();
        struct.setHawkInstanceNameIsSet(true);
        struct.metamodelURI = iprot.readString();
        struct.setMetamodelURIIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listTypeNames_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listTypeNames_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable HawkMetamodelNotFound err3; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkMetamodelNotFound.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listTypeNames_result.class, metaDataMap);
    }

    public listTypeNames_result() {
    }

    public listTypeNames_result(
      java.util.List<java.lang.String> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      HawkMetamodelNotFound err3)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listTypeNames_result(listTypeNames_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new HawkMetamodelNotFound(other.err3);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listTypeNames_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listTypeNames_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listTypeNames_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkMetamodelNotFound getErr3() {
      return this.err3;
    }

    public listTypeNames_result setErr3(@org.apache.thrift.annotation.Nullable HawkMetamodelNotFound err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((HawkMetamodelNotFound)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listTypeNames_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listTypeNames_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      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, java.lang.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 listTypeNames_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listTypeNames_resultStandardScheme getScheme() {
        return new listTypeNames_resultStandardScheme();
      }
    }

    private static class listTypeNames_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listTypeNames_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listTypeNames_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list290 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list290.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem291;
                  for (int _i292 = 0; _i292 < _list290.size; ++_i292)
                  {
                    _elem291 = iprot.readString();
                    struct.success.add(_elem291);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new HawkMetamodelNotFound();
                struct.err3.read(iprot);
                struct.setErr3IsSet(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, listTypeNames_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter293 : struct.success)
            {
              oprot.writeString(_iter293);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listTypeNames_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listTypeNames_resultTupleScheme getScheme() {
        return new listTypeNames_resultTupleScheme();
      }
    }

    private static class listTypeNames_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listTypeNames_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listTypeNames_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        if (struct.isSetErr3()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter294 : struct.success)
            {
              oprot.writeString(_iter294);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listTypeNames_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list295 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list295.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem296;
            for (int _i297 = 0; _i297 < _list295.size; ++_i297)
            {
              _elem296 = iprot.readString();
              struct.success.add(_elem296);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.err3 = new HawkMetamodelNotFound();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField HAWK_INSTANCE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("hawkInstanceName", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField METAMODEL_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("metamodelURI", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField TYPE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("typeName", org.apache.thrift.protocol.TType.STRING, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listAttributeNames_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listAttributeNames_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String hawkInstanceName; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String metamodelURI; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String typeName; // 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 {
      HAWK_INSTANCE_NAME((short)1, "hawkInstanceName"),
      METAMODEL_URI((short)2, "metamodelURI"),
      TYPE_NAME((short)3, "typeName");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // HAWK_INSTANCE_NAME
            return HAWK_INSTANCE_NAME;
          case 2: // METAMODEL_URI
            return METAMODEL_URI;
          case 3: // TYPE_NAME
            return TYPE_NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.HAWK_INSTANCE_NAME, new org.apache.thrift.meta_data.FieldMetaData("hawkInstanceName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.METAMODEL_URI, new org.apache.thrift.meta_data.FieldMetaData("metamodelURI", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.TYPE_NAME, new org.apache.thrift.meta_data.FieldMetaData("typeName", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listAttributeNames_args.class, metaDataMap);
    }

    public listAttributeNames_args() {
    }

    public listAttributeNames_args(
      java.lang.String hawkInstanceName,
      java.lang.String metamodelURI,
      java.lang.String typeName)
    {
      this();
      this.hawkInstanceName = hawkInstanceName;
      this.metamodelURI = metamodelURI;
      this.typeName = typeName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listAttributeNames_args(listAttributeNames_args other) {
      if (other.isSetHawkInstanceName()) {
        this.hawkInstanceName = other.hawkInstanceName;
      }
      if (other.isSetMetamodelURI()) {
        this.metamodelURI = other.metamodelURI;
      }
      if (other.isSetTypeName()) {
        this.typeName = other.typeName;
      }
    }

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

    @Override
    public void clear() {
      this.hawkInstanceName = null;
      this.metamodelURI = null;
      this.typeName = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getHawkInstanceName() {
      return this.hawkInstanceName;
    }

    public listAttributeNames_args setHawkInstanceName(@org.apache.thrift.annotation.Nullable java.lang.String hawkInstanceName) {
      this.hawkInstanceName = hawkInstanceName;
      return this;
    }

    public void unsetHawkInstanceName() {
      this.hawkInstanceName = null;
    }

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

    public void setHawkInstanceNameIsSet(boolean value) {
      if (!value) {
        this.hawkInstanceName = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getMetamodelURI() {
      return this.metamodelURI;
    }

    public listAttributeNames_args setMetamodelURI(@org.apache.thrift.annotation.Nullable java.lang.String metamodelURI) {
      this.metamodelURI = metamodelURI;
      return this;
    }

    public void unsetMetamodelURI() {
      this.metamodelURI = null;
    }

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

    public void setMetamodelURIIsSet(boolean value) {
      if (!value) {
        this.metamodelURI = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getTypeName() {
      return this.typeName;
    }

    public listAttributeNames_args setTypeName(@org.apache.thrift.annotation.Nullable java.lang.String typeName) {
      this.typeName = typeName;
      return this;
    }

    public void unsetTypeName() {
      this.typeName = null;
    }

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

    public void setTypeNameIsSet(boolean value) {
      if (!value) {
        this.typeName = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case HAWK_INSTANCE_NAME:
        if (value == null) {
          unsetHawkInstanceName();
        } else {
          setHawkInstanceName((java.lang.String)value);
        }
        break;

      case METAMODEL_URI:
        if (value == null) {
          unsetMetamodelURI();
        } else {
          setMetamodelURI((java.lang.String)value);
        }
        break;

      case TYPE_NAME:
        if (value == null) {
          unsetTypeName();
        } else {
          setTypeName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case HAWK_INSTANCE_NAME:
        return getHawkInstanceName();

      case METAMODEL_URI:
        return getMetamodelURI();

      case TYPE_NAME:
        return getTypeName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case HAWK_INSTANCE_NAME:
        return isSetHawkInstanceName();
      case METAMODEL_URI:
        return isSetMetamodelURI();
      case TYPE_NAME:
        return isSetTypeName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listAttributeNames_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_hawkInstanceName = true && this.isSetHawkInstanceName();
      boolean that_present_hawkInstanceName = true && that.isSetHawkInstanceName();
      if (this_present_hawkInstanceName || that_present_hawkInstanceName) {
        if (!(this_present_hawkInstanceName && that_present_hawkInstanceName))
          return false;
        if (!this.hawkInstanceName.equals(that.hawkInstanceName))
          return false;
      }

      boolean this_present_metamodelURI = true && this.isSetMetamodelURI();
      boolean that_present_metamodelURI = true && that.isSetMetamodelURI();
      if (this_present_metamodelURI || that_present_metamodelURI) {
        if (!(this_present_metamodelURI && that_present_metamodelURI))
          return false;
        if (!this.metamodelURI.equals(that.metamodelURI))
          return false;
      }

      boolean this_present_typeName = true && this.isSetTypeName();
      boolean that_present_typeName = true && that.isSetTypeName();
      if (this_present_typeName || that_present_typeName) {
        if (!(this_present_typeName && that_present_typeName))
          return false;
        if (!this.typeName.equals(that.typeName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetHawkInstanceName()) ? 131071 : 524287);
      if (isSetHawkInstanceName())
        hashCode = hashCode * 8191 + hawkInstanceName.hashCode();

      hashCode = hashCode * 8191 + ((isSetMetamodelURI()) ? 131071 : 524287);
      if (isSetMetamodelURI())
        hashCode = hashCode * 8191 + metamodelURI.hashCode();

      hashCode = hashCode * 8191 + ((isSetTypeName()) ? 131071 : 524287);
      if (isSetTypeName())
        hashCode = hashCode * 8191 + typeName.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetHawkInstanceName()).compareTo(other.isSetHawkInstanceName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHawkInstanceName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hawkInstanceName, other.hawkInstanceName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMetamodelURI()).compareTo(other.isSetMetamodelURI());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMetamodelURI()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.metamodelURI, other.metamodelURI);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetTypeName()).compareTo(other.isSetTypeName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTypeName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeName, other.typeName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listAttributeNames_args(");
      boolean first = true;

      sb.append("hawkInstanceName:");
      if (this.hawkInstanceName == null) {
        sb.append("null");
      } else {
        sb.append(this.hawkInstanceName);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("metamodelURI:");
      if (this.metamodelURI == null) {
        sb.append("null");
      } else {
        sb.append(this.metamodelURI);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("typeName:");
      if (this.typeName == null) {
        sb.append("null");
      } else {
        sb.append(this.typeName);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (hawkInstanceName == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'hawkInstanceName' was not present! Struct: " + toString());
      }
      if (metamodelURI == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'metamodelURI' was not present! Struct: " + toString());
      }
      if (typeName == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'typeName' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listAttributeNames_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listAttributeNames_argsStandardScheme getScheme() {
        return new listAttributeNames_argsStandardScheme();
      }
    }

    private static class listAttributeNames_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listAttributeNames_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listAttributeNames_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: // HAWK_INSTANCE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.hawkInstanceName = iprot.readString();
                struct.setHawkInstanceNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // METAMODEL_URI
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.metamodelURI = iprot.readString();
                struct.setMetamodelURIIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // TYPE_NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.typeName = iprot.readString();
                struct.setTypeNameIsSet(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, listAttributeNames_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.hawkInstanceName != null) {
          oprot.writeFieldBegin(HAWK_INSTANCE_NAME_FIELD_DESC);
          oprot.writeString(struct.hawkInstanceName);
          oprot.writeFieldEnd();
        }
        if (struct.metamodelURI != null) {
          oprot.writeFieldBegin(METAMODEL_URI_FIELD_DESC);
          oprot.writeString(struct.metamodelURI);
          oprot.writeFieldEnd();
        }
        if (struct.typeName != null) {
          oprot.writeFieldBegin(TYPE_NAME_FIELD_DESC);
          oprot.writeString(struct.typeName);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listAttributeNames_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listAttributeNames_argsTupleScheme getScheme() {
        return new listAttributeNames_argsTupleScheme();
      }
    }

    private static class listAttributeNames_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listAttributeNames_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listAttributeNames_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.hawkInstanceName);
        oprot.writeString(struct.metamodelURI);
        oprot.writeString(struct.typeName);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listAttributeNames_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.hawkInstanceName = iprot.readString();
        struct.setHawkInstanceNameIsSet(true);
        struct.metamodelURI = iprot.readString();
        struct.setMetamodelURIIsSet(true);
        struct.typeName = iprot.readString();
        struct.setTypeNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField ERR4_FIELD_DESC = new org.apache.thrift.protocol.TField("err4", org.apache.thrift.protocol.TType.STRUCT, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listAttributeNames_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listAttributeNames_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable HawkMetamodelNotFound err3; // required
    public @org.apache.thrift.annotation.Nullable HawkTypeNotFound err4; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3"),
      ERR4((short)4, "err4");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          case 4: // ERR4
            return ERR4;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkMetamodelNotFound.class)));
      tmpMap.put(_Fields.ERR4, new org.apache.thrift.meta_data.FieldMetaData("err4", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkTypeNotFound.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listAttributeNames_result.class, metaDataMap);
    }

    public listAttributeNames_result() {
    }

    public listAttributeNames_result(
      java.util.List<java.lang.String> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      HawkMetamodelNotFound err3,
      HawkTypeNotFound err4)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
      this.err4 = err4;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listAttributeNames_result(listAttributeNames_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new HawkMetamodelNotFound(other.err3);
      }
      if (other.isSetErr4()) {
        this.err4 = new HawkTypeNotFound(other.err4);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
      this.err4 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listAttributeNames_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listAttributeNames_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listAttributeNames_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkMetamodelNotFound getErr3() {
      return this.err3;
    }

    public listAttributeNames_result setErr3(@org.apache.thrift.annotation.Nullable HawkMetamodelNotFound err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkTypeNotFound getErr4() {
      return this.err4;
    }

    public listAttributeNames_result setErr4(@org.apache.thrift.annotation.Nullable HawkTypeNotFound err4) {
      this.err4 = err4;
      return this;
    }

    public void unsetErr4() {
      this.err4 = null;
    }

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

    public void setErr4IsSet(boolean value) {
      if (!value) {
        this.err4 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((HawkMetamodelNotFound)value);
        }
        break;

      case ERR4:
        if (value == null) {
          unsetErr4();
        } else {
          setErr4((HawkTypeNotFound)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      case ERR4:
        return getErr4();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      case ERR4:
        return isSetErr4();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listAttributeNames_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      boolean this_present_err4 = true && this.isSetErr4();
      boolean that_present_err4 = true && that.isSetErr4();
      if (this_present_err4 || that_present_err4) {
        if (!(this_present_err4 && that_present_err4))
          return false;
        if (!this.err4.equals(that.err4))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr4()) ? 131071 : 524287);
      if (isSetErr4())
        hashCode = hashCode * 8191 + err4.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr4()).compareTo(other.isSetErr4());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr4()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err4, other.err4);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listAttributeNames_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err4:");
      if (this.err4 == null) {
        sb.append("null");
      } else {
        sb.append(this.err4);
      }
      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, java.lang.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 listAttributeNames_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listAttributeNames_resultStandardScheme getScheme() {
        return new listAttributeNames_resultStandardScheme();
      }
    }

    private static class listAttributeNames_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listAttributeNames_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listAttributeNames_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list298 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list298.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem299;
                  for (int _i300 = 0; _i300 < _list298.size; ++_i300)
                  {
                    _elem299 = iprot.readString();
                    struct.success.add(_elem299);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new HawkMetamodelNotFound();
                struct.err3.read(iprot);
                struct.setErr3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // ERR4
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err4 = new HawkTypeNotFound();
                struct.err4.read(iprot);
                struct.setErr4IsSet(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, listAttributeNames_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter301 : struct.success)
            {
              oprot.writeString(_iter301);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err4 != null) {
          oprot.writeFieldBegin(ERR4_FIELD_DESC);
          struct.err4.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listAttributeNames_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listAttributeNames_resultTupleScheme getScheme() {
        return new listAttributeNames_resultTupleScheme();
      }
    }

    private static class listAttributeNames_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listAttributeNames_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listAttributeNames_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        if (struct.isSetErr3()) {
          optionals.set(3);
        }
        if (struct.isSetErr4()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter302 : struct.success)
            {
              oprot.writeString(_iter302);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
        if (struct.isSetErr4()) {
          struct.err4.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listAttributeNames_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list303 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list303.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem304;
            for (int _i305 = 0; _i305 < _list303.size; ++_i305)
            {
              _elem304 = iprot.readString();
              struct.success.add(_elem304);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.err3 = new HawkMetamodelNotFound();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
        if (incoming.get(4)) {
          struct.err4 = new HawkTypeNotFound();
          struct.err4.read(iprot);
          struct.setErr4IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listMetamodelParsers_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listMetamodelParsers_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listMetamodelParsers_args.class, metaDataMap);
    }

    public listMetamodelParsers_args() {
    }

    public listMetamodelParsers_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listMetamodelParsers_args(listMetamodelParsers_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public listMetamodelParsers_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listMetamodelParsers_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listMetamodelParsers_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listMetamodelParsers_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodelParsers_argsStandardScheme getScheme() {
        return new listMetamodelParsers_argsStandardScheme();
      }
    }

    private static class listMetamodelParsers_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listMetamodelParsers_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listMetamodelParsers_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, listMetamodelParsers_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listMetamodelParsers_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodelParsers_argsTupleScheme getScheme() {
        return new listMetamodelParsers_argsTupleScheme();
      }
    }

    private static class listMetamodelParsers_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listMetamodelParsers_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listMetamodelParsers_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listMetamodelParsers_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listMetamodelParsers_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listMetamodelParsers_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<MetamodelParserDetails> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, MetamodelParserDetails.class))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listMetamodelParsers_result.class, metaDataMap);
    }

    public listMetamodelParsers_result() {
    }

    public listMetamodelParsers_result(
      java.util.List<MetamodelParserDetails> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listMetamodelParsers_result(listMetamodelParsers_result other) {
      if (other.isSetSuccess()) {
        java.util.List<MetamodelParserDetails> __this__success = new java.util.ArrayList<MetamodelParserDetails>(other.success.size());
        for (MetamodelParserDetails other_element : other.success) {
          __this__success.add(new MetamodelParserDetails(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<MetamodelParserDetails> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(MetamodelParserDetails elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<MetamodelParserDetails>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<MetamodelParserDetails> getSuccess() {
      return this.success;
    }

    public listMetamodelParsers_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<MetamodelParserDetails> 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listMetamodelParsers_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listMetamodelParsers_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<MetamodelParserDetails>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listMetamodelParsers_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listMetamodelParsers_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 listMetamodelParsers_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodelParsers_resultStandardScheme getScheme() {
        return new listMetamodelParsers_resultStandardScheme();
      }
    }

    private static class listMetamodelParsers_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listMetamodelParsers_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listMetamodelParsers_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list306 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<MetamodelParserDetails>(_list306.size);
                  @org.apache.thrift.annotation.Nullable MetamodelParserDetails _elem307;
                  for (int _i308 = 0; _i308 < _list306.size; ++_i308)
                  {
                    _elem307 = new MetamodelParserDetails();
                    _elem307.read(iprot);
                    struct.success.add(_elem307);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, listMetamodelParsers_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (MetamodelParserDetails _iter309 : struct.success)
            {
              _iter309.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listMetamodelParsers_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listMetamodelParsers_resultTupleScheme getScheme() {
        return new listMetamodelParsers_resultTupleScheme();
      }
    }

    private static class listMetamodelParsers_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listMetamodelParsers_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listMetamodelParsers_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (MetamodelParserDetails _iter310 : struct.success)
            {
              _iter310.write(oprot);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listMetamodelParsers_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list311 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<MetamodelParserDetails>(_list311.size);
            @org.apache.thrift.annotation.Nullable MetamodelParserDetails _elem312;
            for (int _i313 = 0; _i313 < _list311.size; ++_i313)
            {
              _elem312 = new MetamodelParserDetails();
              _elem312.read(iprot);
              struct.success.add(_elem312);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listQueryLanguages_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listQueryLanguages_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listQueryLanguages_args.class, metaDataMap);
    }

    public listQueryLanguages_args() {
    }

    public listQueryLanguages_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listQueryLanguages_args(listQueryLanguages_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public listQueryLanguages_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listQueryLanguages_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listQueryLanguages_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listQueryLanguages_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listQueryLanguages_argsStandardScheme getScheme() {
        return new listQueryLanguages_argsStandardScheme();
      }
    }

    private static class listQueryLanguages_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listQueryLanguages_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listQueryLanguages_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, listQueryLanguages_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listQueryLanguages_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listQueryLanguages_argsTupleScheme getScheme() {
        return new listQueryLanguages_argsTupleScheme();
      }
    }

    private static class listQueryLanguages_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listQueryLanguages_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listQueryLanguages_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listQueryLanguages_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listQueryLanguages_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listQueryLanguages_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listQueryLanguages_result.class, metaDataMap);
    }

    public listQueryLanguages_result() {
    }

    public listQueryLanguages_result(
      java.util.List<java.lang.String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listQueryLanguages_result(listQueryLanguages_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listQueryLanguages_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listQueryLanguages_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listQueryLanguages_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
    }

    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, java.lang.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 listQueryLanguages_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listQueryLanguages_resultStandardScheme getScheme() {
        return new listQueryLanguages_resultStandardScheme();
      }
    }

    private static class listQueryLanguages_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listQueryLanguages_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listQueryLanguages_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list314 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list314.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem315;
                  for (int _i316 = 0; _i316 < _list314.size; ++_i316)
                  {
                    _elem315 = iprot.readString();
                    struct.success.add(_elem315);
                  }
                  iprot.readListEnd();
                }
                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, listQueryLanguages_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter317 : struct.success)
            {
              oprot.writeString(_iter317);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listQueryLanguages_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listQueryLanguages_resultTupleScheme getScheme() {
        return new listQueryLanguages_resultTupleScheme();
      }
    }

    private static class listQueryLanguages_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listQueryLanguages_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listQueryLanguages_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter318 : struct.success)
            {
              oprot.writeString(_iter318);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listQueryLanguages_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list319 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list319.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem320;
            for (int _i321 = 0; _i321 < _list319.size; ++_i321)
            {
              _elem320 = iprot.readString();
              struct.success.add(_elem320);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField LANGUAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("language", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new query_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new query_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String query; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String language; // required
    public @org.apache.thrift.annotation.Nullable HawkQueryOptions options; // 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 {
      NAME((short)1, "name"),
      QUERY((short)2, "query"),
      LANGUAGE((short)3, "language"),
      OPTIONS((short)4, "options");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // QUERY
            return QUERY;
          case 3: // LANGUAGE
            return LANGUAGE;
          case 4: // OPTIONS
            return OPTIONS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.LANGUAGE, new org.apache.thrift.meta_data.FieldMetaData("language", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkQueryOptions.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(query_args.class, metaDataMap);
    }

    public query_args() {
    }

    public query_args(
      java.lang.String name,
      java.lang.String query,
      java.lang.String language,
      HawkQueryOptions options)
    {
      this();
      this.name = name;
      this.query = query;
      this.language = language;
      this.options = options;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public query_args(query_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetQuery()) {
        this.query = other.query;
      }
      if (other.isSetLanguage()) {
        this.language = other.language;
      }
      if (other.isSetOptions()) {
        this.options = new HawkQueryOptions(other.options);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.query = null;
      this.language = null;
      this.options = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public query_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getQuery() {
      return this.query;
    }

    public query_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) {
      this.query = query;
      return this;
    }

    public void unsetQuery() {
      this.query = null;
    }

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

    public void setQueryIsSet(boolean value) {
      if (!value) {
        this.query = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getLanguage() {
      return this.language;
    }

    public query_args setLanguage(@org.apache.thrift.annotation.Nullable java.lang.String language) {
      this.language = language;
      return this;
    }

    public void unsetLanguage() {
      this.language = null;
    }

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

    public void setLanguageIsSet(boolean value) {
      if (!value) {
        this.language = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkQueryOptions getOptions() {
      return this.options;
    }

    public query_args setOptions(@org.apache.thrift.annotation.Nullable HawkQueryOptions options) {
      this.options = options;
      return this;
    }

    public void unsetOptions() {
      this.options = null;
    }

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

    public void setOptionsIsSet(boolean value) {
      if (!value) {
        this.options = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case QUERY:
        if (value == null) {
          unsetQuery();
        } else {
          setQuery((java.lang.String)value);
        }
        break;

      case LANGUAGE:
        if (value == null) {
          unsetLanguage();
        } else {
          setLanguage((java.lang.String)value);
        }
        break;

      case OPTIONS:
        if (value == null) {
          unsetOptions();
        } else {
          setOptions((HawkQueryOptions)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case QUERY:
        return getQuery();

      case LANGUAGE:
        return getLanguage();

      case OPTIONS:
        return getOptions();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case QUERY:
        return isSetQuery();
      case LANGUAGE:
        return isSetLanguage();
      case OPTIONS:
        return isSetOptions();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(query_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_query = true && this.isSetQuery();
      boolean that_present_query = true && that.isSetQuery();
      if (this_present_query || that_present_query) {
        if (!(this_present_query && that_present_query))
          return false;
        if (!this.query.equals(that.query))
          return false;
      }

      boolean this_present_language = true && this.isSetLanguage();
      boolean that_present_language = true && that.isSetLanguage();
      if (this_present_language || that_present_language) {
        if (!(this_present_language && that_present_language))
          return false;
        if (!this.language.equals(that.language))
          return false;
      }

      boolean this_present_options = true && this.isSetOptions();
      boolean that_present_options = true && that.isSetOptions();
      if (this_present_options || that_present_options) {
        if (!(this_present_options && that_present_options))
          return false;
        if (!this.options.equals(that.options))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287);
      if (isSetQuery())
        hashCode = hashCode * 8191 + query.hashCode();

      hashCode = hashCode * 8191 + ((isSetLanguage()) ? 131071 : 524287);
      if (isSetLanguage())
        hashCode = hashCode * 8191 + language.hashCode();

      hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
      if (isSetOptions())
        hashCode = hashCode * 8191 + options.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuery()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetLanguage()).compareTo(other.isSetLanguage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLanguage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.language, other.language);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOptions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("query_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("query:");
      if (this.query == null) {
        sb.append("null");
      } else {
        sb.append(this.query);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("language:");
      if (this.language == null) {
        sb.append("null");
      } else {
        sb.append(this.language);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (query == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'query' was not present! Struct: " + toString());
      }
      if (language == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'language' was not present! Struct: " + toString());
      }
      if (options == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'options' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (options != null) {
        options.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, java.lang.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 query_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_argsStandardScheme getScheme() {
        return new query_argsStandardScheme();
      }
    }

    private static class query_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<query_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, query_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // QUERY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.query = iprot.readString();
                struct.setQueryIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // LANGUAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.language = iprot.readString();
                struct.setLanguageIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // OPTIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.options = new HawkQueryOptions();
                struct.options.read(iprot);
                struct.setOptionsIsSet(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, query_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.query != null) {
          oprot.writeFieldBegin(QUERY_FIELD_DESC);
          oprot.writeString(struct.query);
          oprot.writeFieldEnd();
        }
        if (struct.language != null) {
          oprot.writeFieldBegin(LANGUAGE_FIELD_DESC);
          oprot.writeString(struct.language);
          oprot.writeFieldEnd();
        }
        if (struct.options != null) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          struct.options.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class query_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_argsTupleScheme getScheme() {
        return new query_argsTupleScheme();
      }
    }

    private static class query_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<query_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, query_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.query);
        oprot.writeString(struct.language);
        struct.options.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, query_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.query = iprot.readString();
        struct.setQueryIsSet(true);
        struct.language = iprot.readString();
        struct.setLanguageIsSet(true);
        struct.options = new HawkQueryOptions();
        struct.options.read(iprot);
        struct.setOptionsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  public static class query_result implements org.apache.thrift.TBase<query_result, query_result._Fields>, java.io.Serializable, Cloneable, Comparable<query_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("query_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 org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField ERR4_FIELD_DESC = new org.apache.thrift.protocol.TField("err4", org.apache.thrift.protocol.TType.STRUCT, (short)4);
    private static final org.apache.thrift.protocol.TField ERR5_FIELD_DESC = new org.apache.thrift.protocol.TField("err5", org.apache.thrift.protocol.TType.STRUCT, (short)5);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new query_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new query_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable QueryResult success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable UnknownQueryLanguage err3; // required
    public @org.apache.thrift.annotation.Nullable InvalidQuery err4; // required
    public @org.apache.thrift.annotation.Nullable FailedQuery err5; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3"),
      ERR4((short)4, "err4"),
      ERR5((short)5, "err5");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          case 4: // ERR4
            return ERR4;
          case 5: // ERR5
            return ERR5;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, QueryResult.class)));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnknownQueryLanguage.class)));
      tmpMap.put(_Fields.ERR4, new org.apache.thrift.meta_data.FieldMetaData("err4", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidQuery.class)));
      tmpMap.put(_Fields.ERR5, new org.apache.thrift.meta_data.FieldMetaData("err5", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FailedQuery.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(query_result.class, metaDataMap);
    }

    public query_result() {
    }

    public query_result(
      QueryResult success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      UnknownQueryLanguage err3,
      InvalidQuery err4,
      FailedQuery err5)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
      this.err4 = err4;
      this.err5 = err5;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public query_result(query_result other) {
      if (other.isSetSuccess()) {
        this.success = new QueryResult(other.success);
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new UnknownQueryLanguage(other.err3);
      }
      if (other.isSetErr4()) {
        this.err4 = new InvalidQuery(other.err4);
      }
      if (other.isSetErr5()) {
        this.err5 = new FailedQuery(other.err5);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
      this.err4 = null;
      this.err5 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public QueryResult getSuccess() {
      return this.success;
    }

    public query_result setSuccess(@org.apache.thrift.annotation.Nullable QueryResult 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public query_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public query_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public UnknownQueryLanguage getErr3() {
      return this.err3;
    }

    public query_result setErr3(@org.apache.thrift.annotation.Nullable UnknownQueryLanguage err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidQuery getErr4() {
      return this.err4;
    }

    public query_result setErr4(@org.apache.thrift.annotation.Nullable InvalidQuery err4) {
      this.err4 = err4;
      return this;
    }

    public void unsetErr4() {
      this.err4 = null;
    }

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

    public void setErr4IsSet(boolean value) {
      if (!value) {
        this.err4 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public FailedQuery getErr5() {
      return this.err5;
    }

    public query_result setErr5(@org.apache.thrift.annotation.Nullable FailedQuery err5) {
      this.err5 = err5;
      return this;
    }

    public void unsetErr5() {
      this.err5 = null;
    }

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

    public void setErr5IsSet(boolean value) {
      if (!value) {
        this.err5 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((QueryResult)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((UnknownQueryLanguage)value);
        }
        break;

      case ERR4:
        if (value == null) {
          unsetErr4();
        } else {
          setErr4((InvalidQuery)value);
        }
        break;

      case ERR5:
        if (value == null) {
          unsetErr5();
        } else {
          setErr5((FailedQuery)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      case ERR4:
        return getErr4();

      case ERR5:
        return getErr5();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      case ERR4:
        return isSetErr4();
      case ERR5:
        return isSetErr5();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(query_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      boolean this_present_err4 = true && this.isSetErr4();
      boolean that_present_err4 = true && that.isSetErr4();
      if (this_present_err4 || that_present_err4) {
        if (!(this_present_err4 && that_present_err4))
          return false;
        if (!this.err4.equals(that.err4))
          return false;
      }

      boolean this_present_err5 = true && this.isSetErr5();
      boolean that_present_err5 = true && that.isSetErr5();
      if (this_present_err5 || that_present_err5) {
        if (!(this_present_err5 && that_present_err5))
          return false;
        if (!this.err5.equals(that.err5))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr4()) ? 131071 : 524287);
      if (isSetErr4())
        hashCode = hashCode * 8191 + err4.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr5()) ? 131071 : 524287);
      if (isSetErr5())
        hashCode = hashCode * 8191 + err5.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr4()).compareTo(other.isSetErr4());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr4()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err4, other.err4);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr5()).compareTo(other.isSetErr5());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr5()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err5, other.err5);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("query_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err4:");
      if (this.err4 == null) {
        sb.append("null");
      } else {
        sb.append(this.err4);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err5:");
      if (this.err5 == null) {
        sb.append("null");
      } else {
        sb.append(this.err5);
      }
      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, java.lang.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 query_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_resultStandardScheme getScheme() {
        return new query_resultStandardScheme();
      }
    }

    private static class query_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<query_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, query_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 QueryResult();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new UnknownQueryLanguage();
                struct.err3.read(iprot);
                struct.setErr3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // ERR4
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err4 = new InvalidQuery();
                struct.err4.read(iprot);
                struct.setErr4IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // ERR5
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err5 = new FailedQuery();
                struct.err5.read(iprot);
                struct.setErr5IsSet(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, query_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();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err4 != null) {
          oprot.writeFieldBegin(ERR4_FIELD_DESC);
          struct.err4.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err5 != null) {
          oprot.writeFieldBegin(ERR5_FIELD_DESC);
          struct.err5.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class query_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public query_resultTupleScheme getScheme() {
        return new query_resultTupleScheme();
      }
    }

    private static class query_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<query_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, query_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        if (struct.isSetErr3()) {
          optionals.set(3);
        }
        if (struct.isSetErr4()) {
          optionals.set(4);
        }
        if (struct.isSetErr5()) {
          optionals.set(5);
        }
        oprot.writeBitSet(optionals, 6);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
        if (struct.isSetErr4()) {
          struct.err4.write(oprot);
        }
        if (struct.isSetErr5()) {
          struct.err5.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, query_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(6);
        if (incoming.get(0)) {
          struct.success = new QueryResult();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.err3 = new UnknownQueryLanguage();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
        if (incoming.get(4)) {
          struct.err4 = new InvalidQuery();
          struct.err4.read(iprot);
          struct.setErr4IsSet(true);
        }
        if (incoming.get(5)) {
          struct.err5 = new FailedQuery();
          struct.err5.read(iprot);
          struct.setErr5IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField LANGUAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("language", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timedQuery_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timedQuery_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String query; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String language; // required
    public @org.apache.thrift.annotation.Nullable HawkQueryOptions options; // 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 {
      NAME((short)1, "name"),
      QUERY((short)2, "query"),
      LANGUAGE((short)3, "language"),
      OPTIONS((short)4, "options");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // QUERY
            return QUERY;
          case 3: // LANGUAGE
            return LANGUAGE;
          case 4: // OPTIONS
            return OPTIONS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.LANGUAGE, new org.apache.thrift.meta_data.FieldMetaData("language", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkQueryOptions.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timedQuery_args.class, metaDataMap);
    }

    public timedQuery_args() {
    }

    public timedQuery_args(
      java.lang.String name,
      java.lang.String query,
      java.lang.String language,
      HawkQueryOptions options)
    {
      this();
      this.name = name;
      this.query = query;
      this.language = language;
      this.options = options;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public timedQuery_args(timedQuery_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetQuery()) {
        this.query = other.query;
      }
      if (other.isSetLanguage()) {
        this.language = other.language;
      }
      if (other.isSetOptions()) {
        this.options = new HawkQueryOptions(other.options);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.query = null;
      this.language = null;
      this.options = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public timedQuery_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getQuery() {
      return this.query;
    }

    public timedQuery_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) {
      this.query = query;
      return this;
    }

    public void unsetQuery() {
      this.query = null;
    }

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

    public void setQueryIsSet(boolean value) {
      if (!value) {
        this.query = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getLanguage() {
      return this.language;
    }

    public timedQuery_args setLanguage(@org.apache.thrift.annotation.Nullable java.lang.String language) {
      this.language = language;
      return this;
    }

    public void unsetLanguage() {
      this.language = null;
    }

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

    public void setLanguageIsSet(boolean value) {
      if (!value) {
        this.language = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkQueryOptions getOptions() {
      return this.options;
    }

    public timedQuery_args setOptions(@org.apache.thrift.annotation.Nullable HawkQueryOptions options) {
      this.options = options;
      return this;
    }

    public void unsetOptions() {
      this.options = null;
    }

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

    public void setOptionsIsSet(boolean value) {
      if (!value) {
        this.options = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case QUERY:
        if (value == null) {
          unsetQuery();
        } else {
          setQuery((java.lang.String)value);
        }
        break;

      case LANGUAGE:
        if (value == null) {
          unsetLanguage();
        } else {
          setLanguage((java.lang.String)value);
        }
        break;

      case OPTIONS:
        if (value == null) {
          unsetOptions();
        } else {
          setOptions((HawkQueryOptions)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case QUERY:
        return getQuery();

      case LANGUAGE:
        return getLanguage();

      case OPTIONS:
        return getOptions();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case QUERY:
        return isSetQuery();
      case LANGUAGE:
        return isSetLanguage();
      case OPTIONS:
        return isSetOptions();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(timedQuery_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_query = true && this.isSetQuery();
      boolean that_present_query = true && that.isSetQuery();
      if (this_present_query || that_present_query) {
        if (!(this_present_query && that_present_query))
          return false;
        if (!this.query.equals(that.query))
          return false;
      }

      boolean this_present_language = true && this.isSetLanguage();
      boolean that_present_language = true && that.isSetLanguage();
      if (this_present_language || that_present_language) {
        if (!(this_present_language && that_present_language))
          return false;
        if (!this.language.equals(that.language))
          return false;
      }

      boolean this_present_options = true && this.isSetOptions();
      boolean that_present_options = true && that.isSetOptions();
      if (this_present_options || that_present_options) {
        if (!(this_present_options && that_present_options))
          return false;
        if (!this.options.equals(that.options))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287);
      if (isSetQuery())
        hashCode = hashCode * 8191 + query.hashCode();

      hashCode = hashCode * 8191 + ((isSetLanguage()) ? 131071 : 524287);
      if (isSetLanguage())
        hashCode = hashCode * 8191 + language.hashCode();

      hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
      if (isSetOptions())
        hashCode = hashCode * 8191 + options.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuery()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetLanguage()).compareTo(other.isSetLanguage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLanguage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.language, other.language);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOptions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("timedQuery_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("query:");
      if (this.query == null) {
        sb.append("null");
      } else {
        sb.append(this.query);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("language:");
      if (this.language == null) {
        sb.append("null");
      } else {
        sb.append(this.language);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (query == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'query' was not present! Struct: " + toString());
      }
      if (language == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'language' was not present! Struct: " + toString());
      }
      if (options == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'options' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (options != null) {
        options.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, java.lang.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 timedQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public timedQuery_argsStandardScheme getScheme() {
        return new timedQuery_argsStandardScheme();
      }
    }

    private static class timedQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<timedQuery_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, timedQuery_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // QUERY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.query = iprot.readString();
                struct.setQueryIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // LANGUAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.language = iprot.readString();
                struct.setLanguageIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // OPTIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.options = new HawkQueryOptions();
                struct.options.read(iprot);
                struct.setOptionsIsSet(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, timedQuery_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.query != null) {
          oprot.writeFieldBegin(QUERY_FIELD_DESC);
          oprot.writeString(struct.query);
          oprot.writeFieldEnd();
        }
        if (struct.language != null) {
          oprot.writeFieldBegin(LANGUAGE_FIELD_DESC);
          oprot.writeString(struct.language);
          oprot.writeFieldEnd();
        }
        if (struct.options != null) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          struct.options.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class timedQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public timedQuery_argsTupleScheme getScheme() {
        return new timedQuery_argsTupleScheme();
      }
    }

    private static class timedQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<timedQuery_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, timedQuery_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.query);
        oprot.writeString(struct.language);
        struct.options.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, timedQuery_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.query = iprot.readString();
        struct.setQueryIsSet(true);
        struct.language = iprot.readString();
        struct.setLanguageIsSet(true);
        struct.options = new HawkQueryOptions();
        struct.options.read(iprot);
        struct.setOptionsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  public static class timedQuery_result implements org.apache.thrift.TBase<timedQuery_result, timedQuery_result._Fields>, java.io.Serializable, Cloneable, Comparable<timedQuery_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("timedQuery_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 org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField ERR4_FIELD_DESC = new org.apache.thrift.protocol.TField("err4", org.apache.thrift.protocol.TType.STRUCT, (short)4);
    private static final org.apache.thrift.protocol.TField ERR5_FIELD_DESC = new org.apache.thrift.protocol.TField("err5", org.apache.thrift.protocol.TType.STRUCT, (short)5);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new timedQuery_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new timedQuery_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable QueryReport success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable UnknownQueryLanguage err3; // required
    public @org.apache.thrift.annotation.Nullable InvalidQuery err4; // required
    public @org.apache.thrift.annotation.Nullable FailedQuery err5; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3"),
      ERR4((short)4, "err4"),
      ERR5((short)5, "err5");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          case 4: // ERR4
            return ERR4;
          case 5: // ERR5
            return ERR5;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, QueryReport.class)));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnknownQueryLanguage.class)));
      tmpMap.put(_Fields.ERR4, new org.apache.thrift.meta_data.FieldMetaData("err4", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidQuery.class)));
      tmpMap.put(_Fields.ERR5, new org.apache.thrift.meta_data.FieldMetaData("err5", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FailedQuery.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(timedQuery_result.class, metaDataMap);
    }

    public timedQuery_result() {
    }

    public timedQuery_result(
      QueryReport success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      UnknownQueryLanguage err3,
      InvalidQuery err4,
      FailedQuery err5)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
      this.err4 = err4;
      this.err5 = err5;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public timedQuery_result(timedQuery_result other) {
      if (other.isSetSuccess()) {
        this.success = new QueryReport(other.success);
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new UnknownQueryLanguage(other.err3);
      }
      if (other.isSetErr4()) {
        this.err4 = new InvalidQuery(other.err4);
      }
      if (other.isSetErr5()) {
        this.err5 = new FailedQuery(other.err5);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
      this.err4 = null;
      this.err5 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public QueryReport getSuccess() {
      return this.success;
    }

    public timedQuery_result setSuccess(@org.apache.thrift.annotation.Nullable QueryReport 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public timedQuery_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public timedQuery_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public UnknownQueryLanguage getErr3() {
      return this.err3;
    }

    public timedQuery_result setErr3(@org.apache.thrift.annotation.Nullable UnknownQueryLanguage err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidQuery getErr4() {
      return this.err4;
    }

    public timedQuery_result setErr4(@org.apache.thrift.annotation.Nullable InvalidQuery err4) {
      this.err4 = err4;
      return this;
    }

    public void unsetErr4() {
      this.err4 = null;
    }

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

    public void setErr4IsSet(boolean value) {
      if (!value) {
        this.err4 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public FailedQuery getErr5() {
      return this.err5;
    }

    public timedQuery_result setErr5(@org.apache.thrift.annotation.Nullable FailedQuery err5) {
      this.err5 = err5;
      return this;
    }

    public void unsetErr5() {
      this.err5 = null;
    }

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

    public void setErr5IsSet(boolean value) {
      if (!value) {
        this.err5 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((QueryReport)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((UnknownQueryLanguage)value);
        }
        break;

      case ERR4:
        if (value == null) {
          unsetErr4();
        } else {
          setErr4((InvalidQuery)value);
        }
        break;

      case ERR5:
        if (value == null) {
          unsetErr5();
        } else {
          setErr5((FailedQuery)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      case ERR4:
        return getErr4();

      case ERR5:
        return getErr5();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      case ERR4:
        return isSetErr4();
      case ERR5:
        return isSetErr5();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(timedQuery_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      boolean this_present_err4 = true && this.isSetErr4();
      boolean that_present_err4 = true && that.isSetErr4();
      if (this_present_err4 || that_present_err4) {
        if (!(this_present_err4 && that_present_err4))
          return false;
        if (!this.err4.equals(that.err4))
          return false;
      }

      boolean this_present_err5 = true && this.isSetErr5();
      boolean that_present_err5 = true && that.isSetErr5();
      if (this_present_err5 || that_present_err5) {
        if (!(this_present_err5 && that_present_err5))
          return false;
        if (!this.err5.equals(that.err5))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr4()) ? 131071 : 524287);
      if (isSetErr4())
        hashCode = hashCode * 8191 + err4.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr5()) ? 131071 : 524287);
      if (isSetErr5())
        hashCode = hashCode * 8191 + err5.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr4()).compareTo(other.isSetErr4());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr4()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err4, other.err4);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr5()).compareTo(other.isSetErr5());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr5()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err5, other.err5);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("timedQuery_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err4:");
      if (this.err4 == null) {
        sb.append("null");
      } else {
        sb.append(this.err4);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err5:");
      if (this.err5 == null) {
        sb.append("null");
      } else {
        sb.append(this.err5);
      }
      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, java.lang.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 timedQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public timedQuery_resultStandardScheme getScheme() {
        return new timedQuery_resultStandardScheme();
      }
    }

    private static class timedQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<timedQuery_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, timedQuery_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 QueryReport();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new UnknownQueryLanguage();
                struct.err3.read(iprot);
                struct.setErr3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // ERR4
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err4 = new InvalidQuery();
                struct.err4.read(iprot);
                struct.setErr4IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // ERR5
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err5 = new FailedQuery();
                struct.err5.read(iprot);
                struct.setErr5IsSet(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, timedQuery_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();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err4 != null) {
          oprot.writeFieldBegin(ERR4_FIELD_DESC);
          struct.err4.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err5 != null) {
          oprot.writeFieldBegin(ERR5_FIELD_DESC);
          struct.err5.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class timedQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public timedQuery_resultTupleScheme getScheme() {
        return new timedQuery_resultTupleScheme();
      }
    }

    private static class timedQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<timedQuery_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, timedQuery_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        if (struct.isSetErr3()) {
          optionals.set(3);
        }
        if (struct.isSetErr4()) {
          optionals.set(4);
        }
        if (struct.isSetErr5()) {
          optionals.set(5);
        }
        oprot.writeBitSet(optionals, 6);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
        if (struct.isSetErr4()) {
          struct.err4.write(oprot);
        }
        if (struct.isSetErr5()) {
          struct.err5.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, timedQuery_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(6);
        if (incoming.get(0)) {
          struct.success = new QueryReport();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.err3 = new UnknownQueryLanguage();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
        if (incoming.get(4)) {
          struct.err4 = new InvalidQuery();
          struct.err4.read(iprot);
          struct.setErr4IsSet(true);
        }
        if (incoming.get(5)) {
          struct.err5 = new FailedQuery();
          struct.err5.read(iprot);
          struct.setErr5IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("ids", org.apache.thrift.protocol.TType.LIST, (short)2);
    private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new resolveProxies_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new resolveProxies_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> ids; // required
    public @org.apache.thrift.annotation.Nullable HawkQueryOptions options; // 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 {
      NAME((short)1, "name"),
      IDS((short)2, "ids"),
      OPTIONS((short)3, "options");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // IDS
            return IDS;
          case 3: // OPTIONS
            return OPTIONS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.IDS, new org.apache.thrift.meta_data.FieldMetaData("ids", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkQueryOptions.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resolveProxies_args.class, metaDataMap);
    }

    public resolveProxies_args() {
    }

    public resolveProxies_args(
      java.lang.String name,
      java.util.List<java.lang.String> ids,
      HawkQueryOptions options)
    {
      this();
      this.name = name;
      this.ids = ids;
      this.options = options;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resolveProxies_args(resolveProxies_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetIds()) {
        java.util.List<java.lang.String> __this__ids = new java.util.ArrayList<java.lang.String>(other.ids);
        this.ids = __this__ids;
      }
      if (other.isSetOptions()) {
        this.options = new HawkQueryOptions(other.options);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.ids = null;
      this.options = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public resolveProxies_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getIdsIterator() {
      return (this.ids == null) ? null : this.ids.iterator();
    }

    public void addToIds(java.lang.String elem) {
      if (this.ids == null) {
        this.ids = new java.util.ArrayList<java.lang.String>();
      }
      this.ids.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getIds() {
      return this.ids;
    }

    public resolveProxies_args setIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> ids) {
      this.ids = ids;
      return this;
    }

    public void unsetIds() {
      this.ids = null;
    }

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

    public void setIdsIsSet(boolean value) {
      if (!value) {
        this.ids = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkQueryOptions getOptions() {
      return this.options;
    }

    public resolveProxies_args setOptions(@org.apache.thrift.annotation.Nullable HawkQueryOptions options) {
      this.options = options;
      return this;
    }

    public void unsetOptions() {
      this.options = null;
    }

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

    public void setOptionsIsSet(boolean value) {
      if (!value) {
        this.options = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case IDS:
        if (value == null) {
          unsetIds();
        } else {
          setIds((java.util.List<java.lang.String>)value);
        }
        break;

      case OPTIONS:
        if (value == null) {
          unsetOptions();
        } else {
          setOptions((HawkQueryOptions)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case IDS:
        return getIds();

      case OPTIONS:
        return getOptions();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case IDS:
        return isSetIds();
      case OPTIONS:
        return isSetOptions();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(resolveProxies_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_ids = true && this.isSetIds();
      boolean that_present_ids = true && that.isSetIds();
      if (this_present_ids || that_present_ids) {
        if (!(this_present_ids && that_present_ids))
          return false;
        if (!this.ids.equals(that.ids))
          return false;
      }

      boolean this_present_options = true && this.isSetOptions();
      boolean that_present_options = true && that.isSetOptions();
      if (this_present_options || that_present_options) {
        if (!(this_present_options && that_present_options))
          return false;
        if (!this.options.equals(that.options))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetIds()) ? 131071 : 524287);
      if (isSetIds())
        hashCode = hashCode * 8191 + ids.hashCode();

      hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
      if (isSetOptions())
        hashCode = hashCode * 8191 + options.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetIds()).compareTo(other.isSetIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ids, other.ids);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOptions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("resolveProxies_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("ids:");
      if (this.ids == null) {
        sb.append("null");
      } else {
        sb.append(this.ids);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (ids == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'ids' was not present! Struct: " + toString());
      }
      if (options == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'options' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (options != null) {
        options.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, java.lang.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 resolveProxies_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public resolveProxies_argsStandardScheme getScheme() {
        return new resolveProxies_argsStandardScheme();
      }
    }

    private static class resolveProxies_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<resolveProxies_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, resolveProxies_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // IDS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list322 = iprot.readListBegin();
                  struct.ids = new java.util.ArrayList<java.lang.String>(_list322.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem323;
                  for (int _i324 = 0; _i324 < _list322.size; ++_i324)
                  {
                    _elem323 = iprot.readString();
                    struct.ids.add(_elem323);
                  }
                  iprot.readListEnd();
                }
                struct.setIdsIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // OPTIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.options = new HawkQueryOptions();
                struct.options.read(iprot);
                struct.setOptionsIsSet(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, resolveProxies_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.ids != null) {
          oprot.writeFieldBegin(IDS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.ids.size()));
            for (java.lang.String _iter325 : struct.ids)
            {
              oprot.writeString(_iter325);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.options != null) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          struct.options.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class resolveProxies_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public resolveProxies_argsTupleScheme getScheme() {
        return new resolveProxies_argsTupleScheme();
      }
    }

    private static class resolveProxies_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<resolveProxies_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, resolveProxies_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        {
          oprot.writeI32(struct.ids.size());
          for (java.lang.String _iter326 : struct.ids)
          {
            oprot.writeString(_iter326);
          }
        }
        struct.options.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, resolveProxies_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        {
          org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.ids = new java.util.ArrayList<java.lang.String>(_list327.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem328;
          for (int _i329 = 0; _i329 < _list327.size; ++_i329)
          {
            _elem328 = iprot.readString();
            struct.ids.add(_elem328);
          }
        }
        struct.setIdsIsSet(true);
        struct.options = new HawkQueryOptions();
        struct.options.read(iprot);
        struct.setOptionsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new resolveProxies_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new resolveProxies_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<ModelElement> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ModelElement.class))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resolveProxies_result.class, metaDataMap);
    }

    public resolveProxies_result() {
    }

    public resolveProxies_result(
      java.util.List<ModelElement> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resolveProxies_result(resolveProxies_result other) {
      if (other.isSetSuccess()) {
        java.util.List<ModelElement> __this__success = new java.util.ArrayList<ModelElement>(other.success.size());
        for (ModelElement other_element : other.success) {
          __this__success.add(new ModelElement(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<ModelElement> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ModelElement elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<ModelElement>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<ModelElement> getSuccess() {
      return this.success;
    }

    public resolveProxies_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ModelElement> 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public resolveProxies_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public resolveProxies_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<ModelElement>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(resolveProxies_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("resolveProxies_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 resolveProxies_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public resolveProxies_resultStandardScheme getScheme() {
        return new resolveProxies_resultStandardScheme();
      }
    }

    private static class resolveProxies_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<resolveProxies_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, resolveProxies_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<ModelElement>(_list330.size);
                  @org.apache.thrift.annotation.Nullable ModelElement _elem331;
                  for (int _i332 = 0; _i332 < _list330.size; ++_i332)
                  {
                    _elem331 = new ModelElement();
                    _elem331.read(iprot);
                    struct.success.add(_elem331);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, resolveProxies_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (ModelElement _iter333 : struct.success)
            {
              _iter333.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class resolveProxies_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public resolveProxies_resultTupleScheme getScheme() {
        return new resolveProxies_resultTupleScheme();
      }
    }

    private static class resolveProxies_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<resolveProxies_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, resolveProxies_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ModelElement _iter334 : struct.success)
            {
              _iter334.write(oprot);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, resolveProxies_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<ModelElement>(_list335.size);
            @org.apache.thrift.annotation.Nullable ModelElement _elem336;
            for (int _i337 = 0; _i337 < _list335.size; ++_i337)
            {
              _elem336 = new ModelElement();
              _elem336.read(iprot);
              struct.success.add(_elem336);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField LANGUAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("language", org.apache.thrift.protocol.TType.STRING, (short)3);
    private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new asyncQuery_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new asyncQuery_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String query; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String language; // required
    public @org.apache.thrift.annotation.Nullable HawkQueryOptions options; // 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 {
      NAME((short)1, "name"),
      QUERY((short)2, "query"),
      LANGUAGE((short)3, "language"),
      OPTIONS((short)4, "options");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // QUERY
            return QUERY;
          case 3: // LANGUAGE
            return LANGUAGE;
          case 4: // OPTIONS
            return OPTIONS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.LANGUAGE, new org.apache.thrift.meta_data.FieldMetaData("language", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkQueryOptions.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncQuery_args.class, metaDataMap);
    }

    public asyncQuery_args() {
    }

    public asyncQuery_args(
      java.lang.String name,
      java.lang.String query,
      java.lang.String language,
      HawkQueryOptions options)
    {
      this();
      this.name = name;
      this.query = query;
      this.language = language;
      this.options = options;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public asyncQuery_args(asyncQuery_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetQuery()) {
        this.query = other.query;
      }
      if (other.isSetLanguage()) {
        this.language = other.language;
      }
      if (other.isSetOptions()) {
        this.options = new HawkQueryOptions(other.options);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.query = null;
      this.language = null;
      this.options = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public asyncQuery_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getQuery() {
      return this.query;
    }

    public asyncQuery_args setQuery(@org.apache.thrift.annotation.Nullable java.lang.String query) {
      this.query = query;
      return this;
    }

    public void unsetQuery() {
      this.query = null;
    }

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

    public void setQueryIsSet(boolean value) {
      if (!value) {
        this.query = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getLanguage() {
      return this.language;
    }

    public asyncQuery_args setLanguage(@org.apache.thrift.annotation.Nullable java.lang.String language) {
      this.language = language;
      return this;
    }

    public void unsetLanguage() {
      this.language = null;
    }

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

    public void setLanguageIsSet(boolean value) {
      if (!value) {
        this.language = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkQueryOptions getOptions() {
      return this.options;
    }

    public asyncQuery_args setOptions(@org.apache.thrift.annotation.Nullable HawkQueryOptions options) {
      this.options = options;
      return this;
    }

    public void unsetOptions() {
      this.options = null;
    }

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

    public void setOptionsIsSet(boolean value) {
      if (!value) {
        this.options = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case QUERY:
        if (value == null) {
          unsetQuery();
        } else {
          setQuery((java.lang.String)value);
        }
        break;

      case LANGUAGE:
        if (value == null) {
          unsetLanguage();
        } else {
          setLanguage((java.lang.String)value);
        }
        break;

      case OPTIONS:
        if (value == null) {
          unsetOptions();
        } else {
          setOptions((HawkQueryOptions)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case QUERY:
        return getQuery();

      case LANGUAGE:
        return getLanguage();

      case OPTIONS:
        return getOptions();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case QUERY:
        return isSetQuery();
      case LANGUAGE:
        return isSetLanguage();
      case OPTIONS:
        return isSetOptions();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(asyncQuery_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_query = true && this.isSetQuery();
      boolean that_present_query = true && that.isSetQuery();
      if (this_present_query || that_present_query) {
        if (!(this_present_query && that_present_query))
          return false;
        if (!this.query.equals(that.query))
          return false;
      }

      boolean this_present_language = true && this.isSetLanguage();
      boolean that_present_language = true && that.isSetLanguage();
      if (this_present_language || that_present_language) {
        if (!(this_present_language && that_present_language))
          return false;
        if (!this.language.equals(that.language))
          return false;
      }

      boolean this_present_options = true && this.isSetOptions();
      boolean that_present_options = true && that.isSetOptions();
      if (this_present_options || that_present_options) {
        if (!(this_present_options && that_present_options))
          return false;
        if (!this.options.equals(that.options))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetQuery()) ? 131071 : 524287);
      if (isSetQuery())
        hashCode = hashCode * 8191 + query.hashCode();

      hashCode = hashCode * 8191 + ((isSetLanguage()) ? 131071 : 524287);
      if (isSetLanguage())
        hashCode = hashCode * 8191 + language.hashCode();

      hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
      if (isSetOptions())
        hashCode = hashCode * 8191 + options.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetQuery()).compareTo(other.isSetQuery());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuery()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.query, other.query);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetLanguage()).compareTo(other.isSetLanguage());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLanguage()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.language, other.language);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOptions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("asyncQuery_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("query:");
      if (this.query == null) {
        sb.append("null");
      } else {
        sb.append(this.query);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("language:");
      if (this.language == null) {
        sb.append("null");
      } else {
        sb.append(this.language);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (query == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'query' was not present! Struct: " + toString());
      }
      if (language == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'language' was not present! Struct: " + toString());
      }
      if (options == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'options' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (options != null) {
        options.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, java.lang.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 asyncQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public asyncQuery_argsStandardScheme getScheme() {
        return new asyncQuery_argsStandardScheme();
      }
    }

    private static class asyncQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<asyncQuery_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, asyncQuery_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // QUERY
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.query = iprot.readString();
                struct.setQueryIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // LANGUAGE
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.language = iprot.readString();
                struct.setLanguageIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // OPTIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.options = new HawkQueryOptions();
                struct.options.read(iprot);
                struct.setOptionsIsSet(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, asyncQuery_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.query != null) {
          oprot.writeFieldBegin(QUERY_FIELD_DESC);
          oprot.writeString(struct.query);
          oprot.writeFieldEnd();
        }
        if (struct.language != null) {
          oprot.writeFieldBegin(LANGUAGE_FIELD_DESC);
          oprot.writeString(struct.language);
          oprot.writeFieldEnd();
        }
        if (struct.options != null) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          struct.options.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class asyncQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public asyncQuery_argsTupleScheme getScheme() {
        return new asyncQuery_argsTupleScheme();
      }
    }

    private static class asyncQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<asyncQuery_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, asyncQuery_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.query);
        oprot.writeString(struct.language);
        struct.options.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, asyncQuery_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.query = iprot.readString();
        struct.setQueryIsSet(true);
        struct.language = iprot.readString();
        struct.setLanguageIsSet(true);
        struct.options = new HawkQueryOptions();
        struct.options.read(iprot);
        struct.setOptionsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField ERR4_FIELD_DESC = new org.apache.thrift.protocol.TField("err4", org.apache.thrift.protocol.TType.STRUCT, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new asyncQuery_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new asyncQuery_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable UnknownQueryLanguage err3; // required
    public @org.apache.thrift.annotation.Nullable InvalidQuery err4; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3"),
      ERR4((short)4, "err4");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          case 4: // ERR4
            return ERR4;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.STRING)));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnknownQueryLanguage.class)));
      tmpMap.put(_Fields.ERR4, new org.apache.thrift.meta_data.FieldMetaData("err4", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidQuery.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(asyncQuery_result.class, metaDataMap);
    }

    public asyncQuery_result() {
    }

    public asyncQuery_result(
      java.lang.String success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      UnknownQueryLanguage err3,
      InvalidQuery err4)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
      this.err4 = err4;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public asyncQuery_result(asyncQuery_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new UnknownQueryLanguage(other.err3);
      }
      if (other.isSetErr4()) {
        this.err4 = new InvalidQuery(other.err4);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
      this.err4 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getSuccess() {
      return this.success;
    }

    public asyncQuery_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public asyncQuery_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public asyncQuery_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public UnknownQueryLanguage getErr3() {
      return this.err3;
    }

    public asyncQuery_result setErr3(@org.apache.thrift.annotation.Nullable UnknownQueryLanguage err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidQuery getErr4() {
      return this.err4;
    }

    public asyncQuery_result setErr4(@org.apache.thrift.annotation.Nullable InvalidQuery err4) {
      this.err4 = err4;
      return this;
    }

    public void unsetErr4() {
      this.err4 = null;
    }

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

    public void setErr4IsSet(boolean value) {
      if (!value) {
        this.err4 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.String)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((UnknownQueryLanguage)value);
        }
        break;

      case ERR4:
        if (value == null) {
          unsetErr4();
        } else {
          setErr4((InvalidQuery)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      case ERR4:
        return getErr4();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      case ERR4:
        return isSetErr4();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(asyncQuery_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      boolean this_present_err4 = true && this.isSetErr4();
      boolean that_present_err4 = true && that.isSetErr4();
      if (this_present_err4 || that_present_err4) {
        if (!(this_present_err4 && that_present_err4))
          return false;
        if (!this.err4.equals(that.err4))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr4()) ? 131071 : 524287);
      if (isSetErr4())
        hashCode = hashCode * 8191 + err4.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr4()).compareTo(other.isSetErr4());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr4()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err4, other.err4);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("asyncQuery_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err4:");
      if (this.err4 == null) {
        sb.append("null");
      } else {
        sb.append(this.err4);
      }
      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, java.lang.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 asyncQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public asyncQuery_resultStandardScheme getScheme() {
        return new asyncQuery_resultStandardScheme();
      }
    }

    private static class asyncQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<asyncQuery_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, asyncQuery_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.STRING) {
                struct.success = iprot.readString();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new UnknownQueryLanguage();
                struct.err3.read(iprot);
                struct.setErr3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // ERR4
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err4 = new InvalidQuery();
                struct.err4.read(iprot);
                struct.setErr4IsSet(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, asyncQuery_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeString(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err4 != null) {
          oprot.writeFieldBegin(ERR4_FIELD_DESC);
          struct.err4.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class asyncQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public asyncQuery_resultTupleScheme getScheme() {
        return new asyncQuery_resultTupleScheme();
      }
    }

    private static class asyncQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<asyncQuery_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, asyncQuery_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        if (struct.isSetErr3()) {
          optionals.set(3);
        }
        if (struct.isSetErr4()) {
          optionals.set(4);
        }
        oprot.writeBitSet(optionals, 5);
        if (struct.isSetSuccess()) {
          oprot.writeString(struct.success);
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
        if (struct.isSetErr4()) {
          struct.err4.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, asyncQuery_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(5);
        if (incoming.get(0)) {
          struct.success = iprot.readString();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(3)) {
          struct.err3 = new UnknownQueryLanguage();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
        if (incoming.get(4)) {
          struct.err4 = new InvalidQuery();
          struct.err4.read(iprot);
          struct.setErr4IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryID", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelAsyncQuery_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelAsyncQuery_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String queryID; // 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 {
      QUERY_ID((short)1, "queryID");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // QUERY_ID
            return QUERY_ID;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelAsyncQuery_args.class, metaDataMap);
    }

    public cancelAsyncQuery_args() {
    }

    public cancelAsyncQuery_args(
      java.lang.String queryID)
    {
      this();
      this.queryID = queryID;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelAsyncQuery_args(cancelAsyncQuery_args other) {
      if (other.isSetQueryID()) {
        this.queryID = other.queryID;
      }
    }

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

    @Override
    public void clear() {
      this.queryID = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getQueryID() {
      return this.queryID;
    }

    public cancelAsyncQuery_args setQueryID(@org.apache.thrift.annotation.Nullable java.lang.String queryID) {
      this.queryID = queryID;
      return this;
    }

    public void unsetQueryID() {
      this.queryID = null;
    }

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

    public void setQueryIDIsSet(boolean value) {
      if (!value) {
        this.queryID = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case QUERY_ID:
        if (value == null) {
          unsetQueryID();
        } else {
          setQueryID((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case QUERY_ID:
        return getQueryID();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case QUERY_ID:
        return isSetQueryID();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(cancelAsyncQuery_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_queryID = true && this.isSetQueryID();
      boolean that_present_queryID = true && that.isSetQueryID();
      if (this_present_queryID || that_present_queryID) {
        if (!(this_present_queryID && that_present_queryID))
          return false;
        if (!this.queryID.equals(that.queryID))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetQueryID()) ? 131071 : 524287);
      if (isSetQueryID())
        hashCode = hashCode * 8191 + queryID.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetQueryID()).compareTo(other.isSetQueryID());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueryID()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryID, other.queryID);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelAsyncQuery_args(");
      boolean first = true;

      sb.append("queryID:");
      if (this.queryID == null) {
        sb.append("null");
      } else {
        sb.append(this.queryID);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (queryID == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryID' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 cancelAsyncQuery_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public cancelAsyncQuery_argsStandardScheme getScheme() {
        return new cancelAsyncQuery_argsStandardScheme();
      }
    }

    private static class cancelAsyncQuery_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<cancelAsyncQuery_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelAsyncQuery_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: // QUERY_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.queryID = iprot.readString();
                struct.setQueryIDIsSet(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, cancelAsyncQuery_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.queryID != null) {
          oprot.writeFieldBegin(QUERY_ID_FIELD_DESC);
          oprot.writeString(struct.queryID);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelAsyncQuery_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public cancelAsyncQuery_argsTupleScheme getScheme() {
        return new cancelAsyncQuery_argsTupleScheme();
      }
    }

    private static class cancelAsyncQuery_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<cancelAsyncQuery_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, cancelAsyncQuery_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.queryID);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, cancelAsyncQuery_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.queryID = iprot.readString();
        struct.setQueryIDIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelAsyncQuery_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelAsyncQuery_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable InvalidQuery err1; // 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 {
      ERR1((short)1, "err1");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidQuery.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelAsyncQuery_result.class, metaDataMap);
    }

    public cancelAsyncQuery_result() {
    }

    public cancelAsyncQuery_result(
      InvalidQuery err1)
    {
      this();
      this.err1 = err1;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public cancelAsyncQuery_result(cancelAsyncQuery_result other) {
      if (other.isSetErr1()) {
        this.err1 = new InvalidQuery(other.err1);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidQuery getErr1() {
      return this.err1;
    }

    public cancelAsyncQuery_result setErr1(@org.apache.thrift.annotation.Nullable InvalidQuery err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((InvalidQuery)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(cancelAsyncQuery_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelAsyncQuery_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      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, java.lang.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 cancelAsyncQuery_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public cancelAsyncQuery_resultStandardScheme getScheme() {
        return new cancelAsyncQuery_resultStandardScheme();
      }
    }

    private static class cancelAsyncQuery_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<cancelAsyncQuery_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, cancelAsyncQuery_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new InvalidQuery();
                struct.err1.read(iprot);
                struct.setErr1IsSet(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, cancelAsyncQuery_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class cancelAsyncQuery_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public cancelAsyncQuery_resultTupleScheme getScheme() {
        return new cancelAsyncQuery_resultTupleScheme();
      }
    }

    private static class cancelAsyncQuery_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<cancelAsyncQuery_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, cancelAsyncQuery_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, cancelAsyncQuery_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.err1 = new InvalidQuery();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField QUERY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("queryID", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchAsyncQueryResults_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchAsyncQueryResults_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String queryID; // 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 {
      QUERY_ID((short)1, "queryID");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // QUERY_ID
            return QUERY_ID;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.QUERY_ID, new org.apache.thrift.meta_data.FieldMetaData("queryID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchAsyncQueryResults_args.class, metaDataMap);
    }

    public fetchAsyncQueryResults_args() {
    }

    public fetchAsyncQueryResults_args(
      java.lang.String queryID)
    {
      this();
      this.queryID = queryID;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public fetchAsyncQueryResults_args(fetchAsyncQueryResults_args other) {
      if (other.isSetQueryID()) {
        this.queryID = other.queryID;
      }
    }

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

    @Override
    public void clear() {
      this.queryID = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getQueryID() {
      return this.queryID;
    }

    public fetchAsyncQueryResults_args setQueryID(@org.apache.thrift.annotation.Nullable java.lang.String queryID) {
      this.queryID = queryID;
      return this;
    }

    public void unsetQueryID() {
      this.queryID = null;
    }

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

    public void setQueryIDIsSet(boolean value) {
      if (!value) {
        this.queryID = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case QUERY_ID:
        if (value == null) {
          unsetQueryID();
        } else {
          setQueryID((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case QUERY_ID:
        return getQueryID();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case QUERY_ID:
        return isSetQueryID();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(fetchAsyncQueryResults_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_queryID = true && this.isSetQueryID();
      boolean that_present_queryID = true && that.isSetQueryID();
      if (this_present_queryID || that_present_queryID) {
        if (!(this_present_queryID && that_present_queryID))
          return false;
        if (!this.queryID.equals(that.queryID))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetQueryID()) ? 131071 : 524287);
      if (isSetQueryID())
        hashCode = hashCode * 8191 + queryID.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetQueryID()).compareTo(other.isSetQueryID());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQueryID()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryID, other.queryID);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchAsyncQueryResults_args(");
      boolean first = true;

      sb.append("queryID:");
      if (this.queryID == null) {
        sb.append("null");
      } else {
        sb.append(this.queryID);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (queryID == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'queryID' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 fetchAsyncQueryResults_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public fetchAsyncQueryResults_argsStandardScheme getScheme() {
        return new fetchAsyncQueryResults_argsStandardScheme();
      }
    }

    private static class fetchAsyncQueryResults_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<fetchAsyncQueryResults_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAsyncQueryResults_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: // QUERY_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.queryID = iprot.readString();
                struct.setQueryIDIsSet(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, fetchAsyncQueryResults_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.queryID != null) {
          oprot.writeFieldBegin(QUERY_ID_FIELD_DESC);
          oprot.writeString(struct.queryID);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class fetchAsyncQueryResults_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public fetchAsyncQueryResults_argsTupleScheme getScheme() {
        return new fetchAsyncQueryResults_argsTupleScheme();
      }
    }

    private static class fetchAsyncQueryResults_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<fetchAsyncQueryResults_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, fetchAsyncQueryResults_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.queryID);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, fetchAsyncQueryResults_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.queryID = iprot.readString();
        struct.setQueryIDIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  public static class fetchAsyncQueryResults_result implements org.apache.thrift.TBase<fetchAsyncQueryResults_result, fetchAsyncQueryResults_result._Fields>, java.io.Serializable, Cloneable, Comparable<fetchAsyncQueryResults_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchAsyncQueryResults_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 org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new fetchAsyncQueryResults_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new fetchAsyncQueryResults_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable QueryReport success; // required
    public @org.apache.thrift.annotation.Nullable InvalidQuery err1; // required
    public @org.apache.thrift.annotation.Nullable FailedQuery err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, QueryReport.class)));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidQuery.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FailedQuery.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchAsyncQueryResults_result.class, metaDataMap);
    }

    public fetchAsyncQueryResults_result() {
    }

    public fetchAsyncQueryResults_result(
      QueryReport success,
      InvalidQuery err1,
      FailedQuery err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public fetchAsyncQueryResults_result(fetchAsyncQueryResults_result other) {
      if (other.isSetSuccess()) {
        this.success = new QueryReport(other.success);
      }
      if (other.isSetErr1()) {
        this.err1 = new InvalidQuery(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new FailedQuery(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public QueryReport getSuccess() {
      return this.success;
    }

    public fetchAsyncQueryResults_result setSuccess(@org.apache.thrift.annotation.Nullable QueryReport 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidQuery getErr1() {
      return this.err1;
    }

    public fetchAsyncQueryResults_result setErr1(@org.apache.thrift.annotation.Nullable InvalidQuery err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public FailedQuery getErr2() {
      return this.err2;
    }

    public fetchAsyncQueryResults_result setErr2(@org.apache.thrift.annotation.Nullable FailedQuery err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((QueryReport)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((InvalidQuery)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((FailedQuery)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(fetchAsyncQueryResults_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("fetchAsyncQueryResults_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 fetchAsyncQueryResults_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public fetchAsyncQueryResults_resultStandardScheme getScheme() {
        return new fetchAsyncQueryResults_resultStandardScheme();
      }
    }

    private static class fetchAsyncQueryResults_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<fetchAsyncQueryResults_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, fetchAsyncQueryResults_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 QueryReport();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new InvalidQuery();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new FailedQuery();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, fetchAsyncQueryResults_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();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class fetchAsyncQueryResults_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public fetchAsyncQueryResults_resultTupleScheme getScheme() {
        return new fetchAsyncQueryResults_resultTupleScheme();
      }
    }

    private static class fetchAsyncQueryResults_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<fetchAsyncQueryResults_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, fetchAsyncQueryResults_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, fetchAsyncQueryResults_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new QueryReport();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new InvalidQuery();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new FailedQuery();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField REPO_FIELD_DESC = new org.apache.thrift.protocol.TField("repo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField CREDENTIALS_FIELD_DESC = new org.apache.thrift.protocol.TField("credentials", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addRepository_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addRepository_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable Repository repo; // required
    public @org.apache.thrift.annotation.Nullable Credentials credentials; // 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 {
      NAME((short)1, "name"),
      REPO((short)2, "repo"),
      CREDENTIALS((short)3, "credentials");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // REPO
            return REPO;
          case 3: // CREDENTIALS
            return CREDENTIALS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.REPO, new org.apache.thrift.meta_data.FieldMetaData("repo", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Repository.class)));
      tmpMap.put(_Fields.CREDENTIALS, new org.apache.thrift.meta_data.FieldMetaData("credentials", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Credentials.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addRepository_args.class, metaDataMap);
    }

    public addRepository_args() {
    }

    public addRepository_args(
      java.lang.String name,
      Repository repo,
      Credentials credentials)
    {
      this();
      this.name = name;
      this.repo = repo;
      this.credentials = credentials;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addRepository_args(addRepository_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetRepo()) {
        this.repo = new Repository(other.repo);
      }
      if (other.isSetCredentials()) {
        this.credentials = new Credentials(other.credentials);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.repo = null;
      this.credentials = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public addRepository_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public Repository getRepo() {
      return this.repo;
    }

    public addRepository_args setRepo(@org.apache.thrift.annotation.Nullable Repository repo) {
      this.repo = repo;
      return this;
    }

    public void unsetRepo() {
      this.repo = null;
    }

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

    public void setRepoIsSet(boolean value) {
      if (!value) {
        this.repo = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public Credentials getCredentials() {
      return this.credentials;
    }

    public addRepository_args setCredentials(@org.apache.thrift.annotation.Nullable Credentials credentials) {
      this.credentials = credentials;
      return this;
    }

    public void unsetCredentials() {
      this.credentials = null;
    }

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

    public void setCredentialsIsSet(boolean value) {
      if (!value) {
        this.credentials = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case REPO:
        if (value == null) {
          unsetRepo();
        } else {
          setRepo((Repository)value);
        }
        break;

      case CREDENTIALS:
        if (value == null) {
          unsetCredentials();
        } else {
          setCredentials((Credentials)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case REPO:
        return getRepo();

      case CREDENTIALS:
        return getCredentials();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case REPO:
        return isSetRepo();
      case CREDENTIALS:
        return isSetCredentials();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(addRepository_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_repo = true && this.isSetRepo();
      boolean that_present_repo = true && that.isSetRepo();
      if (this_present_repo || that_present_repo) {
        if (!(this_present_repo && that_present_repo))
          return false;
        if (!this.repo.equals(that.repo))
          return false;
      }

      boolean this_present_credentials = true && this.isSetCredentials();
      boolean that_present_credentials = true && that.isSetCredentials();
      if (this_present_credentials || that_present_credentials) {
        if (!(this_present_credentials && that_present_credentials))
          return false;
        if (!this.credentials.equals(that.credentials))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetRepo()) ? 131071 : 524287);
      if (isSetRepo())
        hashCode = hashCode * 8191 + repo.hashCode();

      hashCode = hashCode * 8191 + ((isSetCredentials()) ? 131071 : 524287);
      if (isSetCredentials())
        hashCode = hashCode * 8191 + credentials.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetRepo()).compareTo(other.isSetRepo());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRepo()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.repo, other.repo);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetCredentials()).compareTo(other.isSetCredentials());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCredentials()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.credentials, other.credentials);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("addRepository_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("repo:");
      if (this.repo == null) {
        sb.append("null");
      } else {
        sb.append(this.repo);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("credentials:");
      if (this.credentials == null) {
        sb.append("null");
      } else {
        sb.append(this.credentials);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (repo == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'repo' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (repo != null) {
        repo.validate();
      }
      if (credentials != null) {
        credentials.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, java.lang.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 addRepository_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addRepository_argsStandardScheme getScheme() {
        return new addRepository_argsStandardScheme();
      }
    }

    private static class addRepository_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<addRepository_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addRepository_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REPO
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.repo = new Repository();
                struct.repo.read(iprot);
                struct.setRepoIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // CREDENTIALS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.credentials = new Credentials();
                struct.credentials.read(iprot);
                struct.setCredentialsIsSet(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, addRepository_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.repo != null) {
          oprot.writeFieldBegin(REPO_FIELD_DESC);
          struct.repo.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.credentials != null) {
          oprot.writeFieldBegin(CREDENTIALS_FIELD_DESC);
          struct.credentials.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addRepository_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addRepository_argsTupleScheme getScheme() {
        return new addRepository_argsTupleScheme();
      }
    }

    private static class addRepository_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addRepository_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addRepository_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        struct.repo.write(oprot);
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetCredentials()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetCredentials()) {
          struct.credentials.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addRepository_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.repo = new Repository();
        struct.repo.read(iprot);
        struct.setRepoIsSet(true);
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          struct.credentials = new Credentials();
          struct.credentials.read(iprot);
          struct.setCredentialsIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
    private static final org.apache.thrift.protocol.TField ERR4_FIELD_DESC = new org.apache.thrift.protocol.TField("err4", org.apache.thrift.protocol.TType.STRUCT, (short)4);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addRepository_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addRepository_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable UnknownRepositoryType err3; // required
    public @org.apache.thrift.annotation.Nullable VCSAuthenticationFailed err4; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3"),
      ERR4((short)4, "err4");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          case 4: // ERR4
            return ERR4;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UnknownRepositoryType.class)));
      tmpMap.put(_Fields.ERR4, new org.apache.thrift.meta_data.FieldMetaData("err4", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VCSAuthenticationFailed.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addRepository_result.class, metaDataMap);
    }

    public addRepository_result() {
    }

    public addRepository_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      UnknownRepositoryType err3,
      VCSAuthenticationFailed err4)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
      this.err4 = err4;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addRepository_result(addRepository_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new UnknownRepositoryType(other.err3);
      }
      if (other.isSetErr4()) {
        this.err4 = new VCSAuthenticationFailed(other.err4);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
      this.err4 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public addRepository_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public addRepository_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public UnknownRepositoryType getErr3() {
      return this.err3;
    }

    public addRepository_result setErr3(@org.apache.thrift.annotation.Nullable UnknownRepositoryType err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public VCSAuthenticationFailed getErr4() {
      return this.err4;
    }

    public addRepository_result setErr4(@org.apache.thrift.annotation.Nullable VCSAuthenticationFailed err4) {
      this.err4 = err4;
      return this;
    }

    public void unsetErr4() {
      this.err4 = null;
    }

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

    public void setErr4IsSet(boolean value) {
      if (!value) {
        this.err4 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((UnknownRepositoryType)value);
        }
        break;

      case ERR4:
        if (value == null) {
          unsetErr4();
        } else {
          setErr4((VCSAuthenticationFailed)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      case ERR4:
        return getErr4();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      case ERR4:
        return isSetErr4();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(addRepository_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      boolean this_present_err4 = true && this.isSetErr4();
      boolean that_present_err4 = true && that.isSetErr4();
      if (this_present_err4 || that_present_err4) {
        if (!(this_present_err4 && that_present_err4))
          return false;
        if (!this.err4.equals(that.err4))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr4()) ? 131071 : 524287);
      if (isSetErr4())
        hashCode = hashCode * 8191 + err4.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr4()).compareTo(other.isSetErr4());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr4()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err4, other.err4);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("addRepository_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err4:");
      if (this.err4 == null) {
        sb.append("null");
      } else {
        sb.append(this.err4);
      }
      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, java.lang.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 addRepository_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addRepository_resultStandardScheme getScheme() {
        return new addRepository_resultStandardScheme();
      }
    }

    private static class addRepository_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<addRepository_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addRepository_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new UnknownRepositoryType();
                struct.err3.read(iprot);
                struct.setErr3IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // ERR4
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err4 = new VCSAuthenticationFailed();
                struct.err4.read(iprot);
                struct.setErr4IsSet(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, addRepository_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err4 != null) {
          oprot.writeFieldBegin(ERR4_FIELD_DESC);
          struct.err4.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addRepository_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addRepository_resultTupleScheme getScheme() {
        return new addRepository_resultTupleScheme();
      }
    }

    private static class addRepository_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addRepository_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addRepository_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        if (struct.isSetErr3()) {
          optionals.set(2);
        }
        if (struct.isSetErr4()) {
          optionals.set(3);
        }
        oprot.writeBitSet(optionals, 4);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
        if (struct.isSetErr4()) {
          struct.err4.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addRepository_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(4);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err3 = new UnknownRepositoryType();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
        if (incoming.get(3)) {
          struct.err4 = new VCSAuthenticationFailed();
          struct.err4.read(iprot);
          struct.setErr4IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isFrozen_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isFrozen_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String uri; // 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 {
      NAME((short)1, "name"),
      URI((short)2, "uri");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // URI
            return URI;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isFrozen_args.class, metaDataMap);
    }

    public isFrozen_args() {
    }

    public isFrozen_args(
      java.lang.String name,
      java.lang.String uri)
    {
      this();
      this.name = name;
      this.uri = uri;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isFrozen_args(isFrozen_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetUri()) {
        this.uri = other.uri;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.uri = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public isFrozen_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getUri() {
      return this.uri;
    }

    public isFrozen_args setUri(@org.apache.thrift.annotation.Nullable java.lang.String uri) {
      this.uri = uri;
      return this;
    }

    public void unsetUri() {
      this.uri = null;
    }

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

    public void setUriIsSet(boolean value) {
      if (!value) {
        this.uri = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case URI:
        if (value == null) {
          unsetUri();
        } else {
          setUri((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case URI:
        return getUri();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case URI:
        return isSetUri();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(isFrozen_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_uri = true && this.isSetUri();
      boolean that_present_uri = true && that.isSetUri();
      if (this_present_uri || that_present_uri) {
        if (!(this_present_uri && that_present_uri))
          return false;
        if (!this.uri.equals(that.uri))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetUri()) ? 131071 : 524287);
      if (isSetUri())
        hashCode = hashCode * 8191 + uri.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetUri()).compareTo(other.isSetUri());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUri()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uri, other.uri);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("isFrozen_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("uri:");
      if (this.uri == null) {
        sb.append("null");
      } else {
        sb.append(this.uri);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (uri == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'uri' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 isFrozen_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public isFrozen_argsStandardScheme getScheme() {
        return new isFrozen_argsStandardScheme();
      }
    }

    private static class isFrozen_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<isFrozen_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isFrozen_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // URI
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uri = iprot.readString();
                struct.setUriIsSet(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, isFrozen_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.uri != null) {
          oprot.writeFieldBegin(URI_FIELD_DESC);
          oprot.writeString(struct.uri);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class isFrozen_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public isFrozen_argsTupleScheme getScheme() {
        return new isFrozen_argsTupleScheme();
      }
    }

    private static class isFrozen_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<isFrozen_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, isFrozen_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.uri);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, isFrozen_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.uri = iprot.readString();
        struct.setUriIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isFrozen_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isFrozen_resultTupleSchemeFactory();

    public boolean success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.BOOL)));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isFrozen_result.class, metaDataMap);
    }

    public isFrozen_result() {
    }

    public isFrozen_result(
      boolean success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isFrozen_result(isFrozen_result other) {
      __isset_bitfield = other.__isset_bitfield;
      this.success = other.success;
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.err1 = null;
      this.err2 = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public isFrozen_result setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
      return this;
    }

    public void unsetSuccess() {
      __isset_bitfield = org.apache.thrift.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 org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public isFrozen_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public isFrozen_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.lang.Boolean)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(isFrozen_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("isFrozen_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 isFrozen_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public isFrozen_resultStandardScheme getScheme() {
        return new isFrozen_resultStandardScheme();
      }
    }

    private static class isFrozen_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<isFrozen_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, isFrozen_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.BOOL) {
                struct.success = iprot.readBool();
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, isFrozen_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.isSetSuccess()) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          oprot.writeBool(struct.success);
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class isFrozen_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public isFrozen_resultTupleScheme getScheme() {
        return new isFrozen_resultTupleScheme();
      }
    }

    private static class isFrozen_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<isFrozen_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, isFrozen_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          oprot.writeBool(struct.success);
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, isFrozen_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = iprot.readBool();
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField IS_FROZEN_FIELD_DESC = new org.apache.thrift.protocol.TField("isFrozen", org.apache.thrift.protocol.TType.BOOL, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setFrozen_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setFrozen_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String uri; // required
    public boolean isFrozen; // 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 {
      NAME((short)1, "name"),
      URI((short)2, "uri"),
      IS_FROZEN((short)3, "isFrozen");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // URI
            return URI;
          case 3: // IS_FROZEN
            return IS_FROZEN;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ISFROZEN_ISSET_ID = 0;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.IS_FROZEN, new org.apache.thrift.meta_data.FieldMetaData("isFrozen", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setFrozen_args.class, metaDataMap);
    }

    public setFrozen_args() {
    }

    public setFrozen_args(
      java.lang.String name,
      java.lang.String uri,
      boolean isFrozen)
    {
      this();
      this.name = name;
      this.uri = uri;
      this.isFrozen = isFrozen;
      setIsFrozenIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setFrozen_args(setFrozen_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetUri()) {
        this.uri = other.uri;
      }
      this.isFrozen = other.isFrozen;
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.uri = null;
      setIsFrozenIsSet(false);
      this.isFrozen = false;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public setFrozen_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getUri() {
      return this.uri;
    }

    public setFrozen_args setUri(@org.apache.thrift.annotation.Nullable java.lang.String uri) {
      this.uri = uri;
      return this;
    }

    public void unsetUri() {
      this.uri = null;
    }

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

    public void setUriIsSet(boolean value) {
      if (!value) {
        this.uri = null;
      }
    }

    public boolean isIsFrozen() {
      return this.isFrozen;
    }

    public setFrozen_args setIsFrozen(boolean isFrozen) {
      this.isFrozen = isFrozen;
      setIsFrozenIsSet(true);
      return this;
    }

    public void unsetIsFrozen() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISFROZEN_ISSET_ID);
    }

    /** Returns true if field isFrozen is set (has been assigned a value) and false otherwise */
    public boolean isSetIsFrozen() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISFROZEN_ISSET_ID);
    }

    public void setIsFrozenIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISFROZEN_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case URI:
        if (value == null) {
          unsetUri();
        } else {
          setUri((java.lang.String)value);
        }
        break;

      case IS_FROZEN:
        if (value == null) {
          unsetIsFrozen();
        } else {
          setIsFrozen((java.lang.Boolean)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case URI:
        return getUri();

      case IS_FROZEN:
        return isIsFrozen();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case URI:
        return isSetUri();
      case IS_FROZEN:
        return isSetIsFrozen();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(setFrozen_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_uri = true && this.isSetUri();
      boolean that_present_uri = true && that.isSetUri();
      if (this_present_uri || that_present_uri) {
        if (!(this_present_uri && that_present_uri))
          return false;
        if (!this.uri.equals(that.uri))
          return false;
      }

      boolean this_present_isFrozen = true;
      boolean that_present_isFrozen = true;
      if (this_present_isFrozen || that_present_isFrozen) {
        if (!(this_present_isFrozen && that_present_isFrozen))
          return false;
        if (this.isFrozen != that.isFrozen)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetUri()) ? 131071 : 524287);
      if (isSetUri())
        hashCode = hashCode * 8191 + uri.hashCode();

      hashCode = hashCode * 8191 + ((isFrozen) ? 131071 : 524287);

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetUri()).compareTo(other.isSetUri());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUri()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uri, other.uri);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetIsFrozen()).compareTo(other.isSetIsFrozen());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIsFrozen()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isFrozen, other.isFrozen);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("setFrozen_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("uri:");
      if (this.uri == null) {
        sb.append("null");
      } else {
        sb.append(this.uri);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("isFrozen:");
      sb.append(this.isFrozen);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (uri == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'uri' was not present! Struct: " + toString());
      }
      // alas, we cannot check 'isFrozen' because it's a primitive and you chose the non-beans generator.
      // 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, java.lang.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 setFrozen_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public setFrozen_argsStandardScheme getScheme() {
        return new setFrozen_argsStandardScheme();
      }
    }

    private static class setFrozen_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setFrozen_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setFrozen_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // URI
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uri = iprot.readString();
                struct.setUriIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // IS_FROZEN
              if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
                struct.isFrozen = iprot.readBool();
                struct.setIsFrozenIsSet(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
        if (!struct.isSetIsFrozen()) {
          throw new org.apache.thrift.protocol.TProtocolException("Required field 'isFrozen' was not found in serialized data! Struct: " + toString());
        }
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, setFrozen_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.uri != null) {
          oprot.writeFieldBegin(URI_FIELD_DESC);
          oprot.writeString(struct.uri);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(IS_FROZEN_FIELD_DESC);
        oprot.writeBool(struct.isFrozen);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setFrozen_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public setFrozen_argsTupleScheme getScheme() {
        return new setFrozen_argsTupleScheme();
      }
    }

    private static class setFrozen_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setFrozen_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setFrozen_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.uri);
        oprot.writeBool(struct.isFrozen);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setFrozen_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.uri = iprot.readString();
        struct.setUriIsSet(true);
        struct.isFrozen = iprot.readBool();
        struct.setIsFrozenIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setFrozen_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setFrozen_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setFrozen_result.class, metaDataMap);
    }

    public setFrozen_result() {
    }

    public setFrozen_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public setFrozen_result(setFrozen_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public setFrozen_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public setFrozen_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(setFrozen_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("setFrozen_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 setFrozen_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public setFrozen_resultStandardScheme getScheme() {
        return new setFrozen_resultStandardScheme();
      }
    }

    private static class setFrozen_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setFrozen_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, setFrozen_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, setFrozen_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class setFrozen_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public setFrozen_resultTupleScheme getScheme() {
        return new setFrozen_resultTupleScheme();
      }
    }

    private static class setFrozen_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setFrozen_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, setFrozen_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, setFrozen_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeRepository_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeRepository_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String uri; // 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 {
      NAME((short)1, "name"),
      URI((short)2, "uri");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // URI
            return URI;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeRepository_args.class, metaDataMap);
    }

    public removeRepository_args() {
    }

    public removeRepository_args(
      java.lang.String name,
      java.lang.String uri)
    {
      this();
      this.name = name;
      this.uri = uri;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeRepository_args(removeRepository_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetUri()) {
        this.uri = other.uri;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.uri = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public removeRepository_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getUri() {
      return this.uri;
    }

    public removeRepository_args setUri(@org.apache.thrift.annotation.Nullable java.lang.String uri) {
      this.uri = uri;
      return this;
    }

    public void unsetUri() {
      this.uri = null;
    }

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

    public void setUriIsSet(boolean value) {
      if (!value) {
        this.uri = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case URI:
        if (value == null) {
          unsetUri();
        } else {
          setUri((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case URI:
        return getUri();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case URI:
        return isSetUri();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeRepository_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_uri = true && this.isSetUri();
      boolean that_present_uri = true && that.isSetUri();
      if (this_present_uri || that_present_uri) {
        if (!(this_present_uri && that_present_uri))
          return false;
        if (!this.uri.equals(that.uri))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetUri()) ? 131071 : 524287);
      if (isSetUri())
        hashCode = hashCode * 8191 + uri.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetUri()).compareTo(other.isSetUri());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUri()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uri, other.uri);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeRepository_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("uri:");
      if (this.uri == null) {
        sb.append("null");
      } else {
        sb.append(this.uri);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (uri == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'uri' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 removeRepository_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeRepository_argsStandardScheme getScheme() {
        return new removeRepository_argsStandardScheme();
      }
    }

    private static class removeRepository_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeRepository_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeRepository_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // URI
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uri = iprot.readString();
                struct.setUriIsSet(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, removeRepository_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.uri != null) {
          oprot.writeFieldBegin(URI_FIELD_DESC);
          oprot.writeString(struct.uri);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeRepository_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeRepository_argsTupleScheme getScheme() {
        return new removeRepository_argsTupleScheme();
      }
    }

    private static class removeRepository_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeRepository_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeRepository_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.uri);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeRepository_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.uri = iprot.readString();
        struct.setUriIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeRepository_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeRepository_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeRepository_result.class, metaDataMap);
    }

    public removeRepository_result() {
    }

    public removeRepository_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeRepository_result(removeRepository_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public removeRepository_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public removeRepository_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeRepository_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeRepository_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 removeRepository_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeRepository_resultStandardScheme getScheme() {
        return new removeRepository_resultStandardScheme();
      }
    }

    private static class removeRepository_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeRepository_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeRepository_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, removeRepository_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeRepository_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeRepository_resultTupleScheme getScheme() {
        return new removeRepository_resultTupleScheme();
      }
    }

    private static class removeRepository_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeRepository_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeRepository_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeRepository_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField URI_FIELD_DESC = new org.apache.thrift.protocol.TField("uri", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField CRED_FIELD_DESC = new org.apache.thrift.protocol.TField("cred", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateRepositoryCredentials_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateRepositoryCredentials_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String uri; // required
    public @org.apache.thrift.annotation.Nullable Credentials cred; // 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 {
      NAME((short)1, "name"),
      URI((short)2, "uri"),
      CRED((short)3, "cred");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // URI
            return URI;
          case 3: // CRED
            return CRED;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.URI, new org.apache.thrift.meta_data.FieldMetaData("uri", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.CRED, new org.apache.thrift.meta_data.FieldMetaData("cred", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Credentials.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateRepositoryCredentials_args.class, metaDataMap);
    }

    public updateRepositoryCredentials_args() {
    }

    public updateRepositoryCredentials_args(
      java.lang.String name,
      java.lang.String uri,
      Credentials cred)
    {
      this();
      this.name = name;
      this.uri = uri;
      this.cred = cred;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateRepositoryCredentials_args(updateRepositoryCredentials_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetUri()) {
        this.uri = other.uri;
      }
      if (other.isSetCred()) {
        this.cred = new Credentials(other.cred);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.uri = null;
      this.cred = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public updateRepositoryCredentials_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getUri() {
      return this.uri;
    }

    public updateRepositoryCredentials_args setUri(@org.apache.thrift.annotation.Nullable java.lang.String uri) {
      this.uri = uri;
      return this;
    }

    public void unsetUri() {
      this.uri = null;
    }

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

    public void setUriIsSet(boolean value) {
      if (!value) {
        this.uri = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public Credentials getCred() {
      return this.cred;
    }

    public updateRepositoryCredentials_args setCred(@org.apache.thrift.annotation.Nullable Credentials cred) {
      this.cred = cred;
      return this;
    }

    public void unsetCred() {
      this.cred = null;
    }

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

    public void setCredIsSet(boolean value) {
      if (!value) {
        this.cred = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case URI:
        if (value == null) {
          unsetUri();
        } else {
          setUri((java.lang.String)value);
        }
        break;

      case CRED:
        if (value == null) {
          unsetCred();
        } else {
          setCred((Credentials)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case URI:
        return getUri();

      case CRED:
        return getCred();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case URI:
        return isSetUri();
      case CRED:
        return isSetCred();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(updateRepositoryCredentials_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_uri = true && this.isSetUri();
      boolean that_present_uri = true && that.isSetUri();
      if (this_present_uri || that_present_uri) {
        if (!(this_present_uri && that_present_uri))
          return false;
        if (!this.uri.equals(that.uri))
          return false;
      }

      boolean this_present_cred = true && this.isSetCred();
      boolean that_present_cred = true && that.isSetCred();
      if (this_present_cred || that_present_cred) {
        if (!(this_present_cred && that_present_cred))
          return false;
        if (!this.cred.equals(that.cred))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetUri()) ? 131071 : 524287);
      if (isSetUri())
        hashCode = hashCode * 8191 + uri.hashCode();

      hashCode = hashCode * 8191 + ((isSetCred()) ? 131071 : 524287);
      if (isSetCred())
        hashCode = hashCode * 8191 + cred.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetUri()).compareTo(other.isSetUri());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetUri()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.uri, other.uri);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetCred()).compareTo(other.isSetCred());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCred()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cred, other.cred);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("updateRepositoryCredentials_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("uri:");
      if (this.uri == null) {
        sb.append("null");
      } else {
        sb.append(this.uri);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cred:");
      if (this.cred == null) {
        sb.append("null");
      } else {
        sb.append(this.cred);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (uri == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'uri' was not present! Struct: " + toString());
      }
      if (cred == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'cred' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (cred != null) {
        cred.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, java.lang.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 updateRepositoryCredentials_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public updateRepositoryCredentials_argsStandardScheme getScheme() {
        return new updateRepositoryCredentials_argsStandardScheme();
      }
    }

    private static class updateRepositoryCredentials_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateRepositoryCredentials_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateRepositoryCredentials_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // URI
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.uri = iprot.readString();
                struct.setUriIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // CRED
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.cred = new Credentials();
                struct.cred.read(iprot);
                struct.setCredIsSet(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, updateRepositoryCredentials_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.uri != null) {
          oprot.writeFieldBegin(URI_FIELD_DESC);
          oprot.writeString(struct.uri);
          oprot.writeFieldEnd();
        }
        if (struct.cred != null) {
          oprot.writeFieldBegin(CRED_FIELD_DESC);
          struct.cred.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateRepositoryCredentials_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public updateRepositoryCredentials_argsTupleScheme getScheme() {
        return new updateRepositoryCredentials_argsTupleScheme();
      }
    }

    private static class updateRepositoryCredentials_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateRepositoryCredentials_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateRepositoryCredentials_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.uri);
        struct.cred.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateRepositoryCredentials_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.uri = iprot.readString();
        struct.setUriIsSet(true);
        struct.cred = new Credentials();
        struct.cred.read(iprot);
        struct.setCredIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateRepositoryCredentials_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateRepositoryCredentials_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateRepositoryCredentials_result.class, metaDataMap);
    }

    public updateRepositoryCredentials_result() {
    }

    public updateRepositoryCredentials_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateRepositoryCredentials_result(updateRepositoryCredentials_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public updateRepositoryCredentials_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public updateRepositoryCredentials_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(updateRepositoryCredentials_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("updateRepositoryCredentials_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 updateRepositoryCredentials_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public updateRepositoryCredentials_resultStandardScheme getScheme() {
        return new updateRepositoryCredentials_resultStandardScheme();
      }
    }

    private static class updateRepositoryCredentials_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateRepositoryCredentials_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, updateRepositoryCredentials_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, updateRepositoryCredentials_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class updateRepositoryCredentials_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public updateRepositoryCredentials_resultTupleScheme getScheme() {
        return new updateRepositoryCredentials_resultTupleScheme();
      }
    }

    private static class updateRepositoryCredentials_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateRepositoryCredentials_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, updateRepositoryCredentials_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, updateRepositoryCredentials_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listRepositories_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listRepositories_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listRepositories_args.class, metaDataMap);
    }

    public listRepositories_args() {
    }

    public listRepositories_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listRepositories_args(listRepositories_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public listRepositories_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listRepositories_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listRepositories_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listRepositories_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositories_argsStandardScheme getScheme() {
        return new listRepositories_argsStandardScheme();
      }
    }

    private static class listRepositories_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listRepositories_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listRepositories_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, listRepositories_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listRepositories_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositories_argsTupleScheme getScheme() {
        return new listRepositories_argsTupleScheme();
      }
    }

    private static class listRepositories_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listRepositories_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listRepositories_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listRepositories_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listRepositories_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listRepositories_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<Repository> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Repository.class))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listRepositories_result.class, metaDataMap);
    }

    public listRepositories_result() {
    }

    public listRepositories_result(
      java.util.List<Repository> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listRepositories_result(listRepositories_result other) {
      if (other.isSetSuccess()) {
        java.util.List<Repository> __this__success = new java.util.ArrayList<Repository>(other.success.size());
        for (Repository other_element : other.success) {
          __this__success.add(new Repository(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<Repository> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Repository elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<Repository>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<Repository> getSuccess() {
      return this.success;
    }

    public listRepositories_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<Repository> 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listRepositories_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listRepositories_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<Repository>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listRepositories_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listRepositories_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 listRepositories_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositories_resultStandardScheme getScheme() {
        return new listRepositories_resultStandardScheme();
      }
    }

    private static class listRepositories_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listRepositories_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listRepositories_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list338 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<Repository>(_list338.size);
                  @org.apache.thrift.annotation.Nullable Repository _elem339;
                  for (int _i340 = 0; _i340 < _list338.size; ++_i340)
                  {
                    _elem339 = new Repository();
                    _elem339.read(iprot);
                    struct.success.add(_elem339);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, listRepositories_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (Repository _iter341 : struct.success)
            {
              _iter341.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listRepositories_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositories_resultTupleScheme getScheme() {
        return new listRepositories_resultTupleScheme();
      }
    }

    private static class listRepositories_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listRepositories_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listRepositories_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Repository _iter342 : struct.success)
            {
              _iter342.write(oprot);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listRepositories_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<Repository>(_list343.size);
            @org.apache.thrift.annotation.Nullable Repository _elem344;
            for (int _i345 = 0; _i345 < _list343.size; ++_i345)
            {
              _elem344 = new Repository();
              _elem344.read(iprot);
              struct.success.add(_elem344);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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


    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listRepositoryTypes_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listRepositoryTypes_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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listRepositoryTypes_args.class, metaDataMap);
    }

    public listRepositoryTypes_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listRepositoryTypes_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      return hashCode;
    }

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

      int lastComparison = 0;

      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listRepositoryTypes_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, java.lang.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 listRepositoryTypes_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositoryTypes_argsStandardScheme getScheme() {
        return new listRepositoryTypes_argsStandardScheme();
      }
    }

    private static class listRepositoryTypes_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listRepositoryTypes_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listRepositoryTypes_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, listRepositoryTypes_args struct) throws org.apache.thrift.TException {
        struct.validate();

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

    }

    private static class listRepositoryTypes_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositoryTypes_argsTupleScheme getScheme() {
        return new listRepositoryTypes_argsTupleScheme();
      }
    }

    private static class listRepositoryTypes_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listRepositoryTypes_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listRepositoryTypes_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listRepositoryTypes_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listRepositoryTypes_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listRepositoryTypes_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listRepositoryTypes_result.class, metaDataMap);
    }

    public listRepositoryTypes_result() {
    }

    public listRepositoryTypes_result(
      java.util.List<java.lang.String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listRepositoryTypes_result(listRepositoryTypes_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listRepositoryTypes_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listRepositoryTypes_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listRepositoryTypes_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
    }

    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, java.lang.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 listRepositoryTypes_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositoryTypes_resultStandardScheme getScheme() {
        return new listRepositoryTypes_resultStandardScheme();
      }
    }

    private static class listRepositoryTypes_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listRepositoryTypes_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listRepositoryTypes_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list346 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list346.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem347;
                  for (int _i348 = 0; _i348 < _list346.size; ++_i348)
                  {
                    _elem347 = iprot.readString();
                    struct.success.add(_elem347);
                  }
                  iprot.readListEnd();
                }
                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, listRepositoryTypes_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter349 : struct.success)
            {
              oprot.writeString(_iter349);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listRepositoryTypes_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listRepositoryTypes_resultTupleScheme getScheme() {
        return new listRepositoryTypes_resultTupleScheme();
      }
    }

    private static class listRepositoryTypes_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listRepositoryTypes_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listRepositoryTypes_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter350 : struct.success)
            {
              oprot.writeString(_iter350);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listRepositoryTypes_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list351.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem352;
            for (int _i353 = 0; _i353 < _list351.size; ++_i353)
            {
              _elem352 = iprot.readString();
              struct.success.add(_elem352);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField REPOSITORY_FIELD_DESC = new org.apache.thrift.protocol.TField("repository", org.apache.thrift.protocol.TType.LIST, (short)2);
    private static final org.apache.thrift.protocol.TField FILE_PATTERNS_FIELD_DESC = new org.apache.thrift.protocol.TField("filePatterns", org.apache.thrift.protocol.TType.LIST, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listFiles_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listFiles_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> repository; // required
    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filePatterns; // 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 {
      NAME((short)1, "name"),
      REPOSITORY((short)2, "repository"),
      FILE_PATTERNS((short)3, "filePatterns");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // REPOSITORY
            return REPOSITORY;
          case 3: // FILE_PATTERNS
            return FILE_PATTERNS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.REPOSITORY, new org.apache.thrift.meta_data.FieldMetaData("repository", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.FILE_PATTERNS, new org.apache.thrift.meta_data.FieldMetaData("filePatterns", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listFiles_args.class, metaDataMap);
    }

    public listFiles_args() {
    }

    public listFiles_args(
      java.lang.String name,
      java.util.List<java.lang.String> repository,
      java.util.List<java.lang.String> filePatterns)
    {
      this();
      this.name = name;
      this.repository = repository;
      this.filePatterns = filePatterns;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listFiles_args(listFiles_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetRepository()) {
        java.util.List<java.lang.String> __this__repository = new java.util.ArrayList<java.lang.String>(other.repository);
        this.repository = __this__repository;
      }
      if (other.isSetFilePatterns()) {
        java.util.List<java.lang.String> __this__filePatterns = new java.util.ArrayList<java.lang.String>(other.filePatterns);
        this.filePatterns = __this__filePatterns;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.repository = null;
      this.filePatterns = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public listFiles_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getRepositoryIterator() {
      return (this.repository == null) ? null : this.repository.iterator();
    }

    public void addToRepository(java.lang.String elem) {
      if (this.repository == null) {
        this.repository = new java.util.ArrayList<java.lang.String>();
      }
      this.repository.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getRepository() {
      return this.repository;
    }

    public listFiles_args setRepository(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> repository) {
      this.repository = repository;
      return this;
    }

    public void unsetRepository() {
      this.repository = null;
    }

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

    public void setRepositoryIsSet(boolean value) {
      if (!value) {
        this.repository = null;
      }
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getFilePatternsIterator() {
      return (this.filePatterns == null) ? null : this.filePatterns.iterator();
    }

    public void addToFilePatterns(java.lang.String elem) {
      if (this.filePatterns == null) {
        this.filePatterns = new java.util.ArrayList<java.lang.String>();
      }
      this.filePatterns.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getFilePatterns() {
      return this.filePatterns;
    }

    public listFiles_args setFilePatterns(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filePatterns) {
      this.filePatterns = filePatterns;
      return this;
    }

    public void unsetFilePatterns() {
      this.filePatterns = null;
    }

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

    public void setFilePatternsIsSet(boolean value) {
      if (!value) {
        this.filePatterns = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case REPOSITORY:
        if (value == null) {
          unsetRepository();
        } else {
          setRepository((java.util.List<java.lang.String>)value);
        }
        break;

      case FILE_PATTERNS:
        if (value == null) {
          unsetFilePatterns();
        } else {
          setFilePatterns((java.util.List<java.lang.String>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case REPOSITORY:
        return getRepository();

      case FILE_PATTERNS:
        return getFilePatterns();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case REPOSITORY:
        return isSetRepository();
      case FILE_PATTERNS:
        return isSetFilePatterns();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listFiles_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_repository = true && this.isSetRepository();
      boolean that_present_repository = true && that.isSetRepository();
      if (this_present_repository || that_present_repository) {
        if (!(this_present_repository && that_present_repository))
          return false;
        if (!this.repository.equals(that.repository))
          return false;
      }

      boolean this_present_filePatterns = true && this.isSetFilePatterns();
      boolean that_present_filePatterns = true && that.isSetFilePatterns();
      if (this_present_filePatterns || that_present_filePatterns) {
        if (!(this_present_filePatterns && that_present_filePatterns))
          return false;
        if (!this.filePatterns.equals(that.filePatterns))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetRepository()) ? 131071 : 524287);
      if (isSetRepository())
        hashCode = hashCode * 8191 + repository.hashCode();

      hashCode = hashCode * 8191 + ((isSetFilePatterns()) ? 131071 : 524287);
      if (isSetFilePatterns())
        hashCode = hashCode * 8191 + filePatterns.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetRepository()).compareTo(other.isSetRepository());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRepository()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.repository, other.repository);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilePatterns()).compareTo(other.isSetFilePatterns());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilePatterns()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filePatterns, other.filePatterns);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listFiles_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("repository:");
      if (this.repository == null) {
        sb.append("null");
      } else {
        sb.append(this.repository);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("filePatterns:");
      if (this.filePatterns == null) {
        sb.append("null");
      } else {
        sb.append(this.filePatterns);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (repository == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'repository' was not present! Struct: " + toString());
      }
      if (filePatterns == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'filePatterns' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listFiles_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listFiles_argsStandardScheme getScheme() {
        return new listFiles_argsStandardScheme();
      }
    }

    private static class listFiles_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listFiles_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listFiles_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REPOSITORY
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list354 = iprot.readListBegin();
                  struct.repository = new java.util.ArrayList<java.lang.String>(_list354.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem355;
                  for (int _i356 = 0; _i356 < _list354.size; ++_i356)
                  {
                    _elem355 = iprot.readString();
                    struct.repository.add(_elem355);
                  }
                  iprot.readListEnd();
                }
                struct.setRepositoryIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FILE_PATTERNS
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list357 = iprot.readListBegin();
                  struct.filePatterns = new java.util.ArrayList<java.lang.String>(_list357.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem358;
                  for (int _i359 = 0; _i359 < _list357.size; ++_i359)
                  {
                    _elem358 = iprot.readString();
                    struct.filePatterns.add(_elem358);
                  }
                  iprot.readListEnd();
                }
                struct.setFilePatternsIsSet(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, listFiles_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.repository != null) {
          oprot.writeFieldBegin(REPOSITORY_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.repository.size()));
            for (java.lang.String _iter360 : struct.repository)
            {
              oprot.writeString(_iter360);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.filePatterns != null) {
          oprot.writeFieldBegin(FILE_PATTERNS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filePatterns.size()));
            for (java.lang.String _iter361 : struct.filePatterns)
            {
              oprot.writeString(_iter361);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listFiles_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listFiles_argsTupleScheme getScheme() {
        return new listFiles_argsTupleScheme();
      }
    }

    private static class listFiles_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listFiles_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listFiles_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        {
          oprot.writeI32(struct.repository.size());
          for (java.lang.String _iter362 : struct.repository)
          {
            oprot.writeString(_iter362);
          }
        }
        {
          oprot.writeI32(struct.filePatterns.size());
          for (java.lang.String _iter363 : struct.filePatterns)
          {
            oprot.writeString(_iter363);
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listFiles_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        {
          org.apache.thrift.protocol.TList _list364 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.repository = new java.util.ArrayList<java.lang.String>(_list364.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem365;
          for (int _i366 = 0; _i366 < _list364.size; ++_i366)
          {
            _elem365 = iprot.readString();
            struct.repository.add(_elem365);
          }
        }
        struct.setRepositoryIsSet(true);
        {
          org.apache.thrift.protocol.TList _list367 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.filePatterns = new java.util.ArrayList<java.lang.String>(_list367.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem368;
          for (int _i369 = 0; _i369 < _list367.size; ++_i369)
          {
            _elem368 = iprot.readString();
            struct.filePatterns.add(_elem368);
          }
        }
        struct.setFilePatternsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listFiles_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listFiles_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listFiles_result.class, metaDataMap);
    }

    public listFiles_result() {
    }

    public listFiles_result(
      java.util.List<java.lang.String> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listFiles_result(listFiles_result other) {
      if (other.isSetSuccess()) {
        java.util.List<java.lang.String> __this__success = new java.util.ArrayList<java.lang.String>(other.success);
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(java.lang.String elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<java.lang.String>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getSuccess() {
      return this.success;
    }

    public listFiles_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listFiles_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listFiles_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<java.lang.String>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listFiles_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listFiles_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 listFiles_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listFiles_resultStandardScheme getScheme() {
        return new listFiles_resultStandardScheme();
      }
    }

    private static class listFiles_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listFiles_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listFiles_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list370 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<java.lang.String>(_list370.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem371;
                  for (int _i372 = 0; _i372 < _list370.size; ++_i372)
                  {
                    _elem371 = iprot.readString();
                    struct.success.add(_elem371);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, listFiles_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size()));
            for (java.lang.String _iter373 : struct.success)
            {
              oprot.writeString(_iter373);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listFiles_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listFiles_resultTupleScheme getScheme() {
        return new listFiles_resultTupleScheme();
      }
    }

    private static class listFiles_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listFiles_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listFiles_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (java.lang.String _iter374 : struct.success)
            {
              oprot.writeString(_iter374);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listFiles_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
            struct.success = new java.util.ArrayList<java.lang.String>(_list375.size);
            @org.apache.thrift.annotation.Nullable java.lang.String _elem376;
            for (int _i377 = 0; _i377 < _list375.size; ++_i377)
            {
              _elem376 = iprot.readString();
              struct.success.add(_elem376);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField BASE_FIELD_DESC = new org.apache.thrift.protocol.TField("base", org.apache.thrift.protocol.TType.I32, (short)2);
    private static final org.apache.thrift.protocol.TField MAX_FIELD_DESC = new org.apache.thrift.protocol.TField("max", org.apache.thrift.protocol.TType.I32, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new configurePolling_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new configurePolling_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public int base; // required
    public int max; // 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 {
      NAME((short)1, "name"),
      BASE((short)2, "base"),
      MAX((short)3, "max");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // BASE
            return BASE;
          case 3: // MAX
            return MAX;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __BASE_ISSET_ID = 0;
    private static final int __MAX_ISSET_ID = 1;
    private byte __isset_bitfield = 0;
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.BASE, new org.apache.thrift.meta_data.FieldMetaData("base", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.MAX, new org.apache.thrift.meta_data.FieldMetaData("max", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(configurePolling_args.class, metaDataMap);
    }

    public configurePolling_args() {
    }

    public configurePolling_args(
      java.lang.String name,
      int base,
      int max)
    {
      this();
      this.name = name;
      this.base = base;
      setBaseIsSet(true);
      this.max = max;
      setMaxIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public configurePolling_args(configurePolling_args other) {
      __isset_bitfield = other.__isset_bitfield;
      if (other.isSetName()) {
        this.name = other.name;
      }
      this.base = other.base;
      this.max = other.max;
    }

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

    @Override
    public void clear() {
      this.name = null;
      setBaseIsSet(false);
      this.base = 0;
      setMaxIsSet(false);
      this.max = 0;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public configurePolling_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public int getBase() {
      return this.base;
    }

    public configurePolling_args setBase(int base) {
      this.base = base;
      setBaseIsSet(true);
      return this;
    }

    public void unsetBase() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __BASE_ISSET_ID);
    }

    /** Returns true if field base is set (has been assigned a value) and false otherwise */
    public boolean isSetBase() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __BASE_ISSET_ID);
    }

    public void setBaseIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __BASE_ISSET_ID, value);
    }

    public int getMax() {
      return this.max;
    }

    public configurePolling_args setMax(int max) {
      this.max = max;
      setMaxIsSet(true);
      return this;
    }

    public void unsetMax() {
      __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAX_ISSET_ID);
    }

    /** Returns true if field max is set (has been assigned a value) and false otherwise */
    public boolean isSetMax() {
      return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAX_ISSET_ID);
    }

    public void setMaxIsSet(boolean value) {
      __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAX_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case BASE:
        if (value == null) {
          unsetBase();
        } else {
          setBase((java.lang.Integer)value);
        }
        break;

      case MAX:
        if (value == null) {
          unsetMax();
        } else {
          setMax((java.lang.Integer)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case BASE:
        return getBase();

      case MAX:
        return getMax();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case BASE:
        return isSetBase();
      case MAX:
        return isSetMax();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(configurePolling_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_base = true;
      boolean that_present_base = true;
      if (this_present_base || that_present_base) {
        if (!(this_present_base && that_present_base))
          return false;
        if (this.base != that.base)
          return false;
      }

      boolean this_present_max = true;
      boolean that_present_max = true;
      if (this_present_max || that_present_max) {
        if (!(this_present_max && that_present_max))
          return false;
        if (this.max != that.max)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + base;

      hashCode = hashCode * 8191 + max;

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetBase()).compareTo(other.isSetBase());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBase()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.base, other.base);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetMax()).compareTo(other.isSetMax());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMax()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.max, other.max);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("configurePolling_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("base:");
      sb.append(this.base);
      first = false;
      if (!first) sb.append(", ");
      sb.append("max:");
      sb.append(this.max);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // alas, we cannot check 'base' because it's a primitive and you chose the non-beans generator.
      // alas, we cannot check 'max' because it's a primitive and you chose the non-beans generator.
      // 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, java.lang.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 configurePolling_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public configurePolling_argsStandardScheme getScheme() {
        return new configurePolling_argsStandardScheme();
      }
    }

    private static class configurePolling_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<configurePolling_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, configurePolling_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // BASE
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.base = iprot.readI32();
                struct.setBaseIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // MAX
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.max = iprot.readI32();
                struct.setMaxIsSet(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
        if (!struct.isSetBase()) {
          throw new org.apache.thrift.protocol.TProtocolException("Required field 'base' was not found in serialized data! Struct: " + toString());
        }
        if (!struct.isSetMax()) {
          throw new org.apache.thrift.protocol.TProtocolException("Required field 'max' was not found in serialized data! Struct: " + toString());
        }
        struct.validate();
      }

      public void write(org.apache.thrift.protocol.TProtocol oprot, configurePolling_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldBegin(BASE_FIELD_DESC);
        oprot.writeI32(struct.base);
        oprot.writeFieldEnd();
        oprot.writeFieldBegin(MAX_FIELD_DESC);
        oprot.writeI32(struct.max);
        oprot.writeFieldEnd();
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class configurePolling_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public configurePolling_argsTupleScheme getScheme() {
        return new configurePolling_argsTupleScheme();
      }
    }

    private static class configurePolling_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<configurePolling_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, configurePolling_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeI32(struct.base);
        oprot.writeI32(struct.max);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, configurePolling_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.base = iprot.readI32();
        struct.setBaseIsSet(true);
        struct.max = iprot.readI32();
        struct.setMaxIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new configurePolling_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new configurePolling_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable InvalidPollingConfiguration err3; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidPollingConfiguration.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(configurePolling_result.class, metaDataMap);
    }

    public configurePolling_result() {
    }

    public configurePolling_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      InvalidPollingConfiguration err3)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public configurePolling_result(configurePolling_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new InvalidPollingConfiguration(other.err3);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public configurePolling_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public configurePolling_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidPollingConfiguration getErr3() {
      return this.err3;
    }

    public configurePolling_result setErr3(@org.apache.thrift.annotation.Nullable InvalidPollingConfiguration err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((InvalidPollingConfiguration)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(configurePolling_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("configurePolling_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      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, java.lang.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 configurePolling_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public configurePolling_resultStandardScheme getScheme() {
        return new configurePolling_resultStandardScheme();
      }
    }

    private static class configurePolling_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<configurePolling_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, configurePolling_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new InvalidPollingConfiguration();
                struct.err3.read(iprot);
                struct.setErr3IsSet(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, configurePolling_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class configurePolling_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public configurePolling_resultTupleScheme getScheme() {
        return new configurePolling_resultTupleScheme();
      }
    }

    private static class configurePolling_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<configurePolling_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, configurePolling_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        if (struct.isSetErr3()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, configurePolling_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err3 = new InvalidPollingConfiguration();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addDerivedAttribute_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addDerivedAttribute_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable DerivedAttributeSpec spec; // 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 {
      NAME((short)1, "name"),
      SPEC((short)2, "spec");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // SPEC
            return SPEC;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DerivedAttributeSpec.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addDerivedAttribute_args.class, metaDataMap);
    }

    public addDerivedAttribute_args() {
    }

    public addDerivedAttribute_args(
      java.lang.String name,
      DerivedAttributeSpec spec)
    {
      this();
      this.name = name;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addDerivedAttribute_args(addDerivedAttribute_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetSpec()) {
        this.spec = new DerivedAttributeSpec(other.spec);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.spec = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public addDerivedAttribute_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public DerivedAttributeSpec getSpec() {
      return this.spec;
    }

    public addDerivedAttribute_args setSpec(@org.apache.thrift.annotation.Nullable DerivedAttributeSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

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

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((DerivedAttributeSpec)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case SPEC:
        return getSpec();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case SPEC:
        return isSetSpec();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(addDerivedAttribute_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetSpec()) ? 131071 : 524287);
      if (isSetSpec())
        hashCode = hashCode * 8191 + spec.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("addDerivedAttribute_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (spec == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'spec' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (spec != null) {
        spec.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, java.lang.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 addDerivedAttribute_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addDerivedAttribute_argsStandardScheme getScheme() {
        return new addDerivedAttribute_argsStandardScheme();
      }
    }

    private static class addDerivedAttribute_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<addDerivedAttribute_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addDerivedAttribute_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new DerivedAttributeSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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, addDerivedAttribute_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addDerivedAttribute_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addDerivedAttribute_argsTupleScheme getScheme() {
        return new addDerivedAttribute_argsTupleScheme();
      }
    }

    private static class addDerivedAttribute_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addDerivedAttribute_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addDerivedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        struct.spec.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addDerivedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.spec = new DerivedAttributeSpec();
        struct.spec.read(iprot);
        struct.setSpecIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addDerivedAttribute_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addDerivedAttribute_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable InvalidDerivedAttributeSpec err3; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidDerivedAttributeSpec.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addDerivedAttribute_result.class, metaDataMap);
    }

    public addDerivedAttribute_result() {
    }

    public addDerivedAttribute_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      InvalidDerivedAttributeSpec err3)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addDerivedAttribute_result(addDerivedAttribute_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new InvalidDerivedAttributeSpec(other.err3);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public addDerivedAttribute_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public addDerivedAttribute_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidDerivedAttributeSpec getErr3() {
      return this.err3;
    }

    public addDerivedAttribute_result setErr3(@org.apache.thrift.annotation.Nullable InvalidDerivedAttributeSpec err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((InvalidDerivedAttributeSpec)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(addDerivedAttribute_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("addDerivedAttribute_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      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, java.lang.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 addDerivedAttribute_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addDerivedAttribute_resultStandardScheme getScheme() {
        return new addDerivedAttribute_resultStandardScheme();
      }
    }

    private static class addDerivedAttribute_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<addDerivedAttribute_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addDerivedAttribute_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new InvalidDerivedAttributeSpec();
                struct.err3.read(iprot);
                struct.setErr3IsSet(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, addDerivedAttribute_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addDerivedAttribute_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addDerivedAttribute_resultTupleScheme getScheme() {
        return new addDerivedAttribute_resultTupleScheme();
      }
    }

    private static class addDerivedAttribute_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addDerivedAttribute_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addDerivedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        if (struct.isSetErr3()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addDerivedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err3 = new InvalidDerivedAttributeSpec();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeDerivedAttribute_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeDerivedAttribute_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable DerivedAttributeSpec spec; // 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 {
      NAME((short)1, "name"),
      SPEC((short)2, "spec");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // SPEC
            return SPEC;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DerivedAttributeSpec.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeDerivedAttribute_args.class, metaDataMap);
    }

    public removeDerivedAttribute_args() {
    }

    public removeDerivedAttribute_args(
      java.lang.String name,
      DerivedAttributeSpec spec)
    {
      this();
      this.name = name;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeDerivedAttribute_args(removeDerivedAttribute_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetSpec()) {
        this.spec = new DerivedAttributeSpec(other.spec);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.spec = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public removeDerivedAttribute_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public DerivedAttributeSpec getSpec() {
      return this.spec;
    }

    public removeDerivedAttribute_args setSpec(@org.apache.thrift.annotation.Nullable DerivedAttributeSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

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

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((DerivedAttributeSpec)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case SPEC:
        return getSpec();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case SPEC:
        return isSetSpec();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeDerivedAttribute_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetSpec()) ? 131071 : 524287);
      if (isSetSpec())
        hashCode = hashCode * 8191 + spec.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeDerivedAttribute_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (spec == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'spec' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (spec != null) {
        spec.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, java.lang.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 removeDerivedAttribute_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeDerivedAttribute_argsStandardScheme getScheme() {
        return new removeDerivedAttribute_argsStandardScheme();
      }
    }

    private static class removeDerivedAttribute_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeDerivedAttribute_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeDerivedAttribute_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new DerivedAttributeSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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, removeDerivedAttribute_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeDerivedAttribute_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeDerivedAttribute_argsTupleScheme getScheme() {
        return new removeDerivedAttribute_argsTupleScheme();
      }
    }

    private static class removeDerivedAttribute_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeDerivedAttribute_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeDerivedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        struct.spec.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeDerivedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.spec = new DerivedAttributeSpec();
        struct.spec.read(iprot);
        struct.setSpecIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeDerivedAttribute_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeDerivedAttribute_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeDerivedAttribute_result.class, metaDataMap);
    }

    public removeDerivedAttribute_result() {
    }

    public removeDerivedAttribute_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeDerivedAttribute_result(removeDerivedAttribute_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public removeDerivedAttribute_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public removeDerivedAttribute_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeDerivedAttribute_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeDerivedAttribute_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 removeDerivedAttribute_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeDerivedAttribute_resultStandardScheme getScheme() {
        return new removeDerivedAttribute_resultStandardScheme();
      }
    }

    private static class removeDerivedAttribute_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeDerivedAttribute_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeDerivedAttribute_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, removeDerivedAttribute_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeDerivedAttribute_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeDerivedAttribute_resultTupleScheme getScheme() {
        return new removeDerivedAttribute_resultTupleScheme();
      }
    }

    private static class removeDerivedAttribute_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeDerivedAttribute_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeDerivedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeDerivedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listDerivedAttributes_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listDerivedAttributes_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listDerivedAttributes_args.class, metaDataMap);
    }

    public listDerivedAttributes_args() {
    }

    public listDerivedAttributes_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listDerivedAttributes_args(listDerivedAttributes_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public listDerivedAttributes_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listDerivedAttributes_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listDerivedAttributes_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listDerivedAttributes_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listDerivedAttributes_argsStandardScheme getScheme() {
        return new listDerivedAttributes_argsStandardScheme();
      }
    }

    private static class listDerivedAttributes_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listDerivedAttributes_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listDerivedAttributes_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, listDerivedAttributes_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listDerivedAttributes_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listDerivedAttributes_argsTupleScheme getScheme() {
        return new listDerivedAttributes_argsTupleScheme();
      }
    }

    private static class listDerivedAttributes_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listDerivedAttributes_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listDerivedAttributes_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listDerivedAttributes_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listDerivedAttributes_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listDerivedAttributes_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<DerivedAttributeSpec> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DerivedAttributeSpec.class))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listDerivedAttributes_result.class, metaDataMap);
    }

    public listDerivedAttributes_result() {
    }

    public listDerivedAttributes_result(
      java.util.List<DerivedAttributeSpec> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listDerivedAttributes_result(listDerivedAttributes_result other) {
      if (other.isSetSuccess()) {
        java.util.List<DerivedAttributeSpec> __this__success = new java.util.ArrayList<DerivedAttributeSpec>(other.success.size());
        for (DerivedAttributeSpec other_element : other.success) {
          __this__success.add(new DerivedAttributeSpec(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<DerivedAttributeSpec> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(DerivedAttributeSpec elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<DerivedAttributeSpec>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<DerivedAttributeSpec> getSuccess() {
      return this.success;
    }

    public listDerivedAttributes_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<DerivedAttributeSpec> 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listDerivedAttributes_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listDerivedAttributes_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<DerivedAttributeSpec>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listDerivedAttributes_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listDerivedAttributes_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 listDerivedAttributes_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listDerivedAttributes_resultStandardScheme getScheme() {
        return new listDerivedAttributes_resultStandardScheme();
      }
    }

    private static class listDerivedAttributes_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listDerivedAttributes_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listDerivedAttributes_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list378 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<DerivedAttributeSpec>(_list378.size);
                  @org.apache.thrift.annotation.Nullable DerivedAttributeSpec _elem379;
                  for (int _i380 = 0; _i380 < _list378.size; ++_i380)
                  {
                    _elem379 = new DerivedAttributeSpec();
                    _elem379.read(iprot);
                    struct.success.add(_elem379);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, listDerivedAttributes_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (DerivedAttributeSpec _iter381 : struct.success)
            {
              _iter381.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listDerivedAttributes_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listDerivedAttributes_resultTupleScheme getScheme() {
        return new listDerivedAttributes_resultTupleScheme();
      }
    }

    private static class listDerivedAttributes_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listDerivedAttributes_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listDerivedAttributes_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (DerivedAttributeSpec _iter382 : struct.success)
            {
              _iter382.write(oprot);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listDerivedAttributes_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<DerivedAttributeSpec>(_list383.size);
            @org.apache.thrift.annotation.Nullable DerivedAttributeSpec _elem384;
            for (int _i385 = 0; _i385 < _list383.size; ++_i385)
            {
              _elem384 = new DerivedAttributeSpec();
              _elem384.read(iprot);
              struct.success.add(_elem384);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addIndexedAttribute_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addIndexedAttribute_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable IndexedAttributeSpec spec; // 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 {
      NAME((short)1, "name"),
      SPEC((short)2, "spec");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // SPEC
            return SPEC;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IndexedAttributeSpec.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addIndexedAttribute_args.class, metaDataMap);
    }

    public addIndexedAttribute_args() {
    }

    public addIndexedAttribute_args(
      java.lang.String name,
      IndexedAttributeSpec spec)
    {
      this();
      this.name = name;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addIndexedAttribute_args(addIndexedAttribute_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetSpec()) {
        this.spec = new IndexedAttributeSpec(other.spec);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.spec = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public addIndexedAttribute_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public IndexedAttributeSpec getSpec() {
      return this.spec;
    }

    public addIndexedAttribute_args setSpec(@org.apache.thrift.annotation.Nullable IndexedAttributeSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

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

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((IndexedAttributeSpec)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case SPEC:
        return getSpec();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case SPEC:
        return isSetSpec();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(addIndexedAttribute_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetSpec()) ? 131071 : 524287);
      if (isSetSpec())
        hashCode = hashCode * 8191 + spec.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("addIndexedAttribute_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (spec == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'spec' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (spec != null) {
        spec.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, java.lang.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 addIndexedAttribute_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addIndexedAttribute_argsStandardScheme getScheme() {
        return new addIndexedAttribute_argsStandardScheme();
      }
    }

    private static class addIndexedAttribute_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<addIndexedAttribute_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addIndexedAttribute_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new IndexedAttributeSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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, addIndexedAttribute_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addIndexedAttribute_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addIndexedAttribute_argsTupleScheme getScheme() {
        return new addIndexedAttribute_argsTupleScheme();
      }
    }

    private static class addIndexedAttribute_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<addIndexedAttribute_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addIndexedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        struct.spec.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addIndexedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.spec = new IndexedAttributeSpec();
        struct.spec.read(iprot);
        struct.setSpecIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
    private static final org.apache.thrift.protocol.TField ERR3_FIELD_DESC = new org.apache.thrift.protocol.TField("err3", org.apache.thrift.protocol.TType.STRUCT, (short)3);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new addIndexedAttribute_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new addIndexedAttribute_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // required
    public @org.apache.thrift.annotation.Nullable InvalidIndexedAttributeSpec err3; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2"),
      ERR3((short)3, "err3");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          case 3: // ERR3
            return ERR3;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      tmpMap.put(_Fields.ERR3, new org.apache.thrift.meta_data.FieldMetaData("err3", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvalidIndexedAttributeSpec.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addIndexedAttribute_result.class, metaDataMap);
    }

    public addIndexedAttribute_result() {
    }

    public addIndexedAttribute_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2,
      InvalidIndexedAttributeSpec err3)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
      this.err3 = err3;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addIndexedAttribute_result(addIndexedAttribute_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
      if (other.isSetErr3()) {
        this.err3 = new InvalidIndexedAttributeSpec(other.err3);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
      this.err3 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public addIndexedAttribute_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public addIndexedAttribute_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public InvalidIndexedAttributeSpec getErr3() {
      return this.err3;
    }

    public addIndexedAttribute_result setErr3(@org.apache.thrift.annotation.Nullable InvalidIndexedAttributeSpec err3) {
      this.err3 = err3;
      return this;
    }

    public void unsetErr3() {
      this.err3 = null;
    }

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

    public void setErr3IsSet(boolean value) {
      if (!value) {
        this.err3 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      case ERR3:
        if (value == null) {
          unsetErr3();
        } else {
          setErr3((InvalidIndexedAttributeSpec)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      case ERR3:
        return getErr3();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      case ERR3:
        return isSetErr3();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(addIndexedAttribute_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      boolean this_present_err3 = true && this.isSetErr3();
      boolean that_present_err3 = true && that.isSetErr3();
      if (this_present_err3 || that_present_err3) {
        if (!(this_present_err3 && that_present_err3))
          return false;
        if (!this.err3.equals(that.err3))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr3()) ? 131071 : 524287);
      if (isSetErr3())
        hashCode = hashCode * 8191 + err3.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr3()).compareTo(other.isSetErr3());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr3()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err3, other.err3);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("addIndexedAttribute_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err3:");
      if (this.err3 == null) {
        sb.append("null");
      } else {
        sb.append(this.err3);
      }
      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, java.lang.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 addIndexedAttribute_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addIndexedAttribute_resultStandardScheme getScheme() {
        return new addIndexedAttribute_resultStandardScheme();
      }
    }

    private static class addIndexedAttribute_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<addIndexedAttribute_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, addIndexedAttribute_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // ERR3
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err3 = new InvalidIndexedAttributeSpec();
                struct.err3.read(iprot);
                struct.setErr3IsSet(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, addIndexedAttribute_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err3 != null) {
          oprot.writeFieldBegin(ERR3_FIELD_DESC);
          struct.err3.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class addIndexedAttribute_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public addIndexedAttribute_resultTupleScheme getScheme() {
        return new addIndexedAttribute_resultTupleScheme();
      }
    }

    private static class addIndexedAttribute_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<addIndexedAttribute_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, addIndexedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        if (struct.isSetErr3()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
        if (struct.isSetErr3()) {
          struct.err3.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, addIndexedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err3 = new InvalidIndexedAttributeSpec();
          struct.err3.read(iprot);
          struct.setErr3IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField SPEC_FIELD_DESC = new org.apache.thrift.protocol.TField("spec", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeIndexedAttribute_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeIndexedAttribute_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable IndexedAttributeSpec spec; // 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 {
      NAME((short)1, "name"),
      SPEC((short)2, "spec");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // SPEC
            return SPEC;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SPEC, new org.apache.thrift.meta_data.FieldMetaData("spec", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IndexedAttributeSpec.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeIndexedAttribute_args.class, metaDataMap);
    }

    public removeIndexedAttribute_args() {
    }

    public removeIndexedAttribute_args(
      java.lang.String name,
      IndexedAttributeSpec spec)
    {
      this();
      this.name = name;
      this.spec = spec;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeIndexedAttribute_args(removeIndexedAttribute_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetSpec()) {
        this.spec = new IndexedAttributeSpec(other.spec);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.spec = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public removeIndexedAttribute_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public IndexedAttributeSpec getSpec() {
      return this.spec;
    }

    public removeIndexedAttribute_args setSpec(@org.apache.thrift.annotation.Nullable IndexedAttributeSpec spec) {
      this.spec = spec;
      return this;
    }

    public void unsetSpec() {
      this.spec = null;
    }

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

    public void setSpecIsSet(boolean value) {
      if (!value) {
        this.spec = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case SPEC:
        if (value == null) {
          unsetSpec();
        } else {
          setSpec((IndexedAttributeSpec)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case SPEC:
        return getSpec();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case SPEC:
        return isSetSpec();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeIndexedAttribute_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_spec = true && this.isSetSpec();
      boolean that_present_spec = true && that.isSetSpec();
      if (this_present_spec || that_present_spec) {
        if (!(this_present_spec && that_present_spec))
          return false;
        if (!this.spec.equals(that.spec))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetSpec()) ? 131071 : 524287);
      if (isSetSpec())
        hashCode = hashCode * 8191 + spec.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetSpec()).compareTo(other.isSetSpec());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSpec()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spec, other.spec);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeIndexedAttribute_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("spec:");
      if (this.spec == null) {
        sb.append("null");
      } else {
        sb.append(this.spec);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (spec == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'spec' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (spec != null) {
        spec.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, java.lang.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 removeIndexedAttribute_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeIndexedAttribute_argsStandardScheme getScheme() {
        return new removeIndexedAttribute_argsStandardScheme();
      }
    }

    private static class removeIndexedAttribute_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeIndexedAttribute_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeIndexedAttribute_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // SPEC
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.spec = new IndexedAttributeSpec();
                struct.spec.read(iprot);
                struct.setSpecIsSet(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, removeIndexedAttribute_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.spec != null) {
          oprot.writeFieldBegin(SPEC_FIELD_DESC);
          struct.spec.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeIndexedAttribute_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeIndexedAttribute_argsTupleScheme getScheme() {
        return new removeIndexedAttribute_argsTupleScheme();
      }
    }

    private static class removeIndexedAttribute_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeIndexedAttribute_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeIndexedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        struct.spec.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeIndexedAttribute_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.spec = new IndexedAttributeSpec();
        struct.spec.read(iprot);
        struct.setSpecIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new removeIndexedAttribute_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new removeIndexedAttribute_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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 {
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(removeIndexedAttribute_result.class, metaDataMap);
    }

    public removeIndexedAttribute_result() {
    }

    public removeIndexedAttribute_result(
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public removeIndexedAttribute_result(removeIndexedAttribute_result other) {
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public removeIndexedAttribute_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public removeIndexedAttribute_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(removeIndexedAttribute_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("removeIndexedAttribute_result(");
      boolean first = true;

      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 removeIndexedAttribute_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeIndexedAttribute_resultStandardScheme getScheme() {
        return new removeIndexedAttribute_resultStandardScheme();
      }
    }

    private static class removeIndexedAttribute_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<removeIndexedAttribute_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, removeIndexedAttribute_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 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, removeIndexedAttribute_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class removeIndexedAttribute_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public removeIndexedAttribute_resultTupleScheme getScheme() {
        return new removeIndexedAttribute_resultTupleScheme();
      }
    }

    private static class removeIndexedAttribute_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<removeIndexedAttribute_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, removeIndexedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetErr1()) {
          optionals.set(0);
        }
        if (struct.isSetErr2()) {
          optionals.set(1);
        }
        oprot.writeBitSet(optionals, 2);
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, removeIndexedAttribute_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(2);
        if (incoming.get(0)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(1)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listIndexedAttributes_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listIndexedAttributes_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listIndexedAttributes_args.class, metaDataMap);
    }

    public listIndexedAttributes_args() {
    }

    public listIndexedAttributes_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listIndexedAttributes_args(listIndexedAttributes_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public listIndexedAttributes_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listIndexedAttributes_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listIndexedAttributes_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 listIndexedAttributes_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listIndexedAttributes_argsStandardScheme getScheme() {
        return new listIndexedAttributes_argsStandardScheme();
      }
    }

    private static class listIndexedAttributes_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<listIndexedAttributes_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listIndexedAttributes_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, listIndexedAttributes_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listIndexedAttributes_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listIndexedAttributes_argsTupleScheme getScheme() {
        return new listIndexedAttributes_argsTupleScheme();
      }
    }

    private static class listIndexedAttributes_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<listIndexedAttributes_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listIndexedAttributes_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listIndexedAttributes_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new listIndexedAttributes_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new listIndexedAttributes_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<IndexedAttributeSpec> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IndexedAttributeSpec.class))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(listIndexedAttributes_result.class, metaDataMap);
    }

    public listIndexedAttributes_result() {
    }

    public listIndexedAttributes_result(
      java.util.List<IndexedAttributeSpec> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public listIndexedAttributes_result(listIndexedAttributes_result other) {
      if (other.isSetSuccess()) {
        java.util.List<IndexedAttributeSpec> __this__success = new java.util.ArrayList<IndexedAttributeSpec>(other.success.size());
        for (IndexedAttributeSpec other_element : other.success) {
          __this__success.add(new IndexedAttributeSpec(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<IndexedAttributeSpec> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(IndexedAttributeSpec elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<IndexedAttributeSpec>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<IndexedAttributeSpec> getSuccess() {
      return this.success;
    }

    public listIndexedAttributes_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<IndexedAttributeSpec> 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public listIndexedAttributes_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public listIndexedAttributes_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<IndexedAttributeSpec>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(listIndexedAttributes_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("listIndexedAttributes_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 listIndexedAttributes_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listIndexedAttributes_resultStandardScheme getScheme() {
        return new listIndexedAttributes_resultStandardScheme();
      }
    }

    private static class listIndexedAttributes_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<listIndexedAttributes_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, listIndexedAttributes_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list386 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<IndexedAttributeSpec>(_list386.size);
                  @org.apache.thrift.annotation.Nullable IndexedAttributeSpec _elem387;
                  for (int _i388 = 0; _i388 < _list386.size; ++_i388)
                  {
                    _elem387 = new IndexedAttributeSpec();
                    _elem387.read(iprot);
                    struct.success.add(_elem387);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, listIndexedAttributes_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (IndexedAttributeSpec _iter389 : struct.success)
            {
              _iter389.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class listIndexedAttributes_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public listIndexedAttributes_resultTupleScheme getScheme() {
        return new listIndexedAttributes_resultTupleScheme();
      }
    }

    private static class listIndexedAttributes_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<listIndexedAttributes_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, listIndexedAttributes_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (IndexedAttributeSpec _iter390 : struct.success)
            {
              _iter390.write(oprot);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, listIndexedAttributes_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list391 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<IndexedAttributeSpec>(_list391.size);
            @org.apache.thrift.annotation.Nullable IndexedAttributeSpec _elem392;
            for (int _i393 = 0; _i393 < _list391.size; ++_i393)
            {
              _elem392 = new IndexedAttributeSpec();
              _elem392.read(iprot);
              struct.success.add(_elem392);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getModel_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getModel_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable HawkQueryOptions options; // 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 {
      NAME((short)1, "name"),
      OPTIONS((short)2, "options");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // OPTIONS
            return OPTIONS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkQueryOptions.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getModel_args.class, metaDataMap);
    }

    public getModel_args() {
    }

    public getModel_args(
      java.lang.String name,
      HawkQueryOptions options)
    {
      this();
      this.name = name;
      this.options = options;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getModel_args(getModel_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetOptions()) {
        this.options = new HawkQueryOptions(other.options);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.options = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public getModel_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkQueryOptions getOptions() {
      return this.options;
    }

    public getModel_args setOptions(@org.apache.thrift.annotation.Nullable HawkQueryOptions options) {
      this.options = options;
      return this;
    }

    public void unsetOptions() {
      this.options = null;
    }

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

    public void setOptionsIsSet(boolean value) {
      if (!value) {
        this.options = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case OPTIONS:
        if (value == null) {
          unsetOptions();
        } else {
          setOptions((HawkQueryOptions)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case OPTIONS:
        return getOptions();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case OPTIONS:
        return isSetOptions();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(getModel_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_options = true && this.isSetOptions();
      boolean that_present_options = true && that.isSetOptions();
      if (this_present_options || that_present_options) {
        if (!(this_present_options && that_present_options))
          return false;
        if (!this.options.equals(that.options))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
      if (isSetOptions())
        hashCode = hashCode * 8191 + options.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOptions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("getModel_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (options == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'options' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (options != null) {
        options.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, java.lang.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 getModel_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getModel_argsStandardScheme getScheme() {
        return new getModel_argsStandardScheme();
      }
    }

    private static class getModel_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getModel_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getModel_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // OPTIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.options = new HawkQueryOptions();
                struct.options.read(iprot);
                struct.setOptionsIsSet(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, getModel_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.options != null) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          struct.options.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getModel_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getModel_argsTupleScheme getScheme() {
        return new getModel_argsTupleScheme();
      }
    }

    private static class getModel_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getModel_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getModel_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        struct.options.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getModel_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.options = new HawkQueryOptions();
        struct.options.read(iprot);
        struct.setOptionsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getModel_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getModel_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<ModelElement> success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ModelElement.class))));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getModel_result.class, metaDataMap);
    }

    public getModel_result() {
    }

    public getModel_result(
      java.util.List<ModelElement> success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getModel_result(getModel_result other) {
      if (other.isSetSuccess()) {
        java.util.List<ModelElement> __this__success = new java.util.ArrayList<ModelElement>(other.success.size());
        for (ModelElement other_element : other.success) {
          __this__success.add(new ModelElement(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<ModelElement> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ModelElement elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<ModelElement>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<ModelElement> getSuccess() {
      return this.success;
    }

    public getModel_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ModelElement> 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public getModel_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public getModel_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<ModelElement>)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(getModel_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("getModel_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 getModel_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getModel_resultStandardScheme getScheme() {
        return new getModel_resultStandardScheme();
      }
    }

    private static class getModel_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getModel_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getModel_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list394 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<ModelElement>(_list394.size);
                  @org.apache.thrift.annotation.Nullable ModelElement _elem395;
                  for (int _i396 = 0; _i396 < _list394.size; ++_i396)
                  {
                    _elem395 = new ModelElement();
                    _elem395.read(iprot);
                    struct.success.add(_elem395);
                  }
                  iprot.readListEnd();
                }
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, getModel_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (ModelElement _iter397 : struct.success)
            {
              _iter397.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getModel_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getModel_resultTupleScheme getScheme() {
        return new getModel_resultTupleScheme();
      }
    }

    private static class getModel_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getModel_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getModel_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ModelElement _iter398 : struct.success)
            {
              _iter398.write(oprot);
            }
          }
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getModel_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list399 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<ModelElement>(_list399.size);
            @org.apache.thrift.annotation.Nullable ModelElement _elem400;
            for (int _i401 = 0; _i401 < _list399.size; ++_i401)
            {
              _elem400 = new ModelElement();
              _elem400.read(iprot);
              struct.success.add(_elem400);
            }
          }
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getRootElements_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getRootElements_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable HawkQueryOptions options; // 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 {
      NAME((short)1, "name"),
      OPTIONS((short)2, "options");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // OPTIONS
            return OPTIONS;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkQueryOptions.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRootElements_args.class, metaDataMap);
    }

    public getRootElements_args() {
    }

    public getRootElements_args(
      java.lang.String name,
      HawkQueryOptions options)
    {
      this();
      this.name = name;
      this.options = options;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getRootElements_args(getRootElements_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetOptions()) {
        this.options = new HawkQueryOptions(other.options);
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.options = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public getRootElements_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkQueryOptions getOptions() {
      return this.options;
    }

    public getRootElements_args setOptions(@org.apache.thrift.annotation.Nullable HawkQueryOptions options) {
      this.options = options;
      return this;
    }

    public void unsetOptions() {
      this.options = null;
    }

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

    public void setOptionsIsSet(boolean value) {
      if (!value) {
        this.options = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case OPTIONS:
        if (value == null) {
          unsetOptions();
        } else {
          setOptions((HawkQueryOptions)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case OPTIONS:
        return getOptions();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case OPTIONS:
        return isSetOptions();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(getRootElements_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_options = true && this.isSetOptions();
      boolean that_present_options = true && that.isSetOptions();
      if (this_present_options || that_present_options) {
        if (!(this_present_options && that_present_options))
          return false;
        if (!this.options.equals(that.options))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
      if (isSetOptions())
        hashCode = hashCode * 8191 + options.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOptions()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.options, other.options);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("getRootElements_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("options:");
      if (this.options == null) {
        sb.append("null");
      } else {
        sb.append(this.options);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (options == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'options' was not present! Struct: " + toString());
      }
      // check for sub-struct validity
      if (options != null) {
        options.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, java.lang.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 getRootElements_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getRootElements_argsStandardScheme getScheme() {
        return new getRootElements_argsStandardScheme();
      }
    }

    private static class getRootElements_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getRootElements_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getRootElements_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // OPTIONS
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.options = new HawkQueryOptions();
                struct.options.read(iprot);
                struct.setOptionsIsSet(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, getRootElements_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.options != null) {
          oprot.writeFieldBegin(OPTIONS_FIELD_DESC);
          struct.options.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getRootElements_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getRootElements_argsTupleScheme getScheme() {
        return new getRootElements_argsTupleScheme();
      }
    }

    private static class getRootElements_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getRootElements_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getRootElements_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        struct.options.write(oprot);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getRootElements_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.options = new HawkQueryOptions();
        struct.options.read(iprot);
        struct.setOptionsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getRootElements_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getRootElements_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.util.List<ModelElement> 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 java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ModelElement.class))));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRootElements_result.class, metaDataMap);
    }

    public getRootElements_result() {
    }

    public getRootElements_result(
      java.util.List<ModelElement> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getRootElements_result(getRootElements_result other) {
      if (other.isSetSuccess()) {
        java.util.List<ModelElement> __this__success = new java.util.ArrayList<ModelElement>(other.success.size());
        for (ModelElement other_element : other.success) {
          __this__success.add(new ModelElement(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<ModelElement> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ModelElement elem) {
      if (this.success == null) {
        this.success = new java.util.ArrayList<ModelElement>();
      }
      this.success.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<ModelElement> getSuccess() {
      return this.success;
    }

    public getRootElements_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ModelElement> 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, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((java.util.List<ModelElement>)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(getRootElements_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("getRootElements_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
    }

    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, java.lang.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 getRootElements_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getRootElements_resultStandardScheme getScheme() {
        return new getRootElements_resultStandardScheme();
      }
    }

    private static class getRootElements_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getRootElements_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, getRootElements_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.LIST) {
                {
                  org.apache.thrift.protocol.TList _list402 = iprot.readListBegin();
                  struct.success = new java.util.ArrayList<ModelElement>(_list402.size);
                  @org.apache.thrift.annotation.Nullable ModelElement _elem403;
                  for (int _i404 = 0; _i404 < _list402.size; ++_i404)
                  {
                    _elem403 = new ModelElement();
                    _elem403.read(iprot);
                    struct.success.add(_elem403);
                  }
                  iprot.readListEnd();
                }
                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, getRootElements_result struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.success != null) {
          oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
            for (ModelElement _iter405 : struct.success)
            {
              _iter405.write(oprot);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class getRootElements_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public getRootElements_resultTupleScheme getScheme() {
        return new getRootElements_resultTupleScheme();
      }
    }

    private static class getRootElements_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getRootElements_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, getRootElements_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (ModelElement _iter406 : struct.success)
            {
              _iter406.write(oprot);
            }
          }
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, getRootElements_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(1);
        if (incoming.get(0)) {
          {
            org.apache.thrift.protocol.TList _list407 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
            struct.success = new java.util.ArrayList<ModelElement>(_list407.size);
            @org.apache.thrift.annotation.Nullable ModelElement _elem408;
            for (int _i409 = 0; _i409 < _list407.size; ++_i409)
            {
              _elem408 = new ModelElement();
              _elem408.read(iprot);
              struct.success.add(_elem408);
            }
          }
          struct.setSuccessIsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new watchStateChanges_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new watchStateChanges_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // 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 {
      NAME((short)1, "name");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(watchStateChanges_args.class, metaDataMap);
    }

    public watchStateChanges_args() {
    }

    public watchStateChanges_args(
      java.lang.String name)
    {
      this();
      this.name = name;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public watchStateChanges_args(watchStateChanges_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public watchStateChanges_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(watchStateChanges_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("watchStateChanges_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 watchStateChanges_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchStateChanges_argsStandardScheme getScheme() {
        return new watchStateChanges_argsStandardScheme();
      }
    }

    private static class watchStateChanges_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<watchStateChanges_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, watchStateChanges_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(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, watchStateChanges_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class watchStateChanges_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchStateChanges_argsTupleScheme getScheme() {
        return new watchStateChanges_argsTupleScheme();
      }
    }

    private static class watchStateChanges_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<watchStateChanges_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, watchStateChanges_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, watchStateChanges_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  public static class watchStateChanges_result implements org.apache.thrift.TBase<watchStateChanges_result, watchStateChanges_result._Fields>, java.io.Serializable, Cloneable, Comparable<watchStateChanges_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("watchStateChanges_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 org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new watchStateChanges_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new watchStateChanges_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable Subscription success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, Subscription.class)));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(watchStateChanges_result.class, metaDataMap);
    }

    public watchStateChanges_result() {
    }

    public watchStateChanges_result(
      Subscription success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public watchStateChanges_result(watchStateChanges_result other) {
      if (other.isSetSuccess()) {
        this.success = new Subscription(other.success);
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public Subscription getSuccess() {
      return this.success;
    }

    public watchStateChanges_result setSuccess(@org.apache.thrift.annotation.Nullable Subscription 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public watchStateChanges_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public watchStateChanges_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Subscription)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(watchStateChanges_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("watchStateChanges_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 watchStateChanges_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchStateChanges_resultStandardScheme getScheme() {
        return new watchStateChanges_resultStandardScheme();
      }
    }

    private static class watchStateChanges_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<watchStateChanges_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, watchStateChanges_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 Subscription();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, watchStateChanges_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();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class watchStateChanges_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchStateChanges_resultTupleScheme getScheme() {
        return new watchStateChanges_resultTupleScheme();
      }
    }

    private static class watchStateChanges_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<watchStateChanges_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, watchStateChanges_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, watchStateChanges_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new Subscription();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

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

    private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField REPOSITORY_URI_FIELD_DESC = new org.apache.thrift.protocol.TField("repositoryUri", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField FILE_PATH_FIELD_DESC = new org.apache.thrift.protocol.TField("filePath", org.apache.thrift.protocol.TType.LIST, (short)3);
    private static final org.apache.thrift.protocol.TField CLIENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("clientID", org.apache.thrift.protocol.TType.STRING, (short)4);
    private static final org.apache.thrift.protocol.TField DURABLE_EVENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("durableEvents", org.apache.thrift.protocol.TType.I32, (short)5);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new watchModelChanges_argsStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new watchModelChanges_argsTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String repositoryUri; // required
    public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filePath; // required
    public @org.apache.thrift.annotation.Nullable java.lang.String clientID; // required
    /**
     * 
     * @see SubscriptionDurability
     */
    public @org.apache.thrift.annotation.Nullable SubscriptionDurability durableEvents; // 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 {
      NAME((short)1, "name"),
      REPOSITORY_URI((short)2, "repositoryUri"),
      FILE_PATH((short)3, "filePath"),
      CLIENT_ID((short)4, "clientID"),
      /**
       * 
       * @see SubscriptionDurability
       */
      DURABLE_EVENTS((short)5, "durableEvents");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // NAME
            return NAME;
          case 2: // REPOSITORY_URI
            return REPOSITORY_URI;
          case 3: // FILE_PATH
            return FILE_PATH;
          case 4: // CLIENT_ID
            return CLIENT_ID;
          case 5: // DURABLE_EVENTS
            return DURABLE_EVENTS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.REPOSITORY_URI, new org.apache.thrift.meta_data.FieldMetaData("repositoryUri", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.FILE_PATH, new org.apache.thrift.meta_data.FieldMetaData("filePath", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      tmpMap.put(_Fields.CLIENT_ID, new org.apache.thrift.meta_data.FieldMetaData("clientID", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.DURABLE_EVENTS, new org.apache.thrift.meta_data.FieldMetaData("durableEvents", org.apache.thrift.TFieldRequirementType.REQUIRED, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SubscriptionDurability.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(watchModelChanges_args.class, metaDataMap);
    }

    public watchModelChanges_args() {
    }

    public watchModelChanges_args(
      java.lang.String name,
      java.lang.String repositoryUri,
      java.util.List<java.lang.String> filePath,
      java.lang.String clientID,
      SubscriptionDurability durableEvents)
    {
      this();
      this.name = name;
      this.repositoryUri = repositoryUri;
      this.filePath = filePath;
      this.clientID = clientID;
      this.durableEvents = durableEvents;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public watchModelChanges_args(watchModelChanges_args other) {
      if (other.isSetName()) {
        this.name = other.name;
      }
      if (other.isSetRepositoryUri()) {
        this.repositoryUri = other.repositoryUri;
      }
      if (other.isSetFilePath()) {
        java.util.List<java.lang.String> __this__filePath = new java.util.ArrayList<java.lang.String>(other.filePath);
        this.filePath = __this__filePath;
      }
      if (other.isSetClientID()) {
        this.clientID = other.clientID;
      }
      if (other.isSetDurableEvents()) {
        this.durableEvents = other.durableEvents;
      }
    }

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

    @Override
    public void clear() {
      this.name = null;
      this.repositoryUri = null;
      this.filePath = null;
      this.clientID = null;
      this.durableEvents = null;
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getName() {
      return this.name;
    }

    public watchModelChanges_args setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
      this.name = name;
      return this;
    }

    public void unsetName() {
      this.name = null;
    }

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

    public void setNameIsSet(boolean value) {
      if (!value) {
        this.name = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getRepositoryUri() {
      return this.repositoryUri;
    }

    public watchModelChanges_args setRepositoryUri(@org.apache.thrift.annotation.Nullable java.lang.String repositoryUri) {
      this.repositoryUri = repositoryUri;
      return this;
    }

    public void unsetRepositoryUri() {
      this.repositoryUri = null;
    }

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

    public void setRepositoryUriIsSet(boolean value) {
      if (!value) {
        this.repositoryUri = null;
      }
    }

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

    @org.apache.thrift.annotation.Nullable
    public java.util.Iterator<java.lang.String> getFilePathIterator() {
      return (this.filePath == null) ? null : this.filePath.iterator();
    }

    public void addToFilePath(java.lang.String elem) {
      if (this.filePath == null) {
        this.filePath = new java.util.ArrayList<java.lang.String>();
      }
      this.filePath.add(elem);
    }

    @org.apache.thrift.annotation.Nullable
    public java.util.List<java.lang.String> getFilePath() {
      return this.filePath;
    }

    public watchModelChanges_args setFilePath(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> filePath) {
      this.filePath = filePath;
      return this;
    }

    public void unsetFilePath() {
      this.filePath = null;
    }

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

    public void setFilePathIsSet(boolean value) {
      if (!value) {
        this.filePath = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.String getClientID() {
      return this.clientID;
    }

    public watchModelChanges_args setClientID(@org.apache.thrift.annotation.Nullable java.lang.String clientID) {
      this.clientID = clientID;
      return this;
    }

    public void unsetClientID() {
      this.clientID = null;
    }

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

    public void setClientIDIsSet(boolean value) {
      if (!value) {
        this.clientID = null;
      }
    }

    /**
     * 
     * @see SubscriptionDurability
     */
    @org.apache.thrift.annotation.Nullable
    public SubscriptionDurability getDurableEvents() {
      return this.durableEvents;
    }

    /**
     * 
     * @see SubscriptionDurability
     */
    public watchModelChanges_args setDurableEvents(@org.apache.thrift.annotation.Nullable SubscriptionDurability durableEvents) {
      this.durableEvents = durableEvents;
      return this;
    }

    public void unsetDurableEvents() {
      this.durableEvents = null;
    }

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

    public void setDurableEventsIsSet(boolean value) {
      if (!value) {
        this.durableEvents = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case NAME:
        if (value == null) {
          unsetName();
        } else {
          setName((java.lang.String)value);
        }
        break;

      case REPOSITORY_URI:
        if (value == null) {
          unsetRepositoryUri();
        } else {
          setRepositoryUri((java.lang.String)value);
        }
        break;

      case FILE_PATH:
        if (value == null) {
          unsetFilePath();
        } else {
          setFilePath((java.util.List<java.lang.String>)value);
        }
        break;

      case CLIENT_ID:
        if (value == null) {
          unsetClientID();
        } else {
          setClientID((java.lang.String)value);
        }
        break;

      case DURABLE_EVENTS:
        if (value == null) {
          unsetDurableEvents();
        } else {
          setDurableEvents((SubscriptionDurability)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case NAME:
        return getName();

      case REPOSITORY_URI:
        return getRepositoryUri();

      case FILE_PATH:
        return getFilePath();

      case CLIENT_ID:
        return getClientID();

      case DURABLE_EVENTS:
        return getDurableEvents();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case NAME:
        return isSetName();
      case REPOSITORY_URI:
        return isSetRepositoryUri();
      case FILE_PATH:
        return isSetFilePath();
      case CLIENT_ID:
        return isSetClientID();
      case DURABLE_EVENTS:
        return isSetDurableEvents();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(watchModelChanges_args that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      boolean this_present_name = true && this.isSetName();
      boolean that_present_name = true && that.isSetName();
      if (this_present_name || that_present_name) {
        if (!(this_present_name && that_present_name))
          return false;
        if (!this.name.equals(that.name))
          return false;
      }

      boolean this_present_repositoryUri = true && this.isSetRepositoryUri();
      boolean that_present_repositoryUri = true && that.isSetRepositoryUri();
      if (this_present_repositoryUri || that_present_repositoryUri) {
        if (!(this_present_repositoryUri && that_present_repositoryUri))
          return false;
        if (!this.repositoryUri.equals(that.repositoryUri))
          return false;
      }

      boolean this_present_filePath = true && this.isSetFilePath();
      boolean that_present_filePath = true && that.isSetFilePath();
      if (this_present_filePath || that_present_filePath) {
        if (!(this_present_filePath && that_present_filePath))
          return false;
        if (!this.filePath.equals(that.filePath))
          return false;
      }

      boolean this_present_clientID = true && this.isSetClientID();
      boolean that_present_clientID = true && that.isSetClientID();
      if (this_present_clientID || that_present_clientID) {
        if (!(this_present_clientID && that_present_clientID))
          return false;
        if (!this.clientID.equals(that.clientID))
          return false;
      }

      boolean this_present_durableEvents = true && this.isSetDurableEvents();
      boolean that_present_durableEvents = true && that.isSetDurableEvents();
      if (this_present_durableEvents || that_present_durableEvents) {
        if (!(this_present_durableEvents && that_present_durableEvents))
          return false;
        if (!this.durableEvents.equals(that.durableEvents))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
      if (isSetName())
        hashCode = hashCode * 8191 + name.hashCode();

      hashCode = hashCode * 8191 + ((isSetRepositoryUri()) ? 131071 : 524287);
      if (isSetRepositoryUri())
        hashCode = hashCode * 8191 + repositoryUri.hashCode();

      hashCode = hashCode * 8191 + ((isSetFilePath()) ? 131071 : 524287);
      if (isSetFilePath())
        hashCode = hashCode * 8191 + filePath.hashCode();

      hashCode = hashCode * 8191 + ((isSetClientID()) ? 131071 : 524287);
      if (isSetClientID())
        hashCode = hashCode * 8191 + clientID.hashCode();

      hashCode = hashCode * 8191 + ((isSetDurableEvents()) ? 131071 : 524287);
      if (isSetDurableEvents())
        hashCode = hashCode * 8191 + durableEvents.getValue();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetRepositoryUri()).compareTo(other.isSetRepositoryUri());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRepositoryUri()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.repositoryUri, other.repositoryUri);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetFilePath()).compareTo(other.isSetFilePath());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFilePath()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filePath, other.filePath);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetClientID()).compareTo(other.isSetClientID());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetClientID()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.clientID, other.clientID);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetDurableEvents()).compareTo(other.isSetDurableEvents());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDurableEvents()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.durableEvents, other.durableEvents);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("watchModelChanges_args(");
      boolean first = true;

      sb.append("name:");
      if (this.name == null) {
        sb.append("null");
      } else {
        sb.append(this.name);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("repositoryUri:");
      if (this.repositoryUri == null) {
        sb.append("null");
      } else {
        sb.append(this.repositoryUri);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("filePath:");
      if (this.filePath == null) {
        sb.append("null");
      } else {
        sb.append(this.filePath);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("clientID:");
      if (this.clientID == null) {
        sb.append("null");
      } else {
        sb.append(this.clientID);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("durableEvents:");
      if (this.durableEvents == null) {
        sb.append("null");
      } else {
        sb.append(this.durableEvents);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
      if (name == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
      }
      if (repositoryUri == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'repositoryUri' was not present! Struct: " + toString());
      }
      if (filePath == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'filePath' was not present! Struct: " + toString());
      }
      if (clientID == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'clientID' was not present! Struct: " + toString());
      }
      if (durableEvents == null) {
        throw new org.apache.thrift.protocol.TProtocolException("Required field 'durableEvents' was not present! Struct: " + toString());
      }
      // 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, java.lang.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 watchModelChanges_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchModelChanges_argsStandardScheme getScheme() {
        return new watchModelChanges_argsStandardScheme();
      }
    }

    private static class watchModelChanges_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<watchModelChanges_args> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, watchModelChanges_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: // NAME
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.name = iprot.readString();
                struct.setNameIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // REPOSITORY_URI
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.repositoryUri = iprot.readString();
                struct.setRepositoryUriIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 3: // FILE_PATH
              if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                {
                  org.apache.thrift.protocol.TList _list410 = iprot.readListBegin();
                  struct.filePath = new java.util.ArrayList<java.lang.String>(_list410.size);
                  @org.apache.thrift.annotation.Nullable java.lang.String _elem411;
                  for (int _i412 = 0; _i412 < _list410.size; ++_i412)
                  {
                    _elem411 = iprot.readString();
                    struct.filePath.add(_elem411);
                  }
                  iprot.readListEnd();
                }
                struct.setFilePathIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 4: // CLIENT_ID
              if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                struct.clientID = iprot.readString();
                struct.setClientIDIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 5: // DURABLE_EVENTS
              if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                struct.durableEvents = org.eclipse.hawk.service.api.SubscriptionDurability.findByValue(iprot.readI32());
                struct.setDurableEventsIsSet(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, watchModelChanges_args struct) throws org.apache.thrift.TException {
        struct.validate();

        oprot.writeStructBegin(STRUCT_DESC);
        if (struct.name != null) {
          oprot.writeFieldBegin(NAME_FIELD_DESC);
          oprot.writeString(struct.name);
          oprot.writeFieldEnd();
        }
        if (struct.repositoryUri != null) {
          oprot.writeFieldBegin(REPOSITORY_URI_FIELD_DESC);
          oprot.writeString(struct.repositoryUri);
          oprot.writeFieldEnd();
        }
        if (struct.filePath != null) {
          oprot.writeFieldBegin(FILE_PATH_FIELD_DESC);
          {
            oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.filePath.size()));
            for (java.lang.String _iter413 : struct.filePath)
            {
              oprot.writeString(_iter413);
            }
            oprot.writeListEnd();
          }
          oprot.writeFieldEnd();
        }
        if (struct.clientID != null) {
          oprot.writeFieldBegin(CLIENT_ID_FIELD_DESC);
          oprot.writeString(struct.clientID);
          oprot.writeFieldEnd();
        }
        if (struct.durableEvents != null) {
          oprot.writeFieldBegin(DURABLE_EVENTS_FIELD_DESC);
          oprot.writeI32(struct.durableEvents.getValue());
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class watchModelChanges_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchModelChanges_argsTupleScheme getScheme() {
        return new watchModelChanges_argsTupleScheme();
      }
    }

    private static class watchModelChanges_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<watchModelChanges_args> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, watchModelChanges_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        oprot.writeString(struct.name);
        oprot.writeString(struct.repositoryUri);
        {
          oprot.writeI32(struct.filePath.size());
          for (java.lang.String _iter414 : struct.filePath)
          {
            oprot.writeString(_iter414);
          }
        }
        oprot.writeString(struct.clientID);
        oprot.writeI32(struct.durableEvents.getValue());
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, watchModelChanges_args struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        struct.name = iprot.readString();
        struct.setNameIsSet(true);
        struct.repositoryUri = iprot.readString();
        struct.setRepositoryUriIsSet(true);
        {
          org.apache.thrift.protocol.TList _list415 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
          struct.filePath = new java.util.ArrayList<java.lang.String>(_list415.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem416;
          for (int _i417 = 0; _i417 < _list415.size; ++_i417)
          {
            _elem416 = iprot.readString();
            struct.filePath.add(_elem416);
          }
        }
        struct.setFilePathIsSet(true);
        struct.clientID = iprot.readString();
        struct.setClientIDIsSet(true);
        struct.durableEvents = org.eclipse.hawk.service.api.SubscriptionDurability.findByValue(iprot.readI32());
        struct.setDurableEventsIsSet(true);
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

  public static class watchModelChanges_result implements org.apache.thrift.TBase<watchModelChanges_result, watchModelChanges_result._Fields>, java.io.Serializable, Cloneable, Comparable<watchModelChanges_result>   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("watchModelChanges_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 org.apache.thrift.protocol.TField ERR1_FIELD_DESC = new org.apache.thrift.protocol.TField("err1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ERR2_FIELD_DESC = new org.apache.thrift.protocol.TField("err2", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new watchModelChanges_resultStandardSchemeFactory();
    private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new watchModelChanges_resultTupleSchemeFactory();

    public @org.apache.thrift.annotation.Nullable Subscription success; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1; // required
    public @org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2; // 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"),
      ERR1((short)1, "err1"),
      ERR2((short)2, "err2");

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

      static {
        for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ERR1
            return ERR1;
          case 2: // ERR2
            return ERR2;
          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 java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      @org.apache.thrift.annotation.Nullable
      public static _Fields findByName(java.lang.String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final java.lang.String _fieldName;

      _Fields(short thriftId, java.lang.String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public java.lang.String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.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, Subscription.class)));
      tmpMap.put(_Fields.ERR1, new org.apache.thrift.meta_data.FieldMetaData("err1", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotFound.class)));
      tmpMap.put(_Fields.ERR2, new org.apache.thrift.meta_data.FieldMetaData("err2", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HawkInstanceNotRunning.class)));
      metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(watchModelChanges_result.class, metaDataMap);
    }

    public watchModelChanges_result() {
    }

    public watchModelChanges_result(
      Subscription success,
      HawkInstanceNotFound err1,
      HawkInstanceNotRunning err2)
    {
      this();
      this.success = success;
      this.err1 = err1;
      this.err2 = err2;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public watchModelChanges_result(watchModelChanges_result other) {
      if (other.isSetSuccess()) {
        this.success = new Subscription(other.success);
      }
      if (other.isSetErr1()) {
        this.err1 = new HawkInstanceNotFound(other.err1);
      }
      if (other.isSetErr2()) {
        this.err2 = new HawkInstanceNotRunning(other.err2);
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
      this.err1 = null;
      this.err2 = null;
    }

    @org.apache.thrift.annotation.Nullable
    public Subscription getSuccess() {
      return this.success;
    }

    public watchModelChanges_result setSuccess(@org.apache.thrift.annotation.Nullable Subscription 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;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotFound getErr1() {
      return this.err1;
    }

    public watchModelChanges_result setErr1(@org.apache.thrift.annotation.Nullable HawkInstanceNotFound err1) {
      this.err1 = err1;
      return this;
    }

    public void unsetErr1() {
      this.err1 = null;
    }

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

    public void setErr1IsSet(boolean value) {
      if (!value) {
        this.err1 = null;
      }
    }

    @org.apache.thrift.annotation.Nullable
    public HawkInstanceNotRunning getErr2() {
      return this.err2;
    }

    public watchModelChanges_result setErr2(@org.apache.thrift.annotation.Nullable HawkInstanceNotRunning err2) {
      this.err2 = err2;
      return this;
    }

    public void unsetErr2() {
      this.err2 = null;
    }

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

    public void setErr2IsSet(boolean value) {
      if (!value) {
        this.err2 = null;
      }
    }

    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Subscription)value);
        }
        break;

      case ERR1:
        if (value == null) {
          unsetErr1();
        } else {
          setErr1((HawkInstanceNotFound)value);
        }
        break;

      case ERR2:
        if (value == null) {
          unsetErr2();
        } else {
          setErr2((HawkInstanceNotRunning)value);
        }
        break;

      }
    }

    @org.apache.thrift.annotation.Nullable
    public java.lang.Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ERR1:
        return getErr1();

      case ERR2:
        return getErr2();

      }
      throw new java.lang.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 java.lang.IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ERR1:
        return isSetErr1();
      case ERR2:
        return isSetErr2();
      }
      throw new java.lang.IllegalStateException();
    }

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

    public boolean equals(watchModelChanges_result that) {
      if (that == null)
        return false;
      if (this == that)
        return true;

      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;
      }

      boolean this_present_err1 = true && this.isSetErr1();
      boolean that_present_err1 = true && that.isSetErr1();
      if (this_present_err1 || that_present_err1) {
        if (!(this_present_err1 && that_present_err1))
          return false;
        if (!this.err1.equals(that.err1))
          return false;
      }

      boolean this_present_err2 = true && this.isSetErr2();
      boolean that_present_err2 = true && that.isSetErr2();
      if (this_present_err2 || that_present_err2) {
        if (!(this_present_err2 && that_present_err2))
          return false;
        if (!this.err2.equals(that.err2))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      int hashCode = 1;

      hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
      if (isSetSuccess())
        hashCode = hashCode * 8191 + success.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr1()) ? 131071 : 524287);
      if (isSetErr1())
        hashCode = hashCode * 8191 + err1.hashCode();

      hashCode = hashCode * 8191 + ((isSetErr2()) ? 131071 : 524287);
      if (isSetErr2())
        hashCode = hashCode * 8191 + err2.hashCode();

      return hashCode;
    }

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

      int lastComparison = 0;

      lastComparison = java.lang.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 = java.lang.Boolean.valueOf(isSetErr1()).compareTo(other.isSetErr1());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr1()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err1, other.err1);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = java.lang.Boolean.valueOf(isSetErr2()).compareTo(other.isSetErr2());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetErr2()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.err2, other.err2);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    @org.apache.thrift.annotation.Nullable
    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 java.lang.String toString() {
      java.lang.StringBuilder sb = new java.lang.StringBuilder("watchModelChanges_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err1:");
      if (this.err1 == null) {
        sb.append("null");
      } else {
        sb.append(this.err1);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("err2:");
      if (this.err2 == null) {
        sb.append("null");
      } else {
        sb.append(this.err2);
      }
      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, java.lang.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 watchModelChanges_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchModelChanges_resultStandardScheme getScheme() {
        return new watchModelChanges_resultStandardScheme();
      }
    }

    private static class watchModelChanges_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<watchModelChanges_result> {

      public void read(org.apache.thrift.protocol.TProtocol iprot, watchModelChanges_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 Subscription();
                struct.success.read(iprot);
                struct.setSuccessIsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 1: // ERR1
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err1 = new HawkInstanceNotFound();
                struct.err1.read(iprot);
                struct.setErr1IsSet(true);
              } else { 
                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
              }
              break;
            case 2: // ERR2
              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
                struct.err2 = new HawkInstanceNotRunning();
                struct.err2.read(iprot);
                struct.setErr2IsSet(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, watchModelChanges_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();
        }
        if (struct.err1 != null) {
          oprot.writeFieldBegin(ERR1_FIELD_DESC);
          struct.err1.write(oprot);
          oprot.writeFieldEnd();
        }
        if (struct.err2 != null) {
          oprot.writeFieldBegin(ERR2_FIELD_DESC);
          struct.err2.write(oprot);
          oprot.writeFieldEnd();
        }
        oprot.writeFieldStop();
        oprot.writeStructEnd();
      }

    }

    private static class watchModelChanges_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
      public watchModelChanges_resultTupleScheme getScheme() {
        return new watchModelChanges_resultTupleScheme();
      }
    }

    private static class watchModelChanges_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<watchModelChanges_result> {

      @Override
      public void write(org.apache.thrift.protocol.TProtocol prot, watchModelChanges_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet optionals = new java.util.BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        if (struct.isSetErr1()) {
          optionals.set(1);
        }
        if (struct.isSetErr2()) {
          optionals.set(2);
        }
        oprot.writeBitSet(optionals, 3);
        if (struct.isSetSuccess()) {
          struct.success.write(oprot);
        }
        if (struct.isSetErr1()) {
          struct.err1.write(oprot);
        }
        if (struct.isSetErr2()) {
          struct.err2.write(oprot);
        }
      }

      @Override
      public void read(org.apache.thrift.protocol.TProtocol prot, watchModelChanges_result struct) throws org.apache.thrift.TException {
        org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
        java.util.BitSet incoming = iprot.readBitSet(3);
        if (incoming.get(0)) {
          struct.success = new Subscription();
          struct.success.read(iprot);
          struct.setSuccessIsSet(true);
        }
        if (incoming.get(1)) {
          struct.err1 = new HawkInstanceNotFound();
          struct.err1.read(iprot);
          struct.setErr1IsSet(true);
        }
        if (incoming.get(2)) {
          struct.err2 = new HawkInstanceNotRunning();
          struct.err2.read(iprot);
          struct.setErr2IsSet(true);
        }
      }
    }

    private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
      return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
    }
  }

}
