Subversion Repositories SmartDukaan

Rev

Rev 5909 | Rev 8370 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/**
 * Autogenerated by Thrift Compiler (0.7.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package in.shop2020.crm;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class CRMService {

  public interface Iface extends in.shop2020.generic.GenericService.Iface {

    public List<Ticket> getTickets(SearchFilter searchFilter) throws org.apache.thrift.TException;

    public List<Ticket> getUnassignedTickets() throws org.apache.thrift.TException;

    public void updateTicket(Ticket ticket, Activity activity) throws org.apache.thrift.TException;

    public long insertTicket(Ticket ticket, Activity activity) throws org.apache.thrift.TException;

    public void unassignAgentTickets(int assigneeId) throws org.apache.thrift.TException;

    public List<Activity> getActivities(SearchFilter searchFilter) throws org.apache.thrift.TException;

    public long insertActivity(Activity activity) throws org.apache.thrift.TException;

    public void markAsRead(long activityId, long agentId) throws org.apache.thrift.TException;

    public List<Agent> getAgents(SearchFilter searchFilter) throws org.apache.thrift.TException;

    public List<Agent> getInactiveAgents(SearchFilter searchFilter) throws org.apache.thrift.TException;

    public void updatePasswordForAgent(String agentEmailId, String password) throws org.apache.thrift.TException;

    public List<String> getRoleNamesForAgent(String agentEmailId) throws org.apache.thrift.TException;

    public List<String> getPermissionsForRoleName(String roleName) throws org.apache.thrift.TException;

    public long getLastEmailProcessedTimestamp() throws org.apache.thrift.TException;

    public void updateLastEmailProcessedTimestamp(long timestamp) throws org.apache.thrift.TException;

    public void changeAgentStatus(boolean status, String emailId) throws org.apache.thrift.TException;

    public void insertAgent(Agent agent, List<String> role) throws org.apache.thrift.TException;

    public void changeAgentRole(long id, List<String> role) throws org.apache.thrift.TException;

    public int getOpenTicketCountForAgent(long agentId) throws org.apache.thrift.TException;

    public Map<String,Long> getOpenTicketsMap() throws org.apache.thrift.TException;

  }

  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {

    public void getTickets(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getTickets_call> resultHandler) throws org.apache.thrift.TException;

    public void getUnassignedTickets(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getUnassignedTickets_call> resultHandler) throws org.apache.thrift.TException;

    public void updateTicket(Ticket ticket, Activity activity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateTicket_call> resultHandler) throws org.apache.thrift.TException;

    public void insertTicket(Ticket ticket, Activity activity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.insertTicket_call> resultHandler) throws org.apache.thrift.TException;

    public void unassignAgentTickets(int assigneeId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.unassignAgentTickets_call> resultHandler) throws org.apache.thrift.TException;

    public void getActivities(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActivities_call> resultHandler) throws org.apache.thrift.TException;

    public void insertActivity(Activity activity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.insertActivity_call> resultHandler) throws org.apache.thrift.TException;

    public void markAsRead(long activityId, long agentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markAsRead_call> resultHandler) throws org.apache.thrift.TException;

    public void getAgents(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAgents_call> resultHandler) throws org.apache.thrift.TException;

    public void getInactiveAgents(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInactiveAgents_call> resultHandler) throws org.apache.thrift.TException;

    public void updatePasswordForAgent(String agentEmailId, String password, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updatePasswordForAgent_call> resultHandler) throws org.apache.thrift.TException;

    public void getRoleNamesForAgent(String agentEmailId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getRoleNamesForAgent_call> resultHandler) throws org.apache.thrift.TException;

    public void getPermissionsForRoleName(String roleName, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPermissionsForRoleName_call> resultHandler) throws org.apache.thrift.TException;

    public void getLastEmailProcessedTimestamp(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLastEmailProcessedTimestamp_call> resultHandler) throws org.apache.thrift.TException;

    public void updateLastEmailProcessedTimestamp(long timestamp, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateLastEmailProcessedTimestamp_call> resultHandler) throws org.apache.thrift.TException;

    public void changeAgentStatus(boolean status, String emailId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeAgentStatus_call> resultHandler) throws org.apache.thrift.TException;

    public void insertAgent(Agent agent, List<String> role, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.insertAgent_call> resultHandler) throws org.apache.thrift.TException;

    public void changeAgentRole(long id, List<String> role, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.changeAgentRole_call> resultHandler) throws org.apache.thrift.TException;

    public void getOpenTicketCountForAgent(long agentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOpenTicketCountForAgent_call> resultHandler) throws org.apache.thrift.TException;

    public void getOpenTicketsMap(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOpenTicketsMap_call> resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends in.shop2020.generic.GenericService.Client 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 List<Ticket> getTickets(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      send_getTickets(searchFilter);
      return recv_getTickets();
    }

    public void send_getTickets(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      getTickets_args args = new getTickets_args();
      args.setSearchFilter(searchFilter);
      sendBase("getTickets", args);
    }

    public List<Ticket> recv_getTickets() throws org.apache.thrift.TException
    {
      getTickets_result result = new getTickets_result();
      receiveBase(result, "getTickets");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTickets failed: unknown result");
    }

    public List<Ticket> getUnassignedTickets() throws org.apache.thrift.TException
    {
      send_getUnassignedTickets();
      return recv_getUnassignedTickets();
    }

    public void send_getUnassignedTickets() throws org.apache.thrift.TException
    {
      getUnassignedTickets_args args = new getUnassignedTickets_args();
      sendBase("getUnassignedTickets", args);
    }

    public List<Ticket> recv_getUnassignedTickets() throws org.apache.thrift.TException
    {
      getUnassignedTickets_result result = new getUnassignedTickets_result();
      receiveBase(result, "getUnassignedTickets");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUnassignedTickets failed: unknown result");
    }

    public void updateTicket(Ticket ticket, Activity activity) throws org.apache.thrift.TException
    {
      send_updateTicket(ticket, activity);
      recv_updateTicket();
    }

    public void send_updateTicket(Ticket ticket, Activity activity) throws org.apache.thrift.TException
    {
      updateTicket_args args = new updateTicket_args();
      args.setTicket(ticket);
      args.setActivity(activity);
      sendBase("updateTicket", args);
    }

    public void recv_updateTicket() throws org.apache.thrift.TException
    {
      updateTicket_result result = new updateTicket_result();
      receiveBase(result, "updateTicket");
      return;
    }

    public long insertTicket(Ticket ticket, Activity activity) throws org.apache.thrift.TException
    {
      send_insertTicket(ticket, activity);
      return recv_insertTicket();
    }

    public void send_insertTicket(Ticket ticket, Activity activity) throws org.apache.thrift.TException
    {
      insertTicket_args args = new insertTicket_args();
      args.setTicket(ticket);
      args.setActivity(activity);
      sendBase("insertTicket", args);
    }

    public long recv_insertTicket() throws org.apache.thrift.TException
    {
      insertTicket_result result = new insertTicket_result();
      receiveBase(result, "insertTicket");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertTicket failed: unknown result");
    }

    public void unassignAgentTickets(int assigneeId) throws org.apache.thrift.TException
    {
      send_unassignAgentTickets(assigneeId);
      recv_unassignAgentTickets();
    }

    public void send_unassignAgentTickets(int assigneeId) throws org.apache.thrift.TException
    {
      unassignAgentTickets_args args = new unassignAgentTickets_args();
      args.setAssigneeId(assigneeId);
      sendBase("unassignAgentTickets", args);
    }

    public void recv_unassignAgentTickets() throws org.apache.thrift.TException
    {
      unassignAgentTickets_result result = new unassignAgentTickets_result();
      receiveBase(result, "unassignAgentTickets");
      return;
    }

    public List<Activity> getActivities(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      send_getActivities(searchFilter);
      return recv_getActivities();
    }

    public void send_getActivities(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      getActivities_args args = new getActivities_args();
      args.setSearchFilter(searchFilter);
      sendBase("getActivities", args);
    }

    public List<Activity> recv_getActivities() throws org.apache.thrift.TException
    {
      getActivities_result result = new getActivities_result();
      receiveBase(result, "getActivities");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActivities failed: unknown result");
    }

    public long insertActivity(Activity activity) throws org.apache.thrift.TException
    {
      send_insertActivity(activity);
      return recv_insertActivity();
    }

    public void send_insertActivity(Activity activity) throws org.apache.thrift.TException
    {
      insertActivity_args args = new insertActivity_args();
      args.setActivity(activity);
      sendBase("insertActivity", args);
    }

    public long recv_insertActivity() throws org.apache.thrift.TException
    {
      insertActivity_result result = new insertActivity_result();
      receiveBase(result, "insertActivity");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertActivity failed: unknown result");
    }

    public void markAsRead(long activityId, long agentId) throws org.apache.thrift.TException
    {
      send_markAsRead(activityId, agentId);
      recv_markAsRead();
    }

    public void send_markAsRead(long activityId, long agentId) throws org.apache.thrift.TException
    {
      markAsRead_args args = new markAsRead_args();
      args.setActivityId(activityId);
      args.setAgentId(agentId);
      sendBase("markAsRead", args);
    }

    public void recv_markAsRead() throws org.apache.thrift.TException
    {
      markAsRead_result result = new markAsRead_result();
      receiveBase(result, "markAsRead");
      return;
    }

    public List<Agent> getAgents(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      send_getAgents(searchFilter);
      return recv_getAgents();
    }

    public void send_getAgents(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      getAgents_args args = new getAgents_args();
      args.setSearchFilter(searchFilter);
      sendBase("getAgents", args);
    }

    public List<Agent> recv_getAgents() throws org.apache.thrift.TException
    {
      getAgents_result result = new getAgents_result();
      receiveBase(result, "getAgents");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAgents failed: unknown result");
    }

    public List<Agent> getInactiveAgents(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      send_getInactiveAgents(searchFilter);
      return recv_getInactiveAgents();
    }

    public void send_getInactiveAgents(SearchFilter searchFilter) throws org.apache.thrift.TException
    {
      getInactiveAgents_args args = new getInactiveAgents_args();
      args.setSearchFilter(searchFilter);
      sendBase("getInactiveAgents", args);
    }

    public List<Agent> recv_getInactiveAgents() throws org.apache.thrift.TException
    {
      getInactiveAgents_result result = new getInactiveAgents_result();
      receiveBase(result, "getInactiveAgents");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInactiveAgents failed: unknown result");
    }

    public void updatePasswordForAgent(String agentEmailId, String password) throws org.apache.thrift.TException
    {
      send_updatePasswordForAgent(agentEmailId, password);
      recv_updatePasswordForAgent();
    }

    public void send_updatePasswordForAgent(String agentEmailId, String password) throws org.apache.thrift.TException
    {
      updatePasswordForAgent_args args = new updatePasswordForAgent_args();
      args.setAgentEmailId(agentEmailId);
      args.setPassword(password);
      sendBase("updatePasswordForAgent", args);
    }

    public void recv_updatePasswordForAgent() throws org.apache.thrift.TException
    {
      updatePasswordForAgent_result result = new updatePasswordForAgent_result();
      receiveBase(result, "updatePasswordForAgent");
      return;
    }

    public List<String> getRoleNamesForAgent(String agentEmailId) throws org.apache.thrift.TException
    {
      send_getRoleNamesForAgent(agentEmailId);
      return recv_getRoleNamesForAgent();
    }

    public void send_getRoleNamesForAgent(String agentEmailId) throws org.apache.thrift.TException
    {
      getRoleNamesForAgent_args args = new getRoleNamesForAgent_args();
      args.setAgentEmailId(agentEmailId);
      sendBase("getRoleNamesForAgent", args);
    }

    public List<String> recv_getRoleNamesForAgent() throws org.apache.thrift.TException
    {
      getRoleNamesForAgent_result result = new getRoleNamesForAgent_result();
      receiveBase(result, "getRoleNamesForAgent");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRoleNamesForAgent failed: unknown result");
    }

    public List<String> getPermissionsForRoleName(String roleName) throws org.apache.thrift.TException
    {
      send_getPermissionsForRoleName(roleName);
      return recv_getPermissionsForRoleName();
    }

    public void send_getPermissionsForRoleName(String roleName) throws org.apache.thrift.TException
    {
      getPermissionsForRoleName_args args = new getPermissionsForRoleName_args();
      args.setRoleName(roleName);
      sendBase("getPermissionsForRoleName", args);
    }

    public List<String> recv_getPermissionsForRoleName() throws org.apache.thrift.TException
    {
      getPermissionsForRoleName_result result = new getPermissionsForRoleName_result();
      receiveBase(result, "getPermissionsForRoleName");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPermissionsForRoleName failed: unknown result");
    }

    public long getLastEmailProcessedTimestamp() throws org.apache.thrift.TException
    {
      send_getLastEmailProcessedTimestamp();
      return recv_getLastEmailProcessedTimestamp();
    }

    public void send_getLastEmailProcessedTimestamp() throws org.apache.thrift.TException
    {
      getLastEmailProcessedTimestamp_args args = new getLastEmailProcessedTimestamp_args();
      sendBase("getLastEmailProcessedTimestamp", args);
    }

    public long recv_getLastEmailProcessedTimestamp() throws org.apache.thrift.TException
    {
      getLastEmailProcessedTimestamp_result result = new getLastEmailProcessedTimestamp_result();
      receiveBase(result, "getLastEmailProcessedTimestamp");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLastEmailProcessedTimestamp failed: unknown result");
    }

    public void updateLastEmailProcessedTimestamp(long timestamp) throws org.apache.thrift.TException
    {
      send_updateLastEmailProcessedTimestamp(timestamp);
      recv_updateLastEmailProcessedTimestamp();
    }

    public void send_updateLastEmailProcessedTimestamp(long timestamp) throws org.apache.thrift.TException
    {
      updateLastEmailProcessedTimestamp_args args = new updateLastEmailProcessedTimestamp_args();
      args.setTimestamp(timestamp);
      sendBase("updateLastEmailProcessedTimestamp", args);
    }

    public void recv_updateLastEmailProcessedTimestamp() throws org.apache.thrift.TException
    {
      updateLastEmailProcessedTimestamp_result result = new updateLastEmailProcessedTimestamp_result();
      receiveBase(result, "updateLastEmailProcessedTimestamp");
      return;
    }

    public void changeAgentStatus(boolean status, String emailId) throws org.apache.thrift.TException
    {
      send_changeAgentStatus(status, emailId);
      recv_changeAgentStatus();
    }

    public void send_changeAgentStatus(boolean status, String emailId) throws org.apache.thrift.TException
    {
      changeAgentStatus_args args = new changeAgentStatus_args();
      args.setStatus(status);
      args.setEmailId(emailId);
      sendBase("changeAgentStatus", args);
    }

    public void recv_changeAgentStatus() throws org.apache.thrift.TException
    {
      changeAgentStatus_result result = new changeAgentStatus_result();
      receiveBase(result, "changeAgentStatus");
      return;
    }

    public void insertAgent(Agent agent, List<String> role) throws org.apache.thrift.TException
    {
      send_insertAgent(agent, role);
      recv_insertAgent();
    }

    public void send_insertAgent(Agent agent, List<String> role) throws org.apache.thrift.TException
    {
      insertAgent_args args = new insertAgent_args();
      args.setAgent(agent);
      args.setRole(role);
      sendBase("insertAgent", args);
    }

    public void recv_insertAgent() throws org.apache.thrift.TException
    {
      insertAgent_result result = new insertAgent_result();
      receiveBase(result, "insertAgent");
      return;
    }

    public void changeAgentRole(long id, List<String> role) throws org.apache.thrift.TException
    {
      send_changeAgentRole(id, role);
      recv_changeAgentRole();
    }

    public void send_changeAgentRole(long id, List<String> role) throws org.apache.thrift.TException
    {
      changeAgentRole_args args = new changeAgentRole_args();
      args.setId(id);
      args.setRole(role);
      sendBase("changeAgentRole", args);
    }

    public void recv_changeAgentRole() throws org.apache.thrift.TException
    {
      changeAgentRole_result result = new changeAgentRole_result();
      receiveBase(result, "changeAgentRole");
      return;
    }

    public int getOpenTicketCountForAgent(long agentId) throws org.apache.thrift.TException
    {
      send_getOpenTicketCountForAgent(agentId);
      return recv_getOpenTicketCountForAgent();
    }

    public void send_getOpenTicketCountForAgent(long agentId) throws org.apache.thrift.TException
    {
      getOpenTicketCountForAgent_args args = new getOpenTicketCountForAgent_args();
      args.setAgentId(agentId);
      sendBase("getOpenTicketCountForAgent", args);
    }

    public int recv_getOpenTicketCountForAgent() throws org.apache.thrift.TException
    {
      getOpenTicketCountForAgent_result result = new getOpenTicketCountForAgent_result();
      receiveBase(result, "getOpenTicketCountForAgent");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOpenTicketCountForAgent failed: unknown result");
    }

    public Map<String,Long> getOpenTicketsMap() throws org.apache.thrift.TException
    {
      send_getOpenTicketsMap();
      return recv_getOpenTicketsMap();
    }

    public void send_getOpenTicketsMap() throws org.apache.thrift.TException
    {
      getOpenTicketsMap_args args = new getOpenTicketsMap_args();
      sendBase("getOpenTicketsMap", args);
    }

    public Map<String,Long> recv_getOpenTicketsMap() throws org.apache.thrift.TException
    {
      getOpenTicketsMap_result result = new getOpenTicketsMap_result();
      receiveBase(result, "getOpenTicketsMap");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOpenTicketsMap failed: unknown result");
    }

  }
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient 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 getTickets(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getTickets_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getTickets_call method_call = new getTickets_call(searchFilter, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getTickets_call extends org.apache.thrift.async.TAsyncMethodCall {
      private SearchFilter searchFilter;
      public getTickets_call(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getTickets_call> 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.searchFilter = searchFilter;
      }

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

      public List<Ticket> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getTickets();
      }
    }

    public void getUnassignedTickets(org.apache.thrift.async.AsyncMethodCallback<getUnassignedTickets_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getUnassignedTickets_call method_call = new getUnassignedTickets_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getUnassignedTickets_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getUnassignedTickets_call(org.apache.thrift.async.AsyncMethodCallback<getUnassignedTickets_call> 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("getUnassignedTickets", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getUnassignedTickets_args args = new getUnassignedTickets_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Ticket> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getUnassignedTickets();
      }
    }

    public void updateTicket(Ticket ticket, Activity activity, org.apache.thrift.async.AsyncMethodCallback<updateTicket_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateTicket_call method_call = new updateTicket_call(ticket, activity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateTicket_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Ticket ticket;
      private Activity activity;
      public updateTicket_call(Ticket ticket, Activity activity, org.apache.thrift.async.AsyncMethodCallback<updateTicket_call> 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.ticket = ticket;
        this.activity = activity;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateTicket", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateTicket_args args = new updateTicket_args();
        args.setTicket(ticket);
        args.setActivity(activity);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateTicket();
      }
    }

    public void insertTicket(Ticket ticket, Activity activity, org.apache.thrift.async.AsyncMethodCallback<insertTicket_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      insertTicket_call method_call = new insertTicket_call(ticket, activity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class insertTicket_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Ticket ticket;
      private Activity activity;
      public insertTicket_call(Ticket ticket, Activity activity, org.apache.thrift.async.AsyncMethodCallback<insertTicket_call> 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.ticket = ticket;
        this.activity = activity;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertTicket", org.apache.thrift.protocol.TMessageType.CALL, 0));
        insertTicket_args args = new insertTicket_args();
        args.setTicket(ticket);
        args.setActivity(activity);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_insertTicket();
      }
    }

    public void unassignAgentTickets(int assigneeId, org.apache.thrift.async.AsyncMethodCallback<unassignAgentTickets_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      unassignAgentTickets_call method_call = new unassignAgentTickets_call(assigneeId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class unassignAgentTickets_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int assigneeId;
      public unassignAgentTickets_call(int assigneeId, org.apache.thrift.async.AsyncMethodCallback<unassignAgentTickets_call> 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.assigneeId = assigneeId;
      }

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

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_unassignAgentTickets();
      }
    }

    public void getActivities(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getActivities_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getActivities_call method_call = new getActivities_call(searchFilter, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getActivities_call extends org.apache.thrift.async.TAsyncMethodCall {
      private SearchFilter searchFilter;
      public getActivities_call(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getActivities_call> 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.searchFilter = searchFilter;
      }

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

      public List<Activity> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getActivities();
      }
    }

    public void insertActivity(Activity activity, org.apache.thrift.async.AsyncMethodCallback<insertActivity_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      insertActivity_call method_call = new insertActivity_call(activity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class insertActivity_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Activity activity;
      public insertActivity_call(Activity activity, org.apache.thrift.async.AsyncMethodCallback<insertActivity_call> 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.activity = activity;
      }

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

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_insertActivity();
      }
    }

    public void markAsRead(long activityId, long agentId, org.apache.thrift.async.AsyncMethodCallback<markAsRead_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      markAsRead_call method_call = new markAsRead_call(activityId, agentId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class markAsRead_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long activityId;
      private long agentId;
      public markAsRead_call(long activityId, long agentId, org.apache.thrift.async.AsyncMethodCallback<markAsRead_call> 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.activityId = activityId;
        this.agentId = agentId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markAsRead", org.apache.thrift.protocol.TMessageType.CALL, 0));
        markAsRead_args args = new markAsRead_args();
        args.setActivityId(activityId);
        args.setAgentId(agentId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_markAsRead();
      }
    }

    public void getAgents(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getAgents_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAgents_call method_call = new getAgents_call(searchFilter, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAgents_call extends org.apache.thrift.async.TAsyncMethodCall {
      private SearchFilter searchFilter;
      public getAgents_call(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getAgents_call> 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.searchFilter = searchFilter;
      }

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

      public List<Agent> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAgents();
      }
    }

    public void getInactiveAgents(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getInactiveAgents_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getInactiveAgents_call method_call = new getInactiveAgents_call(searchFilter, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getInactiveAgents_call extends org.apache.thrift.async.TAsyncMethodCall {
      private SearchFilter searchFilter;
      public getInactiveAgents_call(SearchFilter searchFilter, org.apache.thrift.async.AsyncMethodCallback<getInactiveAgents_call> 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.searchFilter = searchFilter;
      }

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

      public List<Agent> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getInactiveAgents();
      }
    }

    public void updatePasswordForAgent(String agentEmailId, String password, org.apache.thrift.async.AsyncMethodCallback<updatePasswordForAgent_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updatePasswordForAgent_call method_call = new updatePasswordForAgent_call(agentEmailId, password, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updatePasswordForAgent_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String agentEmailId;
      private String password;
      public updatePasswordForAgent_call(String agentEmailId, String password, org.apache.thrift.async.AsyncMethodCallback<updatePasswordForAgent_call> 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.agentEmailId = agentEmailId;
        this.password = password;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePasswordForAgent", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updatePasswordForAgent_args args = new updatePasswordForAgent_args();
        args.setAgentEmailId(agentEmailId);
        args.setPassword(password);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updatePasswordForAgent();
      }
    }

    public void getRoleNamesForAgent(String agentEmailId, org.apache.thrift.async.AsyncMethodCallback<getRoleNamesForAgent_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getRoleNamesForAgent_call method_call = new getRoleNamesForAgent_call(agentEmailId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getRoleNamesForAgent_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String agentEmailId;
      public getRoleNamesForAgent_call(String agentEmailId, org.apache.thrift.async.AsyncMethodCallback<getRoleNamesForAgent_call> 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.agentEmailId = agentEmailId;
      }

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

      public List<String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getRoleNamesForAgent();
      }
    }

    public void getPermissionsForRoleName(String roleName, org.apache.thrift.async.AsyncMethodCallback<getPermissionsForRoleName_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getPermissionsForRoleName_call method_call = new getPermissionsForRoleName_call(roleName, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getPermissionsForRoleName_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String roleName;
      public getPermissionsForRoleName_call(String roleName, org.apache.thrift.async.AsyncMethodCallback<getPermissionsForRoleName_call> 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.roleName = roleName;
      }

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

      public List<String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getPermissionsForRoleName();
      }
    }

    public void getLastEmailProcessedTimestamp(org.apache.thrift.async.AsyncMethodCallback<getLastEmailProcessedTimestamp_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLastEmailProcessedTimestamp_call method_call = new getLastEmailProcessedTimestamp_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLastEmailProcessedTimestamp_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getLastEmailProcessedTimestamp_call(org.apache.thrift.async.AsyncMethodCallback<getLastEmailProcessedTimestamp_call> 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("getLastEmailProcessedTimestamp", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLastEmailProcessedTimestamp_args args = new getLastEmailProcessedTimestamp_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getLastEmailProcessedTimestamp();
      }
    }

    public void updateLastEmailProcessedTimestamp(long timestamp, org.apache.thrift.async.AsyncMethodCallback<updateLastEmailProcessedTimestamp_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateLastEmailProcessedTimestamp_call method_call = new updateLastEmailProcessedTimestamp_call(timestamp, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateLastEmailProcessedTimestamp_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long timestamp;
      public updateLastEmailProcessedTimestamp_call(long timestamp, org.apache.thrift.async.AsyncMethodCallback<updateLastEmailProcessedTimestamp_call> 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.timestamp = timestamp;
      }

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

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateLastEmailProcessedTimestamp();
      }
    }

    public void changeAgentStatus(boolean status, String emailId, org.apache.thrift.async.AsyncMethodCallback<changeAgentStatus_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      changeAgentStatus_call method_call = new changeAgentStatus_call(status, emailId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class changeAgentStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
      private boolean status;
      private String emailId;
      public changeAgentStatus_call(boolean status, String emailId, org.apache.thrift.async.AsyncMethodCallback<changeAgentStatus_call> 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.status = status;
        this.emailId = emailId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeAgentStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
        changeAgentStatus_args args = new changeAgentStatus_args();
        args.setStatus(status);
        args.setEmailId(emailId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_changeAgentStatus();
      }
    }

    public void insertAgent(Agent agent, List<String> role, org.apache.thrift.async.AsyncMethodCallback<insertAgent_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      insertAgent_call method_call = new insertAgent_call(agent, role, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class insertAgent_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Agent agent;
      private List<String> role;
      public insertAgent_call(Agent agent, List<String> role, org.apache.thrift.async.AsyncMethodCallback<insertAgent_call> 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.agent = agent;
        this.role = role;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertAgent", org.apache.thrift.protocol.TMessageType.CALL, 0));
        insertAgent_args args = new insertAgent_args();
        args.setAgent(agent);
        args.setRole(role);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_insertAgent();
      }
    }

    public void changeAgentRole(long id, List<String> role, org.apache.thrift.async.AsyncMethodCallback<changeAgentRole_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      changeAgentRole_call method_call = new changeAgentRole_call(id, role, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class changeAgentRole_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      private List<String> role;
      public changeAgentRole_call(long id, List<String> role, org.apache.thrift.async.AsyncMethodCallback<changeAgentRole_call> 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.id = id;
        this.role = role;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("changeAgentRole", org.apache.thrift.protocol.TMessageType.CALL, 0));
        changeAgentRole_args args = new changeAgentRole_args();
        args.setId(id);
        args.setRole(role);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_changeAgentRole();
      }
    }

    public void getOpenTicketCountForAgent(long agentId, org.apache.thrift.async.AsyncMethodCallback<getOpenTicketCountForAgent_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getOpenTicketCountForAgent_call method_call = new getOpenTicketCountForAgent_call(agentId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getOpenTicketCountForAgent_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long agentId;
      public getOpenTicketCountForAgent_call(long agentId, org.apache.thrift.async.AsyncMethodCallback<getOpenTicketCountForAgent_call> 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.agentId = agentId;
      }

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

      public int getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getOpenTicketCountForAgent();
      }
    }

    public void getOpenTicketsMap(org.apache.thrift.async.AsyncMethodCallback<getOpenTicketsMap_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getOpenTicketsMap_call method_call = new getOpenTicketsMap_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getOpenTicketsMap_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getOpenTicketsMap_call(org.apache.thrift.async.AsyncMethodCallback<getOpenTicketsMap_call> 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("getOpenTicketsMap", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getOpenTicketsMap_args args = new getOpenTicketsMap_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<String,Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getOpenTicketsMap();
      }
    }

  }

  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

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

    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("getTickets", new getTickets());
      processMap.put("getUnassignedTickets", new getUnassignedTickets());
      processMap.put("updateTicket", new updateTicket());
      processMap.put("insertTicket", new insertTicket());
      processMap.put("unassignAgentTickets", new unassignAgentTickets());
      processMap.put("getActivities", new getActivities());
      processMap.put("insertActivity", new insertActivity());
      processMap.put("markAsRead", new markAsRead());
      processMap.put("getAgents", new getAgents());
      processMap.put("getInactiveAgents", new getInactiveAgents());
      processMap.put("updatePasswordForAgent", new updatePasswordForAgent());
      processMap.put("getRoleNamesForAgent", new getRoleNamesForAgent());
      processMap.put("getPermissionsForRoleName", new getPermissionsForRoleName());
      processMap.put("getLastEmailProcessedTimestamp", new getLastEmailProcessedTimestamp());
      processMap.put("updateLastEmailProcessedTimestamp", new updateLastEmailProcessedTimestamp());
      processMap.put("changeAgentStatus", new changeAgentStatus());
      processMap.put("insertAgent", new insertAgent());
      processMap.put("changeAgentRole", new changeAgentRole());
      processMap.put("getOpenTicketCountForAgent", new getOpenTicketCountForAgent());
      processMap.put("getOpenTicketsMap", new getOpenTicketsMap());
      return processMap;
    }

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

      protected getTickets_args getEmptyArgsInstance() {
        return new getTickets_args();
      }

      protected getTickets_result getResult(I iface, getTickets_args args) throws org.apache.thrift.TException {
        getTickets_result result = new getTickets_result();
        result.success = iface.getTickets(args.searchFilter);
        return result;
      }
    }

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

      protected getUnassignedTickets_args getEmptyArgsInstance() {
        return new getUnassignedTickets_args();
      }

      protected getUnassignedTickets_result getResult(I iface, getUnassignedTickets_args args) throws org.apache.thrift.TException {
        getUnassignedTickets_result result = new getUnassignedTickets_result();
        result.success = iface.getUnassignedTickets();
        return result;
      }
    }

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

      protected updateTicket_args getEmptyArgsInstance() {
        return new updateTicket_args();
      }

      protected updateTicket_result getResult(I iface, updateTicket_args args) throws org.apache.thrift.TException {
        updateTicket_result result = new updateTicket_result();
        iface.updateTicket(args.ticket, args.activity);
        return result;
      }
    }

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

      protected insertTicket_args getEmptyArgsInstance() {
        return new insertTicket_args();
      }

      protected insertTicket_result getResult(I iface, insertTicket_args args) throws org.apache.thrift.TException {
        insertTicket_result result = new insertTicket_result();
        result.success = iface.insertTicket(args.ticket, args.activity);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

      protected unassignAgentTickets_args getEmptyArgsInstance() {
        return new unassignAgentTickets_args();
      }

      protected unassignAgentTickets_result getResult(I iface, unassignAgentTickets_args args) throws org.apache.thrift.TException {
        unassignAgentTickets_result result = new unassignAgentTickets_result();
        iface.unassignAgentTickets(args.assigneeId);
        return result;
      }
    }

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

      protected getActivities_args getEmptyArgsInstance() {
        return new getActivities_args();
      }

      protected getActivities_result getResult(I iface, getActivities_args args) throws org.apache.thrift.TException {
        getActivities_result result = new getActivities_result();
        result.success = iface.getActivities(args.searchFilter);
        return result;
      }
    }

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

      protected insertActivity_args getEmptyArgsInstance() {
        return new insertActivity_args();
      }

      protected insertActivity_result getResult(I iface, insertActivity_args args) throws org.apache.thrift.TException {
        insertActivity_result result = new insertActivity_result();
        result.success = iface.insertActivity(args.activity);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

      protected markAsRead_args getEmptyArgsInstance() {
        return new markAsRead_args();
      }

      protected markAsRead_result getResult(I iface, markAsRead_args args) throws org.apache.thrift.TException {
        markAsRead_result result = new markAsRead_result();
        iface.markAsRead(args.activityId, args.agentId);
        return result;
      }
    }

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

      protected getAgents_args getEmptyArgsInstance() {
        return new getAgents_args();
      }

      protected getAgents_result getResult(I iface, getAgents_args args) throws org.apache.thrift.TException {
        getAgents_result result = new getAgents_result();
        result.success = iface.getAgents(args.searchFilter);
        return result;
      }
    }

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

      protected getInactiveAgents_args getEmptyArgsInstance() {
        return new getInactiveAgents_args();
      }

      protected getInactiveAgents_result getResult(I iface, getInactiveAgents_args args) throws org.apache.thrift.TException {
        getInactiveAgents_result result = new getInactiveAgents_result();
        result.success = iface.getInactiveAgents(args.searchFilter);
        return result;
      }
    }

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

      protected updatePasswordForAgent_args getEmptyArgsInstance() {
        return new updatePasswordForAgent_args();
      }

      protected updatePasswordForAgent_result getResult(I iface, updatePasswordForAgent_args args) throws org.apache.thrift.TException {
        updatePasswordForAgent_result result = new updatePasswordForAgent_result();
        iface.updatePasswordForAgent(args.agentEmailId, args.password);
        return result;
      }
    }

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

      protected getRoleNamesForAgent_args getEmptyArgsInstance() {
        return new getRoleNamesForAgent_args();
      }

      protected getRoleNamesForAgent_result getResult(I iface, getRoleNamesForAgent_args args) throws org.apache.thrift.TException {
        getRoleNamesForAgent_result result = new getRoleNamesForAgent_result();
        result.success = iface.getRoleNamesForAgent(args.agentEmailId);
        return result;
      }
    }

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

      protected getPermissionsForRoleName_args getEmptyArgsInstance() {
        return new getPermissionsForRoleName_args();
      }

      protected getPermissionsForRoleName_result getResult(I iface, getPermissionsForRoleName_args args) throws org.apache.thrift.TException {
        getPermissionsForRoleName_result result = new getPermissionsForRoleName_result();
        result.success = iface.getPermissionsForRoleName(args.roleName);
        return result;
      }
    }

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

      protected getLastEmailProcessedTimestamp_args getEmptyArgsInstance() {
        return new getLastEmailProcessedTimestamp_args();
      }

      protected getLastEmailProcessedTimestamp_result getResult(I iface, getLastEmailProcessedTimestamp_args args) throws org.apache.thrift.TException {
        getLastEmailProcessedTimestamp_result result = new getLastEmailProcessedTimestamp_result();
        result.success = iface.getLastEmailProcessedTimestamp();
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

      protected updateLastEmailProcessedTimestamp_args getEmptyArgsInstance() {
        return new updateLastEmailProcessedTimestamp_args();
      }

      protected updateLastEmailProcessedTimestamp_result getResult(I iface, updateLastEmailProcessedTimestamp_args args) throws org.apache.thrift.TException {
        updateLastEmailProcessedTimestamp_result result = new updateLastEmailProcessedTimestamp_result();
        iface.updateLastEmailProcessedTimestamp(args.timestamp);
        return result;
      }
    }

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

      protected changeAgentStatus_args getEmptyArgsInstance() {
        return new changeAgentStatus_args();
      }

      protected changeAgentStatus_result getResult(I iface, changeAgentStatus_args args) throws org.apache.thrift.TException {
        changeAgentStatus_result result = new changeAgentStatus_result();
        iface.changeAgentStatus(args.status, args.emailId);
        return result;
      }
    }

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

      protected insertAgent_args getEmptyArgsInstance() {
        return new insertAgent_args();
      }

      protected insertAgent_result getResult(I iface, insertAgent_args args) throws org.apache.thrift.TException {
        insertAgent_result result = new insertAgent_result();
        iface.insertAgent(args.agent, args.role);
        return result;
      }
    }

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

      protected changeAgentRole_args getEmptyArgsInstance() {
        return new changeAgentRole_args();
      }

      protected changeAgentRole_result getResult(I iface, changeAgentRole_args args) throws org.apache.thrift.TException {
        changeAgentRole_result result = new changeAgentRole_result();
        iface.changeAgentRole(args.id, args.role);
        return result;
      }
    }

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

      protected getOpenTicketCountForAgent_args getEmptyArgsInstance() {
        return new getOpenTicketCountForAgent_args();
      }

      protected getOpenTicketCountForAgent_result getResult(I iface, getOpenTicketCountForAgent_args args) throws org.apache.thrift.TException {
        getOpenTicketCountForAgent_result result = new getOpenTicketCountForAgent_result();
        result.success = iface.getOpenTicketCountForAgent(args.agentId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

      protected getOpenTicketsMap_args getEmptyArgsInstance() {
        return new getOpenTicketsMap_args();
      }

      protected getOpenTicketsMap_result getResult(I iface, getOpenTicketsMap_args args) throws org.apache.thrift.TException {
        getOpenTicketsMap_result result = new getOpenTicketsMap_result();
        result.success = iface.getOpenTicketsMap();
        return result;
      }
    }

  }

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

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

    private SearchFilter searchFilter; // 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 {
      SEARCH_FILTER((short)1, "searchFilter");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SEARCH_FILTER
            return SEARCH_FILTER;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SEARCH_FILTER, new org.apache.thrift.meta_data.FieldMetaData("searchFilter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SearchFilter.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTickets_args.class, metaDataMap);
    }

    public getTickets_args() {
    }

    public getTickets_args(
      SearchFilter searchFilter)
    {
      this();
      this.searchFilter = searchFilter;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTickets_args(getTickets_args other) {
      if (other.isSetSearchFilter()) {
        this.searchFilter = new SearchFilter(other.searchFilter);
      }
    }

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

    @Override
    public void clear() {
      this.searchFilter = null;
    }

    public SearchFilter getSearchFilter() {
      return this.searchFilter;
    }

    public void setSearchFilter(SearchFilter searchFilter) {
      this.searchFilter = searchFilter;
    }

    public void unsetSearchFilter() {
      this.searchFilter = null;
    }

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

    public void setSearchFilterIsSet(boolean value) {
      if (!value) {
        this.searchFilter = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SEARCH_FILTER:
        if (value == null) {
          unsetSearchFilter();
        } else {
          setSearchFilter((SearchFilter)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SEARCH_FILTER:
        return getSearchFilter();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SEARCH_FILTER:
        return isSetSearchFilter();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_searchFilter = true && this.isSetSearchFilter();
      boolean that_present_searchFilter = true && that.isSetSearchFilter();
      if (this_present_searchFilter || that_present_searchFilter) {
        if (!(this_present_searchFilter && that_present_searchFilter))
          return false;
        if (!this.searchFilter.equals(that.searchFilter))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getTickets_args typedOther = (getTickets_args)other;

      lastComparison = Boolean.valueOf(isSetSearchFilter()).compareTo(typedOther.isSetSearchFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearchFilter()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchFilter, typedOther.searchFilter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SEARCH_FILTER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.searchFilter = new SearchFilter();
              this.searchFilter.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.searchFilter != null) {
        oprot.writeFieldBegin(SEARCH_FILTER_FIELD_DESC);
        this.searchFilter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTickets_args(");
      boolean first = true;

      sb.append("searchFilter:");
      if (this.searchFilter == null) {
        sb.append("null");
      } else {
        sb.append(this.searchFilter);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getTickets_result implements org.apache.thrift.TBase<getTickets_result, getTickets_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTickets_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 List<Ticket> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Ticket.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTickets_result.class, metaDataMap);
    }

    public getTickets_result() {
    }

    public getTickets_result(
      List<Ticket> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getTickets_result(getTickets_result other) {
      if (other.isSetSuccess()) {
        List<Ticket> __this__success = new ArrayList<Ticket>();
        for (Ticket other_element : other.success) {
          __this__success.add(new Ticket(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public java.util.Iterator<Ticket> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Ticket elem) {
      if (this.success == null) {
        this.success = new ArrayList<Ticket>();
      }
      this.success.add(elem);
    }

    public List<Ticket> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Ticket> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Ticket>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getTickets_result typedOther = (getTickets_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
                this.success = new ArrayList<Ticket>(_list12.size);
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
                {
                  Ticket _elem14; // required
                  _elem14 = new Ticket();
                  _elem14.read(iprot);
                  this.success.add(_elem14);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Ticket _iter15 : this.success)
          {
            _iter15.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getTickets_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnassignedTickets_args.class, metaDataMap);
    }

    public getUnassignedTickets_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getUnassignedTickets_args typedOther = (getUnassignedTickets_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUnassignedTickets_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getUnassignedTickets_result implements org.apache.thrift.TBase<getUnassignedTickets_result, getUnassignedTickets_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUnassignedTickets_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 List<Ticket> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Ticket.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUnassignedTickets_result.class, metaDataMap);
    }

    public getUnassignedTickets_result() {
    }

    public getUnassignedTickets_result(
      List<Ticket> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getUnassignedTickets_result(getUnassignedTickets_result other) {
      if (other.isSetSuccess()) {
        List<Ticket> __this__success = new ArrayList<Ticket>();
        for (Ticket other_element : other.success) {
          __this__success.add(new Ticket(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public java.util.Iterator<Ticket> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Ticket elem) {
      if (this.success == null) {
        this.success = new ArrayList<Ticket>();
      }
      this.success.add(elem);
    }

    public List<Ticket> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Ticket> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Ticket>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getUnassignedTickets_result typedOther = (getUnassignedTickets_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
                this.success = new ArrayList<Ticket>(_list16.size);
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
                {
                  Ticket _elem18; // required
                  _elem18 = new Ticket();
                  _elem18.read(iprot);
                  this.success.add(_elem18);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Ticket _iter19 : this.success)
          {
            _iter19.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getUnassignedTickets_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField TICKET_FIELD_DESC = new org.apache.thrift.protocol.TField("ticket", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ACTIVITY_FIELD_DESC = new org.apache.thrift.protocol.TField("activity", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private Ticket ticket; // required
    private Activity activity; // 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 {
      TICKET((short)1, "ticket"),
      ACTIVITY((short)2, "activity");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // TICKET
            return TICKET;
          case 2: // ACTIVITY
            return ACTIVITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.TICKET, new org.apache.thrift.meta_data.FieldMetaData("ticket", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Ticket.class)));
      tmpMap.put(_Fields.ACTIVITY, new org.apache.thrift.meta_data.FieldMetaData("activity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Activity.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateTicket_args.class, metaDataMap);
    }

    public updateTicket_args() {
    }

    public updateTicket_args(
      Ticket ticket,
      Activity activity)
    {
      this();
      this.ticket = ticket;
      this.activity = activity;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateTicket_args(updateTicket_args other) {
      if (other.isSetTicket()) {
        this.ticket = new Ticket(other.ticket);
      }
      if (other.isSetActivity()) {
        this.activity = new Activity(other.activity);
      }
    }

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

    @Override
    public void clear() {
      this.ticket = null;
      this.activity = null;
    }

    public Ticket getTicket() {
      return this.ticket;
    }

    public void setTicket(Ticket ticket) {
      this.ticket = ticket;
    }

    public void unsetTicket() {
      this.ticket = null;
    }

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

    public void setTicketIsSet(boolean value) {
      if (!value) {
        this.ticket = null;
      }
    }

    public Activity getActivity() {
      return this.activity;
    }

    public void setActivity(Activity activity) {
      this.activity = activity;
    }

    public void unsetActivity() {
      this.activity = null;
    }

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

    public void setActivityIsSet(boolean value) {
      if (!value) {
        this.activity = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TICKET:
        if (value == null) {
          unsetTicket();
        } else {
          setTicket((Ticket)value);
        }
        break;

      case ACTIVITY:
        if (value == null) {
          unsetActivity();
        } else {
          setActivity((Activity)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TICKET:
        return getTicket();

      case ACTIVITY:
        return getActivity();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case TICKET:
        return isSetTicket();
      case ACTIVITY:
        return isSetActivity();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_ticket = true && this.isSetTicket();
      boolean that_present_ticket = true && that.isSetTicket();
      if (this_present_ticket || that_present_ticket) {
        if (!(this_present_ticket && that_present_ticket))
          return false;
        if (!this.ticket.equals(that.ticket))
          return false;
      }

      boolean this_present_activity = true && this.isSetActivity();
      boolean that_present_activity = true && that.isSetActivity();
      if (this_present_activity || that_present_activity) {
        if (!(this_present_activity && that_present_activity))
          return false;
        if (!this.activity.equals(that.activity))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      updateTicket_args typedOther = (updateTicket_args)other;

      lastComparison = Boolean.valueOf(isSetTicket()).compareTo(typedOther.isSetTicket());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTicket()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticket, typedOther.ticket);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetActivity()).compareTo(typedOther.isSetActivity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetActivity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activity, typedOther.activity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // TICKET
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ticket = new Ticket();
              this.ticket.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ACTIVITY
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.activity = new Activity();
              this.activity.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.ticket != null) {
        oprot.writeFieldBegin(TICKET_FIELD_DESC);
        this.ticket.write(oprot);
        oprot.writeFieldEnd();
      }
      if (this.activity != null) {
        oprot.writeFieldBegin(ACTIVITY_FIELD_DESC);
        this.activity.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateTicket_args(");
      boolean first = true;

      sb.append("ticket:");
      if (this.ticket == null) {
        sb.append("null");
      } else {
        sb.append(this.ticket);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("activity:");
      if (this.activity == null) {
        sb.append("null");
      } else {
        sb.append(this.activity);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateTicket_result.class, metaDataMap);
    }

    public updateTicket_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      updateTicket_result typedOther = (updateTicket_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateTicket_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField TICKET_FIELD_DESC = new org.apache.thrift.protocol.TField("ticket", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ACTIVITY_FIELD_DESC = new org.apache.thrift.protocol.TField("activity", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private Ticket ticket; // required
    private Activity activity; // 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 {
      TICKET((short)1, "ticket"),
      ACTIVITY((short)2, "activity");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // TICKET
            return TICKET;
          case 2: // ACTIVITY
            return ACTIVITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.TICKET, new org.apache.thrift.meta_data.FieldMetaData("ticket", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Ticket.class)));
      tmpMap.put(_Fields.ACTIVITY, new org.apache.thrift.meta_data.FieldMetaData("activity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Activity.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTicket_args.class, metaDataMap);
    }

    public insertTicket_args() {
    }

    public insertTicket_args(
      Ticket ticket,
      Activity activity)
    {
      this();
      this.ticket = ticket;
      this.activity = activity;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insertTicket_args(insertTicket_args other) {
      if (other.isSetTicket()) {
        this.ticket = new Ticket(other.ticket);
      }
      if (other.isSetActivity()) {
        this.activity = new Activity(other.activity);
      }
    }

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

    @Override
    public void clear() {
      this.ticket = null;
      this.activity = null;
    }

    public Ticket getTicket() {
      return this.ticket;
    }

    public void setTicket(Ticket ticket) {
      this.ticket = ticket;
    }

    public void unsetTicket() {
      this.ticket = null;
    }

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

    public void setTicketIsSet(boolean value) {
      if (!value) {
        this.ticket = null;
      }
    }

    public Activity getActivity() {
      return this.activity;
    }

    public void setActivity(Activity activity) {
      this.activity = activity;
    }

    public void unsetActivity() {
      this.activity = null;
    }

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

    public void setActivityIsSet(boolean value) {
      if (!value) {
        this.activity = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TICKET:
        if (value == null) {
          unsetTicket();
        } else {
          setTicket((Ticket)value);
        }
        break;

      case ACTIVITY:
        if (value == null) {
          unsetActivity();
        } else {
          setActivity((Activity)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TICKET:
        return getTicket();

      case ACTIVITY:
        return getActivity();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case TICKET:
        return isSetTicket();
      case ACTIVITY:
        return isSetActivity();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_ticket = true && this.isSetTicket();
      boolean that_present_ticket = true && that.isSetTicket();
      if (this_present_ticket || that_present_ticket) {
        if (!(this_present_ticket && that_present_ticket))
          return false;
        if (!this.ticket.equals(that.ticket))
          return false;
      }

      boolean this_present_activity = true && this.isSetActivity();
      boolean that_present_activity = true && that.isSetActivity();
      if (this_present_activity || that_present_activity) {
        if (!(this_present_activity && that_present_activity))
          return false;
        if (!this.activity.equals(that.activity))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      insertTicket_args typedOther = (insertTicket_args)other;

      lastComparison = Boolean.valueOf(isSetTicket()).compareTo(typedOther.isSetTicket());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTicket()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ticket, typedOther.ticket);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetActivity()).compareTo(typedOther.isSetActivity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetActivity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activity, typedOther.activity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // TICKET
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.ticket = new Ticket();
              this.ticket.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ACTIVITY
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.activity = new Activity();
              this.activity.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.ticket != null) {
        oprot.writeFieldBegin(TICKET_FIELD_DESC);
        this.ticket.write(oprot);
        oprot.writeFieldEnd();
      }
      if (this.activity != null) {
        oprot.writeFieldBegin(ACTIVITY_FIELD_DESC);
        this.activity.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertTicket_args(");
      boolean first = true;

      sb.append("ticket:");
      if (this.ticket == null) {
        sb.append("null");
      } else {
        sb.append(this.ticket);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("activity:");
      if (this.activity == null) {
        sb.append("null");
      } else {
        sb.append(this.activity);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertTicket_result.class, metaDataMap);
    }

    public insertTicket_result() {
    }

    public insertTicket_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insertTicket_result(insertTicket_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

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

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      insertTicket_result typedOther = (insertTicket_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertTicket_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField ASSIGNEE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("assigneeId", org.apache.thrift.protocol.TType.I32, (short)1);

    private int assigneeId; // 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 {
      ASSIGNEE_ID((short)1, "assigneeId");

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

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

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ASSIGNEEID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ASSIGNEE_ID, new org.apache.thrift.meta_data.FieldMetaData("assigneeId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unassignAgentTickets_args.class, metaDataMap);
    }

    public unassignAgentTickets_args() {
    }

    public unassignAgentTickets_args(
      int assigneeId)
    {
      this();
      this.assigneeId = assigneeId;
      setAssigneeIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public unassignAgentTickets_args(unassignAgentTickets_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.assigneeId = other.assigneeId;
    }

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

    @Override
    public void clear() {
      setAssigneeIdIsSet(false);
      this.assigneeId = 0;
    }

    public int getAssigneeId() {
      return this.assigneeId;
    }

    public void setAssigneeId(int assigneeId) {
      this.assigneeId = assigneeId;
      setAssigneeIdIsSet(true);
    }

    public void unsetAssigneeId() {
      __isset_bit_vector.clear(__ASSIGNEEID_ISSET_ID);
    }

    /** Returns true if field assigneeId is set (has been assigned a value) and false otherwise */
    public boolean isSetAssigneeId() {
      return __isset_bit_vector.get(__ASSIGNEEID_ISSET_ID);
    }

    public void setAssigneeIdIsSet(boolean value) {
      __isset_bit_vector.set(__ASSIGNEEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ASSIGNEE_ID:
        if (value == null) {
          unsetAssigneeId();
        } else {
          setAssigneeId((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ASSIGNEE_ID:
        return Integer.valueOf(getAssigneeId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ASSIGNEE_ID:
        return isSetAssigneeId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_assigneeId = true;
      boolean that_present_assigneeId = true;
      if (this_present_assigneeId || that_present_assigneeId) {
        if (!(this_present_assigneeId && that_present_assigneeId))
          return false;
        if (this.assigneeId != that.assigneeId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      unassignAgentTickets_args typedOther = (unassignAgentTickets_args)other;

      lastComparison = Boolean.valueOf(isSetAssigneeId()).compareTo(typedOther.isSetAssigneeId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAssigneeId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.assigneeId, typedOther.assigneeId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ASSIGNEE_ID
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.assigneeId = iprot.readI32();
              setAssigneeIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ASSIGNEE_ID_FIELD_DESC);
      oprot.writeI32(this.assigneeId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("unassignAgentTickets_args(");
      boolean first = true;

      sb.append("assigneeId:");
      sb.append(this.assigneeId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        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);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(unassignAgentTickets_result.class, metaDataMap);
    }

    public unassignAgentTickets_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      unassignAgentTickets_result typedOther = (unassignAgentTickets_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("unassignAgentTickets_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

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

    private SearchFilter searchFilter; // 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 {
      SEARCH_FILTER((short)1, "searchFilter");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SEARCH_FILTER
            return SEARCH_FILTER;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SEARCH_FILTER, new org.apache.thrift.meta_data.FieldMetaData("searchFilter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SearchFilter.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivities_args.class, metaDataMap);
    }

    public getActivities_args() {
    }

    public getActivities_args(
      SearchFilter searchFilter)
    {
      this();
      this.searchFilter = searchFilter;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getActivities_args(getActivities_args other) {
      if (other.isSetSearchFilter()) {
        this.searchFilter = new SearchFilter(other.searchFilter);
      }
    }

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

    @Override
    public void clear() {
      this.searchFilter = null;
    }

    public SearchFilter getSearchFilter() {
      return this.searchFilter;
    }

    public void setSearchFilter(SearchFilter searchFilter) {
      this.searchFilter = searchFilter;
    }

    public void unsetSearchFilter() {
      this.searchFilter = null;
    }

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

    public void setSearchFilterIsSet(boolean value) {
      if (!value) {
        this.searchFilter = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SEARCH_FILTER:
        if (value == null) {
          unsetSearchFilter();
        } else {
          setSearchFilter((SearchFilter)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SEARCH_FILTER:
        return getSearchFilter();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SEARCH_FILTER:
        return isSetSearchFilter();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_searchFilter = true && this.isSetSearchFilter();
      boolean that_present_searchFilter = true && that.isSetSearchFilter();
      if (this_present_searchFilter || that_present_searchFilter) {
        if (!(this_present_searchFilter && that_present_searchFilter))
          return false;
        if (!this.searchFilter.equals(that.searchFilter))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getActivities_args typedOther = (getActivities_args)other;

      lastComparison = Boolean.valueOf(isSetSearchFilter()).compareTo(typedOther.isSetSearchFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearchFilter()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchFilter, typedOther.searchFilter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SEARCH_FILTER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.searchFilter = new SearchFilter();
              this.searchFilter.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.searchFilter != null) {
        oprot.writeFieldBegin(SEARCH_FILTER_FIELD_DESC);
        this.searchFilter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getActivities_args(");
      boolean first = true;

      sb.append("searchFilter:");
      if (this.searchFilter == null) {
        sb.append("null");
      } else {
        sb.append(this.searchFilter);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getActivities_result implements org.apache.thrift.TBase<getActivities_result, getActivities_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActivities_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 List<Activity> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Activity.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivities_result.class, metaDataMap);
    }

    public getActivities_result() {
    }

    public getActivities_result(
      List<Activity> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getActivities_result(getActivities_result other) {
      if (other.isSetSuccess()) {
        List<Activity> __this__success = new ArrayList<Activity>();
        for (Activity other_element : other.success) {
          __this__success.add(new Activity(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public java.util.Iterator<Activity> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Activity elem) {
      if (this.success == null) {
        this.success = new ArrayList<Activity>();
      }
      this.success.add(elem);
    }

    public List<Activity> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Activity> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Activity>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getActivities_result typedOther = (getActivities_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
                this.success = new ArrayList<Activity>(_list20.size);
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
                {
                  Activity _elem22; // required
                  _elem22 = new Activity();
                  _elem22.read(iprot);
                  this.success.add(_elem22);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Activity _iter23 : this.success)
          {
            _iter23.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getActivities_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

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

    private Activity activity; // 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 {
      ACTIVITY((short)1, "activity");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ACTIVITY
            return ACTIVITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ACTIVITY, new org.apache.thrift.meta_data.FieldMetaData("activity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Activity.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertActivity_args.class, metaDataMap);
    }

    public insertActivity_args() {
    }

    public insertActivity_args(
      Activity activity)
    {
      this();
      this.activity = activity;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insertActivity_args(insertActivity_args other) {
      if (other.isSetActivity()) {
        this.activity = new Activity(other.activity);
      }
    }

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

    @Override
    public void clear() {
      this.activity = null;
    }

    public Activity getActivity() {
      return this.activity;
    }

    public void setActivity(Activity activity) {
      this.activity = activity;
    }

    public void unsetActivity() {
      this.activity = null;
    }

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

    public void setActivityIsSet(boolean value) {
      if (!value) {
        this.activity = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ACTIVITY:
        if (value == null) {
          unsetActivity();
        } else {
          setActivity((Activity)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ACTIVITY:
        return getActivity();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ACTIVITY:
        return isSetActivity();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_activity = true && this.isSetActivity();
      boolean that_present_activity = true && that.isSetActivity();
      if (this_present_activity || that_present_activity) {
        if (!(this_present_activity && that_present_activity))
          return false;
        if (!this.activity.equals(that.activity))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      insertActivity_args typedOther = (insertActivity_args)other;

      lastComparison = Boolean.valueOf(isSetActivity()).compareTo(typedOther.isSetActivity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetActivity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activity, typedOther.activity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ACTIVITY
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.activity = new Activity();
              this.activity.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.activity != null) {
        oprot.writeFieldBegin(ACTIVITY_FIELD_DESC);
        this.activity.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertActivity_args(");
      boolean first = true;

      sb.append("activity:");
      if (this.activity == null) {
        sb.append("null");
      } else {
        sb.append(this.activity);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertActivity_result.class, metaDataMap);
    }

    public insertActivity_result() {
    }

    public insertActivity_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insertActivity_result(insertActivity_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

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

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      insertActivity_result typedOther = (insertActivity_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertActivity_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        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);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField ACTIVITY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("activityId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long activityId; // required
    private long agentId; // 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 {
      ACTIVITY_ID((short)1, "activityId"),
      AGENT_ID((short)2, "agentId");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ACTIVITY_ID
            return ACTIVITY_ID;
          case 2: // AGENT_ID
            return AGENT_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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ACTIVITYID_ISSET_ID = 0;
    private static final int __AGENTID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ACTIVITY_ID, new org.apache.thrift.meta_data.FieldMetaData("activityId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markAsRead_args.class, metaDataMap);
    }

    public markAsRead_args() {
    }

    public markAsRead_args(
      long activityId,
      long agentId)
    {
      this();
      this.activityId = activityId;
      setActivityIdIsSet(true);
      this.agentId = agentId;
      setAgentIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public markAsRead_args(markAsRead_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.activityId = other.activityId;
      this.agentId = other.agentId;
    }

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

    @Override
    public void clear() {
      setActivityIdIsSet(false);
      this.activityId = 0;
      setAgentIdIsSet(false);
      this.agentId = 0;
    }

    public long getActivityId() {
      return this.activityId;
    }

    public void setActivityId(long activityId) {
      this.activityId = activityId;
      setActivityIdIsSet(true);
    }

    public void unsetActivityId() {
      __isset_bit_vector.clear(__ACTIVITYID_ISSET_ID);
    }

    /** Returns true if field activityId is set (has been assigned a value) and false otherwise */
    public boolean isSetActivityId() {
      return __isset_bit_vector.get(__ACTIVITYID_ISSET_ID);
    }

    public void setActivityIdIsSet(boolean value) {
      __isset_bit_vector.set(__ACTIVITYID_ISSET_ID, value);
    }

    public long getAgentId() {
      return this.agentId;
    }

    public void setAgentId(long agentId) {
      this.agentId = agentId;
      setAgentIdIsSet(true);
    }

    public void unsetAgentId() {
      __isset_bit_vector.clear(__AGENTID_ISSET_ID);
    }

    /** Returns true if field agentId is set (has been assigned a value) and false otherwise */
    public boolean isSetAgentId() {
      return __isset_bit_vector.get(__AGENTID_ISSET_ID);
    }

    public void setAgentIdIsSet(boolean value) {
      __isset_bit_vector.set(__AGENTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ACTIVITY_ID:
        if (value == null) {
          unsetActivityId();
        } else {
          setActivityId((Long)value);
        }
        break;

      case AGENT_ID:
        if (value == null) {
          unsetAgentId();
        } else {
          setAgentId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ACTIVITY_ID:
        return Long.valueOf(getActivityId());

      case AGENT_ID:
        return Long.valueOf(getAgentId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ACTIVITY_ID:
        return isSetActivityId();
      case AGENT_ID:
        return isSetAgentId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_activityId = true;
      boolean that_present_activityId = true;
      if (this_present_activityId || that_present_activityId) {
        if (!(this_present_activityId && that_present_activityId))
          return false;
        if (this.activityId != that.activityId)
          return false;
      }

      boolean this_present_agentId = true;
      boolean that_present_agentId = true;
      if (this_present_agentId || that_present_agentId) {
        if (!(this_present_agentId && that_present_agentId))
          return false;
        if (this.agentId != that.agentId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      markAsRead_args typedOther = (markAsRead_args)other;

      lastComparison = Boolean.valueOf(isSetActivityId()).compareTo(typedOther.isSetActivityId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetActivityId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.activityId, typedOther.activityId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAgentId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ACTIVITY_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.activityId = iprot.readI64();
              setActivityIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // AGENT_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.agentId = iprot.readI64();
              setAgentIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ACTIVITY_ID_FIELD_DESC);
      oprot.writeI64(this.activityId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
      oprot.writeI64(this.agentId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("markAsRead_args(");
      boolean first = true;

      sb.append("activityId:");
      sb.append(this.activityId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("agentId:");
      sb.append(this.agentId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        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);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markAsRead_result.class, metaDataMap);
    }

    public markAsRead_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      markAsRead_result typedOther = (markAsRead_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("markAsRead_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

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

    private SearchFilter searchFilter; // 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 {
      SEARCH_FILTER((short)1, "searchFilter");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SEARCH_FILTER
            return SEARCH_FILTER;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SEARCH_FILTER, new org.apache.thrift.meta_data.FieldMetaData("searchFilter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SearchFilter.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAgents_args.class, metaDataMap);
    }

    public getAgents_args() {
    }

    public getAgents_args(
      SearchFilter searchFilter)
    {
      this();
      this.searchFilter = searchFilter;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAgents_args(getAgents_args other) {
      if (other.isSetSearchFilter()) {
        this.searchFilter = new SearchFilter(other.searchFilter);
      }
    }

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

    @Override
    public void clear() {
      this.searchFilter = null;
    }

    public SearchFilter getSearchFilter() {
      return this.searchFilter;
    }

    public void setSearchFilter(SearchFilter searchFilter) {
      this.searchFilter = searchFilter;
    }

    public void unsetSearchFilter() {
      this.searchFilter = null;
    }

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

    public void setSearchFilterIsSet(boolean value) {
      if (!value) {
        this.searchFilter = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SEARCH_FILTER:
        if (value == null) {
          unsetSearchFilter();
        } else {
          setSearchFilter((SearchFilter)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SEARCH_FILTER:
        return getSearchFilter();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SEARCH_FILTER:
        return isSetSearchFilter();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_searchFilter = true && this.isSetSearchFilter();
      boolean that_present_searchFilter = true && that.isSetSearchFilter();
      if (this_present_searchFilter || that_present_searchFilter) {
        if (!(this_present_searchFilter && that_present_searchFilter))
          return false;
        if (!this.searchFilter.equals(that.searchFilter))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getAgents_args typedOther = (getAgents_args)other;

      lastComparison = Boolean.valueOf(isSetSearchFilter()).compareTo(typedOther.isSetSearchFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearchFilter()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchFilter, typedOther.searchFilter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SEARCH_FILTER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.searchFilter = new SearchFilter();
              this.searchFilter.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.searchFilter != null) {
        oprot.writeFieldBegin(SEARCH_FILTER_FIELD_DESC);
        this.searchFilter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAgents_args(");
      boolean first = true;

      sb.append("searchFilter:");
      if (this.searchFilter == null) {
        sb.append("null");
      } else {
        sb.append(this.searchFilter);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAgents_result implements org.apache.thrift.TBase<getAgents_result, getAgents_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAgents_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 List<Agent> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Agent.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAgents_result.class, metaDataMap);
    }

    public getAgents_result() {
    }

    public getAgents_result(
      List<Agent> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAgents_result(getAgents_result other) {
      if (other.isSetSuccess()) {
        List<Agent> __this__success = new ArrayList<Agent>();
        for (Agent other_element : other.success) {
          __this__success.add(new Agent(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public java.util.Iterator<Agent> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Agent elem) {
      if (this.success == null) {
        this.success = new ArrayList<Agent>();
      }
      this.success.add(elem);
    }

    public List<Agent> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Agent> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Agent>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getAgents_result typedOther = (getAgents_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
                this.success = new ArrayList<Agent>(_list24.size);
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
                {
                  Agent _elem26; // required
                  _elem26 = new Agent();
                  _elem26.read(iprot);
                  this.success.add(_elem26);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Agent _iter27 : this.success)
          {
            _iter27.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAgents_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

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

    private SearchFilter searchFilter; // 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 {
      SEARCH_FILTER((short)1, "searchFilter");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SEARCH_FILTER
            return SEARCH_FILTER;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SEARCH_FILTER, new org.apache.thrift.meta_data.FieldMetaData("searchFilter", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SearchFilter.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInactiveAgents_args.class, metaDataMap);
    }

    public getInactiveAgents_args() {
    }

    public getInactiveAgents_args(
      SearchFilter searchFilter)
    {
      this();
      this.searchFilter = searchFilter;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getInactiveAgents_args(getInactiveAgents_args other) {
      if (other.isSetSearchFilter()) {
        this.searchFilter = new SearchFilter(other.searchFilter);
      }
    }

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

    @Override
    public void clear() {
      this.searchFilter = null;
    }

    public SearchFilter getSearchFilter() {
      return this.searchFilter;
    }

    public void setSearchFilter(SearchFilter searchFilter) {
      this.searchFilter = searchFilter;
    }

    public void unsetSearchFilter() {
      this.searchFilter = null;
    }

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

    public void setSearchFilterIsSet(boolean value) {
      if (!value) {
        this.searchFilter = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SEARCH_FILTER:
        if (value == null) {
          unsetSearchFilter();
        } else {
          setSearchFilter((SearchFilter)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SEARCH_FILTER:
        return getSearchFilter();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SEARCH_FILTER:
        return isSetSearchFilter();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_searchFilter = true && this.isSetSearchFilter();
      boolean that_present_searchFilter = true && that.isSetSearchFilter();
      if (this_present_searchFilter || that_present_searchFilter) {
        if (!(this_present_searchFilter && that_present_searchFilter))
          return false;
        if (!this.searchFilter.equals(that.searchFilter))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getInactiveAgents_args typedOther = (getInactiveAgents_args)other;

      lastComparison = Boolean.valueOf(isSetSearchFilter()).compareTo(typedOther.isSetSearchFilter());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSearchFilter()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.searchFilter, typedOther.searchFilter);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SEARCH_FILTER
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.searchFilter = new SearchFilter();
              this.searchFilter.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.searchFilter != null) {
        oprot.writeFieldBegin(SEARCH_FILTER_FIELD_DESC);
        this.searchFilter.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getInactiveAgents_args(");
      boolean first = true;

      sb.append("searchFilter:");
      if (this.searchFilter == null) {
        sb.append("null");
      } else {
        sb.append(this.searchFilter);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getInactiveAgents_result implements org.apache.thrift.TBase<getInactiveAgents_result, getInactiveAgents_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInactiveAgents_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 List<Agent> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Agent.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInactiveAgents_result.class, metaDataMap);
    }

    public getInactiveAgents_result() {
    }

    public getInactiveAgents_result(
      List<Agent> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getInactiveAgents_result(getInactiveAgents_result other) {
      if (other.isSetSuccess()) {
        List<Agent> __this__success = new ArrayList<Agent>();
        for (Agent other_element : other.success) {
          __this__success.add(new Agent(other_element));
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public java.util.Iterator<Agent> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Agent elem) {
      if (this.success == null) {
        this.success = new ArrayList<Agent>();
      }
      this.success.add(elem);
    }

    public List<Agent> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Agent> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Agent>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getInactiveAgents_result typedOther = (getInactiveAgents_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
                this.success = new ArrayList<Agent>(_list28.size);
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
                {
                  Agent _elem30; // required
                  _elem30 = new Agent();
                  _elem30.read(iprot);
                  this.success.add(_elem30);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Agent _iter31 : this.success)
          {
            _iter31.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getInactiveAgents_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AGENT_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentEmailId", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);

    private String agentEmailId; // required
    private String password; // 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 {
      AGENT_EMAIL_ID((short)1, "agentEmailId"),
      PASSWORD((short)2, "password");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AGENT_EMAIL_ID
            return AGENT_EMAIL_ID;
          case 2: // PASSWORD
            return PASSWORD;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AGENT_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("agentEmailId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePasswordForAgent_args.class, metaDataMap);
    }

    public updatePasswordForAgent_args() {
    }

    public updatePasswordForAgent_args(
      String agentEmailId,
      String password)
    {
      this();
      this.agentEmailId = agentEmailId;
      this.password = password;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updatePasswordForAgent_args(updatePasswordForAgent_args other) {
      if (other.isSetAgentEmailId()) {
        this.agentEmailId = other.agentEmailId;
      }
      if (other.isSetPassword()) {
        this.password = other.password;
      }
    }

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

    @Override
    public void clear() {
      this.agentEmailId = null;
      this.password = null;
    }

    public String getAgentEmailId() {
      return this.agentEmailId;
    }

    public void setAgentEmailId(String agentEmailId) {
      this.agentEmailId = agentEmailId;
    }

    public void unsetAgentEmailId() {
      this.agentEmailId = null;
    }

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

    public void setAgentEmailIdIsSet(boolean value) {
      if (!value) {
        this.agentEmailId = null;
      }
    }

    public String getPassword() {
      return this.password;
    }

    public void setPassword(String password) {
      this.password = password;
    }

    public void unsetPassword() {
      this.password = null;
    }

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

    public void setPasswordIsSet(boolean value) {
      if (!value) {
        this.password = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AGENT_EMAIL_ID:
        if (value == null) {
          unsetAgentEmailId();
        } else {
          setAgentEmailId((String)value);
        }
        break;

      case PASSWORD:
        if (value == null) {
          unsetPassword();
        } else {
          setPassword((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AGENT_EMAIL_ID:
        return getAgentEmailId();

      case PASSWORD:
        return getPassword();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case AGENT_EMAIL_ID:
        return isSetAgentEmailId();
      case PASSWORD:
        return isSetPassword();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_agentEmailId = true && this.isSetAgentEmailId();
      boolean that_present_agentEmailId = true && that.isSetAgentEmailId();
      if (this_present_agentEmailId || that_present_agentEmailId) {
        if (!(this_present_agentEmailId && that_present_agentEmailId))
          return false;
        if (!this.agentEmailId.equals(that.agentEmailId))
          return false;
      }

      boolean this_present_password = true && this.isSetPassword();
      boolean that_present_password = true && that.isSetPassword();
      if (this_present_password || that_present_password) {
        if (!(this_present_password && that_present_password))
          return false;
        if (!this.password.equals(that.password))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      updatePasswordForAgent_args typedOther = (updatePasswordForAgent_args)other;

      lastComparison = Boolean.valueOf(isSetAgentEmailId()).compareTo(typedOther.isSetAgentEmailId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAgentEmailId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentEmailId, typedOther.agentEmailId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPassword()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AGENT_EMAIL_ID
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.agentEmailId = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PASSWORD
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.password = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.agentEmailId != null) {
        oprot.writeFieldBegin(AGENT_EMAIL_ID_FIELD_DESC);
        oprot.writeString(this.agentEmailId);
        oprot.writeFieldEnd();
      }
      if (this.password != null) {
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
        oprot.writeString(this.password);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updatePasswordForAgent_args(");
      boolean first = true;

      sb.append("agentEmailId:");
      if (this.agentEmailId == null) {
        sb.append("null");
      } else {
        sb.append(this.agentEmailId);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("password:");
      if (this.password == null) {
        sb.append("null");
      } else {
        sb.append(this.password);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePasswordForAgent_result.class, metaDataMap);
    }

    public updatePasswordForAgent_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      updatePasswordForAgent_result typedOther = (updatePasswordForAgent_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updatePasswordForAgent_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AGENT_EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentEmailId", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String agentEmailId; // 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 {
      AGENT_EMAIL_ID((short)1, "agentEmailId");

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

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

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AGENT_EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("agentEmailId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoleNamesForAgent_args.class, metaDataMap);
    }

    public getRoleNamesForAgent_args() {
    }

    public getRoleNamesForAgent_args(
      String agentEmailId)
    {
      this();
      this.agentEmailId = agentEmailId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getRoleNamesForAgent_args(getRoleNamesForAgent_args other) {
      if (other.isSetAgentEmailId()) {
        this.agentEmailId = other.agentEmailId;
      }
    }

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

    @Override
    public void clear() {
      this.agentEmailId = null;
    }

    public String getAgentEmailId() {
      return this.agentEmailId;
    }

    public void setAgentEmailId(String agentEmailId) {
      this.agentEmailId = agentEmailId;
    }

    public void unsetAgentEmailId() {
      this.agentEmailId = null;
    }

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

    public void setAgentEmailIdIsSet(boolean value) {
      if (!value) {
        this.agentEmailId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AGENT_EMAIL_ID:
        if (value == null) {
          unsetAgentEmailId();
        } else {
          setAgentEmailId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AGENT_EMAIL_ID:
        return getAgentEmailId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case AGENT_EMAIL_ID:
        return isSetAgentEmailId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_agentEmailId = true && this.isSetAgentEmailId();
      boolean that_present_agentEmailId = true && that.isSetAgentEmailId();
      if (this_present_agentEmailId || that_present_agentEmailId) {
        if (!(this_present_agentEmailId && that_present_agentEmailId))
          return false;
        if (!this.agentEmailId.equals(that.agentEmailId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getRoleNamesForAgent_args typedOther = (getRoleNamesForAgent_args)other;

      lastComparison = Boolean.valueOf(isSetAgentEmailId()).compareTo(typedOther.isSetAgentEmailId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAgentEmailId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentEmailId, typedOther.agentEmailId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AGENT_EMAIL_ID
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.agentEmailId = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.agentEmailId != null) {
        oprot.writeFieldBegin(AGENT_EMAIL_ID_FIELD_DESC);
        oprot.writeString(this.agentEmailId);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getRoleNamesForAgent_args(");
      boolean first = true;

      sb.append("agentEmailId:");
      if (this.agentEmailId == null) {
        sb.append("null");
      } else {
        sb.append(this.agentEmailId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getRoleNamesForAgent_result implements org.apache.thrift.TBase<getRoleNamesForAgent_result, getRoleNamesForAgent_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRoleNamesForAgent_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 List<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 Map<String, _Fields> byName = new HashMap<String, _Fields>();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRoleNamesForAgent_result.class, metaDataMap);
    }

    public getRoleNamesForAgent_result() {
    }

    public getRoleNamesForAgent_result(
      List<String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getRoleNamesForAgent_result(getRoleNamesForAgent_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

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

    public void setSuccess(List<String> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getRoleNamesForAgent_result typedOther = (getRoleNamesForAgent_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
                this.success = new ArrayList<String>(_list32.size);
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
                {
                  String _elem34; // required
                  _elem34 = iprot.readString();
                  this.success.add(_elem34);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (String _iter35 : this.success)
          {
            oprot.writeString(_iter35);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getRoleNamesForAgent_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField ROLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("roleName", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String roleName; // 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 {
      ROLE_NAME((short)1, "roleName");

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

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

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ROLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("roleName", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPermissionsForRoleName_args.class, metaDataMap);
    }

    public getPermissionsForRoleName_args() {
    }

    public getPermissionsForRoleName_args(
      String roleName)
    {
      this();
      this.roleName = roleName;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPermissionsForRoleName_args(getPermissionsForRoleName_args other) {
      if (other.isSetRoleName()) {
        this.roleName = other.roleName;
      }
    }

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

    @Override
    public void clear() {
      this.roleName = null;
    }

    public String getRoleName() {
      return this.roleName;
    }

    public void setRoleName(String roleName) {
      this.roleName = roleName;
    }

    public void unsetRoleName() {
      this.roleName = null;
    }

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

    public void setRoleNameIsSet(boolean value) {
      if (!value) {
        this.roleName = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ROLE_NAME:
        if (value == null) {
          unsetRoleName();
        } else {
          setRoleName((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ROLE_NAME:
        return getRoleName();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ROLE_NAME:
        return isSetRoleName();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_roleName = true && this.isSetRoleName();
      boolean that_present_roleName = true && that.isSetRoleName();
      if (this_present_roleName || that_present_roleName) {
        if (!(this_present_roleName && that_present_roleName))
          return false;
        if (!this.roleName.equals(that.roleName))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getPermissionsForRoleName_args typedOther = (getPermissionsForRoleName_args)other;

      lastComparison = Boolean.valueOf(isSetRoleName()).compareTo(typedOther.isSetRoleName());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRoleName()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.roleName, typedOther.roleName);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ROLE_NAME
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.roleName = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.roleName != null) {
        oprot.writeFieldBegin(ROLE_NAME_FIELD_DESC);
        oprot.writeString(this.roleName);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPermissionsForRoleName_args(");
      boolean first = true;

      sb.append("roleName:");
      if (this.roleName == null) {
        sb.append("null");
      } else {
        sb.append(this.roleName);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getPermissionsForRoleName_result implements org.apache.thrift.TBase<getPermissionsForRoleName_result, getPermissionsForRoleName_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPermissionsForRoleName_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 List<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 Map<String, _Fields> byName = new HashMap<String, _Fields>();

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPermissionsForRoleName_result.class, metaDataMap);
    }

    public getPermissionsForRoleName_result() {
    }

    public getPermissionsForRoleName_result(
      List<String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPermissionsForRoleName_result(getPermissionsForRoleName_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

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

    public void setSuccess(List<String> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getPermissionsForRoleName_result typedOther = (getPermissionsForRoleName_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
                this.success = new ArrayList<String>(_list36.size);
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
                {
                  String _elem38; // required
                  _elem38 = iprot.readString();
                  this.success.add(_elem38);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (String _iter39 : this.success)
          {
            oprot.writeString(_iter39);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPermissionsForRoleName_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLastEmailProcessedTimestamp_args.class, metaDataMap);
    }

    public getLastEmailProcessedTimestamp_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getLastEmailProcessedTimestamp_args typedOther = (getLastEmailProcessedTimestamp_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getLastEmailProcessedTimestamp_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLastEmailProcessedTimestamp_result.class, metaDataMap);
    }

    public getLastEmailProcessedTimestamp_result() {
    }

    public getLastEmailProcessedTimestamp_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLastEmailProcessedTimestamp_result(getLastEmailProcessedTimestamp_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

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

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getLastEmailProcessedTimestamp_result typedOther = (getLastEmailProcessedTimestamp_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getLastEmailProcessedTimestamp_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)1);

    private long timestamp; // 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 {
      TIMESTAMP((short)1, "timestamp");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // TIMESTAMP
            return TIMESTAMP;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TIMESTAMP_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLastEmailProcessedTimestamp_args.class, metaDataMap);
    }

    public updateLastEmailProcessedTimestamp_args() {
    }

    public updateLastEmailProcessedTimestamp_args(
      long timestamp)
    {
      this();
      this.timestamp = timestamp;
      setTimestampIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateLastEmailProcessedTimestamp_args(updateLastEmailProcessedTimestamp_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.timestamp = other.timestamp;
    }

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

    @Override
    public void clear() {
      setTimestampIsSet(false);
      this.timestamp = 0;
    }

    public long getTimestamp() {
      return this.timestamp;
    }

    public void setTimestamp(long timestamp) {
      this.timestamp = timestamp;
      setTimestampIsSet(true);
    }

    public void unsetTimestamp() {
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
    }

    /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetTimestamp() {
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
    }

    public void setTimestampIsSet(boolean value) {
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case TIMESTAMP:
        if (value == null) {
          unsetTimestamp();
        } else {
          setTimestamp((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case TIMESTAMP:
        return Long.valueOf(getTimestamp());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case TIMESTAMP:
        return isSetTimestamp();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_timestamp = true;
      boolean that_present_timestamp = true;
      if (this_present_timestamp || that_present_timestamp) {
        if (!(this_present_timestamp && that_present_timestamp))
          return false;
        if (this.timestamp != that.timestamp)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      updateLastEmailProcessedTimestamp_args typedOther = (updateLastEmailProcessedTimestamp_args)other;

      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTimestamp()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.timestamp = iprot.readI64();
              setTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
      oprot.writeI64(this.timestamp);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateLastEmailProcessedTimestamp_args(");
      boolean first = true;

      sb.append("timestamp:");
      sb.append(this.timestamp);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        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);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLastEmailProcessedTimestamp_result.class, metaDataMap);
    }

    public updateLastEmailProcessedTimestamp_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      updateLastEmailProcessedTimestamp_result typedOther = (updateLastEmailProcessedTimestamp_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateLastEmailProcessedTimestamp_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.BOOL, (short)1);
    private static final org.apache.thrift.protocol.TField EMAIL_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("emailId", org.apache.thrift.protocol.TType.STRING, (short)2);

    private boolean status; // required
    private String emailId; // 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 {
      STATUS((short)1, "status"),
      EMAIL_ID((short)2, "emailId");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // STATUS
            return STATUS;
          case 2: // EMAIL_ID
            return EMAIL_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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __STATUS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.EMAIL_ID, new org.apache.thrift.meta_data.FieldMetaData("emailId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeAgentStatus_args.class, metaDataMap);
    }

    public changeAgentStatus_args() {
    }

    public changeAgentStatus_args(
      boolean status,
      String emailId)
    {
      this();
      this.status = status;
      setStatusIsSet(true);
      this.emailId = emailId;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public changeAgentStatus_args(changeAgentStatus_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.status = other.status;
      if (other.isSetEmailId()) {
        this.emailId = other.emailId;
      }
    }

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

    @Override
    public void clear() {
      setStatusIsSet(false);
      this.status = false;
      this.emailId = null;
    }

    public boolean isStatus() {
      return this.status;
    }

    public void setStatus(boolean status) {
      this.status = status;
      setStatusIsSet(true);
    }

    public void unsetStatus() {
      __isset_bit_vector.clear(__STATUS_ISSET_ID);
    }

    /** Returns true if field status is set (has been assigned a value) and false otherwise */
    public boolean isSetStatus() {
      return __isset_bit_vector.get(__STATUS_ISSET_ID);
    }

    public void setStatusIsSet(boolean value) {
      __isset_bit_vector.set(__STATUS_ISSET_ID, value);
    }

    public String getEmailId() {
      return this.emailId;
    }

    public void setEmailId(String emailId) {
      this.emailId = emailId;
    }

    public void unsetEmailId() {
      this.emailId = null;
    }

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

    public void setEmailIdIsSet(boolean value) {
      if (!value) {
        this.emailId = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case STATUS:
        if (value == null) {
          unsetStatus();
        } else {
          setStatus((Boolean)value);
        }
        break;

      case EMAIL_ID:
        if (value == null) {
          unsetEmailId();
        } else {
          setEmailId((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case STATUS:
        return Boolean.valueOf(isStatus());

      case EMAIL_ID:
        return getEmailId();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case STATUS:
        return isSetStatus();
      case EMAIL_ID:
        return isSetEmailId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_status = true;
      boolean that_present_status = true;
      if (this_present_status || that_present_status) {
        if (!(this_present_status && that_present_status))
          return false;
        if (this.status != that.status)
          return false;
      }

      boolean this_present_emailId = true && this.isSetEmailId();
      boolean that_present_emailId = true && that.isSetEmailId();
      if (this_present_emailId || that_present_emailId) {
        if (!(this_present_emailId && that_present_emailId))
          return false;
        if (!this.emailId.equals(that.emailId))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      changeAgentStatus_args typedOther = (changeAgentStatus_args)other;

      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStatus()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetEmailId()).compareTo(typedOther.isSetEmailId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetEmailId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.emailId, typedOther.emailId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // STATUS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.status = iprot.readBool();
              setStatusIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // EMAIL_ID
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.emailId = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(STATUS_FIELD_DESC);
      oprot.writeBool(this.status);
      oprot.writeFieldEnd();
      if (this.emailId != null) {
        oprot.writeFieldBegin(EMAIL_ID_FIELD_DESC);
        oprot.writeString(this.emailId);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("changeAgentStatus_args(");
      boolean first = true;

      sb.append("status:");
      sb.append(this.status);
      first = false;
      if (!first) sb.append(", ");
      sb.append("emailId:");
      if (this.emailId == null) {
        sb.append("null");
      } else {
        sb.append(this.emailId);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        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);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeAgentStatus_result.class, metaDataMap);
    }

    public changeAgentStatus_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      changeAgentStatus_result typedOther = (changeAgentStatus_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("changeAgentStatus_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AGENT_FIELD_DESC = new org.apache.thrift.protocol.TField("agent", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.LIST, (short)2);

    private Agent agent; // required
    private List<String> role; // 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 {
      AGENT((short)1, "agent"),
      ROLE((short)2, "role");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AGENT
            return AGENT;
          case 2: // ROLE
            return ROLE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AGENT, new org.apache.thrift.meta_data.FieldMetaData("agent", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Agent.class)));
      tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", 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 = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertAgent_args.class, metaDataMap);
    }

    public insertAgent_args() {
    }

    public insertAgent_args(
      Agent agent,
      List<String> role)
    {
      this();
      this.agent = agent;
      this.role = role;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insertAgent_args(insertAgent_args other) {
      if (other.isSetAgent()) {
        this.agent = new Agent(other.agent);
      }
      if (other.isSetRole()) {
        List<String> __this__role = new ArrayList<String>();
        for (String other_element : other.role) {
          __this__role.add(other_element);
        }
        this.role = __this__role;
      }
    }

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

    @Override
    public void clear() {
      this.agent = null;
      this.role = null;
    }

    public Agent getAgent() {
      return this.agent;
    }

    public void setAgent(Agent agent) {
      this.agent = agent;
    }

    public void unsetAgent() {
      this.agent = null;
    }

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

    public void setAgentIsSet(boolean value) {
      if (!value) {
        this.agent = null;
      }
    }

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

    public java.util.Iterator<String> getRoleIterator() {
      return (this.role == null) ? null : this.role.iterator();
    }

    public void addToRole(String elem) {
      if (this.role == null) {
        this.role = new ArrayList<String>();
      }
      this.role.add(elem);
    }

    public List<String> getRole() {
      return this.role;
    }

    public void setRole(List<String> role) {
      this.role = role;
    }

    public void unsetRole() {
      this.role = null;
    }

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

    public void setRoleIsSet(boolean value) {
      if (!value) {
        this.role = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AGENT:
        if (value == null) {
          unsetAgent();
        } else {
          setAgent((Agent)value);
        }
        break;

      case ROLE:
        if (value == null) {
          unsetRole();
        } else {
          setRole((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AGENT:
        return getAgent();

      case ROLE:
        return getRole();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case AGENT:
        return isSetAgent();
      case ROLE:
        return isSetRole();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_agent = true && this.isSetAgent();
      boolean that_present_agent = true && that.isSetAgent();
      if (this_present_agent || that_present_agent) {
        if (!(this_present_agent && that_present_agent))
          return false;
        if (!this.agent.equals(that.agent))
          return false;
      }

      boolean this_present_role = true && this.isSetRole();
      boolean that_present_role = true && that.isSetRole();
      if (this_present_role || that_present_role) {
        if (!(this_present_role && that_present_role))
          return false;
        if (!this.role.equals(that.role))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      insertAgent_args typedOther = (insertAgent_args)other;

      lastComparison = Boolean.valueOf(isSetAgent()).compareTo(typedOther.isSetAgent());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAgent()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agent, typedOther.agent);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRole()).compareTo(typedOther.isSetRole());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRole()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, typedOther.role);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AGENT
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.agent = new Agent();
              this.agent.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ROLE
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
                this.role = new ArrayList<String>(_list40.size);
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
                {
                  String _elem42; // required
                  _elem42 = iprot.readString();
                  this.role.add(_elem42);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.agent != null) {
        oprot.writeFieldBegin(AGENT_FIELD_DESC);
        this.agent.write(oprot);
        oprot.writeFieldEnd();
      }
      if (this.role != null) {
        oprot.writeFieldBegin(ROLE_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.role.size()));
          for (String _iter43 : this.role)
          {
            oprot.writeString(_iter43);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertAgent_args(");
      boolean first = true;

      sb.append("agent:");
      if (this.agent == null) {
        sb.append("null");
      } else {
        sb.append(this.agent);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("role:");
      if (this.role == null) {
        sb.append("null");
      } else {
        sb.append(this.role);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertAgent_result.class, metaDataMap);
    }

    public insertAgent_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      insertAgent_result typedOther = (insertAgent_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertAgent_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.LIST, (short)2);

    private long id; // required
    private List<String> role; // 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 {
      ID((short)1, "id"),
      ROLE((short)2, "role");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          case 2: // ROLE
            return ROLE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", 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 = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeAgentRole_args.class, metaDataMap);
    }

    public changeAgentRole_args() {
    }

    public changeAgentRole_args(
      long id,
      List<String> role)
    {
      this();
      this.id = id;
      setIdIsSet(true);
      this.role = role;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public changeAgentRole_args(changeAgentRole_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
      if (other.isSetRole()) {
        List<String> __this__role = new ArrayList<String>();
        for (String other_element : other.role) {
          __this__role.add(other_element);
        }
        this.role = __this__role;
      }
    }

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

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
      this.role = null;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

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

    public java.util.Iterator<String> getRoleIterator() {
      return (this.role == null) ? null : this.role.iterator();
    }

    public void addToRole(String elem) {
      if (this.role == null) {
        this.role = new ArrayList<String>();
      }
      this.role.add(elem);
    }

    public List<String> getRole() {
      return this.role;
    }

    public void setRole(List<String> role) {
      this.role = role;
    }

    public void unsetRole() {
      this.role = null;
    }

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

    public void setRoleIsSet(boolean value) {
      if (!value) {
        this.role = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      case ROLE:
        if (value == null) {
          unsetRole();
        } else {
          setRole((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      case ROLE:
        return getRole();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ID:
        return isSetId();
      case ROLE:
        return isSetRole();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      boolean this_present_role = true && this.isSetRole();
      boolean that_present_role = true && that.isSetRole();
      if (this_present_role || that_present_role) {
        if (!(this_present_role && that_present_role))
          return false;
        if (!this.role.equals(that.role))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      changeAgentRole_args typedOther = (changeAgentRole_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetRole()).compareTo(typedOther.isSetRole());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetRole()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, typedOther.role);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ROLE
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
                this.role = new ArrayList<String>(_list44.size);
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
                {
                  String _elem46; // required
                  _elem46 = iprot.readString();
                  this.role.add(_elem46);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      if (this.role != null) {
        oprot.writeFieldBegin(ROLE_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.role.size()));
          for (String _iter47 : this.role)
          {
            oprot.writeString(_iter47);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("changeAgentRole_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("role:");
      if (this.role == null) {
        sb.append("null");
      } else {
        sb.append(this.role);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        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);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(changeAgentRole_result.class, metaDataMap);
    }

    public changeAgentRole_result() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      changeAgentRole_result typedOther = (changeAgentRole_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("changeAgentRole_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long agentId; // 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 {
      AGENT_ID((short)1, "agentId");

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

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

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

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __AGENTID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOpenTicketCountForAgent_args.class, metaDataMap);
    }

    public getOpenTicketCountForAgent_args() {
    }

    public getOpenTicketCountForAgent_args(
      long agentId)
    {
      this();
      this.agentId = agentId;
      setAgentIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOpenTicketCountForAgent_args(getOpenTicketCountForAgent_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.agentId = other.agentId;
    }

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

    @Override
    public void clear() {
      setAgentIdIsSet(false);
      this.agentId = 0;
    }

    public long getAgentId() {
      return this.agentId;
    }

    public void setAgentId(long agentId) {
      this.agentId = agentId;
      setAgentIdIsSet(true);
    }

    public void unsetAgentId() {
      __isset_bit_vector.clear(__AGENTID_ISSET_ID);
    }

    /** Returns true if field agentId is set (has been assigned a value) and false otherwise */
    public boolean isSetAgentId() {
      return __isset_bit_vector.get(__AGENTID_ISSET_ID);
    }

    public void setAgentIdIsSet(boolean value) {
      __isset_bit_vector.set(__AGENTID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AGENT_ID:
        if (value == null) {
          unsetAgentId();
        } else {
          setAgentId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AGENT_ID:
        return Long.valueOf(getAgentId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case AGENT_ID:
        return isSetAgentId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_agentId = true;
      boolean that_present_agentId = true;
      if (this_present_agentId || that_present_agentId) {
        if (!(this_present_agentId && that_present_agentId))
          return false;
        if (this.agentId != that.agentId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getOpenTicketCountForAgent_args typedOther = (getOpenTicketCountForAgent_args)other;

      lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(typedOther.isSetAgentId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAgentId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, typedOther.agentId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AGENT_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.agentId = iprot.readI64();
              setAgentIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

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

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
      oprot.writeI64(this.agentId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOpenTicketCountForAgent_args(");
      boolean first = true;

      sb.append("agentId:");
      sb.append(this.agentId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        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);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);

    private int success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOpenTicketCountForAgent_result.class, metaDataMap);
    }

    public getOpenTicketCountForAgent_result() {
    }

    public getOpenTicketCountForAgent_result(
      int success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOpenTicketCountForAgent_result(getOpenTicketCountForAgent_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

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

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

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

    public void setSuccess(int success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Integer.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getOpenTicketCountForAgent_result typedOther = (getOpenTicketCountForAgent_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOpenTicketCountForAgent_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOpenTicketsMap_args.class, metaDataMap);
    }

    public getOpenTicketsMap_args() {
    }

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

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

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

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

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

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getOpenTicketsMap_args typedOther = (getOpenTicketsMap_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

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

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

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

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOpenTicketsMap_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<String,Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

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

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

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOpenTicketsMap_result.class, metaDataMap);
    }

    public getOpenTicketsMap_result() {
    }

    public getOpenTicketsMap_result(
      Map<String,Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOpenTicketsMap_result(getOpenTicketsMap_result other) {
      if (other.isSetSuccess()) {
        Map<String,Long> __this__success = new HashMap<String,Long>();
        for (Map.Entry<String, Long> other_element : other.success.entrySet()) {

          String other_element_key = other_element.getKey();
          Long other_element_value = other_element.getValue();

          String __this__success_copy_key = other_element_key;

          Long __this__success_copy_value = other_element_value;

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

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

    @Override
    public void clear() {
      this.success = null;
    }

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

    public void putToSuccess(String key, long val) {
      if (this.success == null) {
        this.success = new HashMap<String,Long>();
      }
      this.success.put(key, val);
    }

    public Map<String,Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<String,Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

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

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<String,Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

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

      int lastComparison = 0;
      getOpenTicketsMap_result typedOther = (getOpenTicketsMap_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map48 = iprot.readMapBegin();
                this.success = new HashMap<String,Long>(2*_map48.size);
                for (int _i49 = 0; _i49 < _map48.size; ++_i49)
                {
                  String _key50; // required
                  long _val51; // required
                  _key50 = iprot.readString();
                  _val51 = iprot.readI64();
                  this.success.put(_key50, _val51);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (Map.Entry<String, Long> _iter52 : this.success.entrySet())
          {
            oprot.writeString(_iter52.getKey());
            oprot.writeI64(_iter52.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOpenTicketsMap_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
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

}