Subversion Repositories SmartDukaan

Rev

Rev 3374 | Rev 4391 | 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.logistics;

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 LogisticsService {

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

    /**
     * Returns a provider for a given provider ID. Throws an exception if none found.
     * 
     * @param providerId
     */
    public Provider getProvider(long providerId) throws LogisticsServiceException, org.apache.thrift.TException;

    /**
     * Returns a list containing all the providers.
     */
    public List<Provider> getAllProviders() throws LogisticsServiceException, org.apache.thrift.TException;

    /**
     * Returns a LogisticsInfo structure w/o an airway bill number. Use this method during the estimation phase.
     * Raises an exception if this pincode is not allocated to any warehouse zone or provider. Also, if the pincode
     * is allocated to a warehouse zone but there are no actual warehouses in that zone, an exception is raised.
     * 
     * @param itemId
     * @param destination_pin
     */
    public LogisticsInfo getLogisticsEstimation(long itemId, String destination_pin) throws LogisticsServiceException, org.apache.thrift.TException;

    /**
     * Same as above excpet that an airway bill number is also allocated and returned.
     * 
     * @param destination_pincode
     * @param item_id
     * @param type
     */
    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type) throws LogisticsServiceException, org.apache.thrift.TException;

    /**
     * Returns an unused AWB number for the given provider.
     * 
     * @param providerId
     */
    public String getEmptyAWB(long providerId) throws LogisticsServiceException, org.apache.thrift.TException;

    /**
     * Returns the list of updates for the given AWB number and provider id. The list is empty if there are no updates yet.
     * 
     * @param awb
     * @param providerId
     */
    public List<AwbUpdate> getShipmentInfo(String awb, long providerId) throws LogisticsServiceException, org.apache.thrift.TException;

    /**
     * Returns the short three letter code of a pincode for the given provider.
     *    Raises an exception if the pin code is not serviced by the given provider.
     * 
     * @param providerId
     * @param pinCode
     */
    public String getDestinationCode(long providerId, String pinCode) throws LogisticsServiceException, org.apache.thrift.TException;

    /**
     * Returns the number of unused AWB numbers for the given provider of the given type
     * 
     * @param providerId
     * @param type
     */
    public long getFreeAwbCount(long providerId, String type) throws org.apache.thrift.TException;

    /**
     * Returns list of Holiday dates between fromDate and toDate (both inclusive)
     * fromDate should be passed as milliseconds corresponding to the start of the day.
     * If fromDate is passed as -1, fromDate is not considered for filtering
     * If toDate is passed as -1, toDate is not considered for filtering
     * 
     * @param fromDate
     * @param toDate
     */
    public List<Long> getHolidays(long fromDate, long toDate) throws org.apache.thrift.TException;

    /**
     * Returns true if COD is allowed for this destination pincode
     * 
     * @param destination_pincode
     */
    public boolean isCodAllowed(String destination_pincode) throws org.apache.thrift.TException;

  }

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

    public void getProvider(long providerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getProvider_call> resultHandler) throws org.apache.thrift.TException;

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

    public void getLogisticsEstimation(long itemId, String destination_pin, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLogisticsEstimation_call> resultHandler) throws org.apache.thrift.TException;

    public void getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLogisticsInfo_call> resultHandler) throws org.apache.thrift.TException;

    public void getEmptyAWB(long providerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getEmptyAWB_call> resultHandler) throws org.apache.thrift.TException;

    public void getShipmentInfo(String awb, long providerId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getShipmentInfo_call> resultHandler) throws org.apache.thrift.TException;

    public void getDestinationCode(long providerId, String pinCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getDestinationCode_call> resultHandler) throws org.apache.thrift.TException;

    public void getFreeAwbCount(long providerId, String type, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFreeAwbCount_call> resultHandler) throws org.apache.thrift.TException;

    public void getHolidays(long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHolidays_call> resultHandler) throws org.apache.thrift.TException;

    public void isCodAllowed(String destination_pincode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isCodAllowed_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 Provider getProvider(long providerId) throws LogisticsServiceException, org.apache.thrift.TException
    {
      send_getProvider(providerId);
      return recv_getProvider();
    }

    public void send_getProvider(long providerId) throws org.apache.thrift.TException
    {
      getProvider_args args = new getProvider_args();
      args.setProviderId(providerId);
      sendBase("getProvider", args);
    }

    public Provider recv_getProvider() throws LogisticsServiceException, org.apache.thrift.TException
    {
      getProvider_result result = new getProvider_result();
      receiveBase(result, "getProvider");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.lse != null) {
        throw result.lse;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
    }

    public List<Provider> getAllProviders() throws LogisticsServiceException, org.apache.thrift.TException
    {
      send_getAllProviders();
      return recv_getAllProviders();
    }

    public void send_getAllProviders() throws org.apache.thrift.TException
    {
      getAllProviders_args args = new getAllProviders_args();
      sendBase("getAllProviders", args);
    }

    public List<Provider> recv_getAllProviders() throws LogisticsServiceException, org.apache.thrift.TException
    {
      getAllProviders_result result = new getAllProviders_result();
      receiveBase(result, "getAllProviders");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.lse != null) {
        throw result.lse;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllProviders failed: unknown result");
    }

    public LogisticsInfo getLogisticsEstimation(long itemId, String destination_pin) throws LogisticsServiceException, org.apache.thrift.TException
    {
      send_getLogisticsEstimation(itemId, destination_pin);
      return recv_getLogisticsEstimation();
    }

    public void send_getLogisticsEstimation(long itemId, String destination_pin) throws org.apache.thrift.TException
    {
      getLogisticsEstimation_args args = new getLogisticsEstimation_args();
      args.setItemId(itemId);
      args.setDestination_pin(destination_pin);
      sendBase("getLogisticsEstimation", args);
    }

    public LogisticsInfo recv_getLogisticsEstimation() throws LogisticsServiceException, org.apache.thrift.TException
    {
      getLogisticsEstimation_result result = new getLogisticsEstimation_result();
      receiveBase(result, "getLogisticsEstimation");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
    }

    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type) throws LogisticsServiceException, org.apache.thrift.TException
    {
      send_getLogisticsInfo(destination_pincode, item_id, type);
      return recv_getLogisticsInfo();
    }

    public void send_getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type) throws org.apache.thrift.TException
    {
      getLogisticsInfo_args args = new getLogisticsInfo_args();
      args.setDestination_pincode(destination_pincode);
      args.setItem_id(item_id);
      args.setType(type);
      sendBase("getLogisticsInfo", args);
    }

    public LogisticsInfo recv_getLogisticsInfo() throws LogisticsServiceException, org.apache.thrift.TException
    {
      getLogisticsInfo_result result = new getLogisticsInfo_result();
      receiveBase(result, "getLogisticsInfo");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
    }

    public String getEmptyAWB(long providerId) throws LogisticsServiceException, org.apache.thrift.TException
    {
      send_getEmptyAWB(providerId);
      return recv_getEmptyAWB();
    }

    public void send_getEmptyAWB(long providerId) throws org.apache.thrift.TException
    {
      getEmptyAWB_args args = new getEmptyAWB_args();
      args.setProviderId(providerId);
      sendBase("getEmptyAWB", args);
    }

    public String recv_getEmptyAWB() throws LogisticsServiceException, org.apache.thrift.TException
    {
      getEmptyAWB_result result = new getEmptyAWB_result();
      receiveBase(result, "getEmptyAWB");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
    }

    public List<AwbUpdate> getShipmentInfo(String awb, long providerId) throws LogisticsServiceException, org.apache.thrift.TException
    {
      send_getShipmentInfo(awb, providerId);
      return recv_getShipmentInfo();
    }

    public void send_getShipmentInfo(String awb, long providerId) throws org.apache.thrift.TException
    {
      getShipmentInfo_args args = new getShipmentInfo_args();
      args.setAwb(awb);
      args.setProviderId(providerId);
      sendBase("getShipmentInfo", args);
    }

    public List<AwbUpdate> recv_getShipmentInfo() throws LogisticsServiceException, org.apache.thrift.TException
    {
      getShipmentInfo_result result = new getShipmentInfo_result();
      receiveBase(result, "getShipmentInfo");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
    }

    public String getDestinationCode(long providerId, String pinCode) throws LogisticsServiceException, org.apache.thrift.TException
    {
      send_getDestinationCode(providerId, pinCode);
      return recv_getDestinationCode();
    }

    public void send_getDestinationCode(long providerId, String pinCode) throws org.apache.thrift.TException
    {
      getDestinationCode_args args = new getDestinationCode_args();
      args.setProviderId(providerId);
      args.setPinCode(pinCode);
      sendBase("getDestinationCode", args);
    }

    public String recv_getDestinationCode() throws LogisticsServiceException, org.apache.thrift.TException
    {
      getDestinationCode_result result = new getDestinationCode_result();
      receiveBase(result, "getDestinationCode");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getDestinationCode failed: unknown result");
    }

    public long getFreeAwbCount(long providerId, String type) throws org.apache.thrift.TException
    {
      send_getFreeAwbCount(providerId, type);
      return recv_getFreeAwbCount();
    }

    public void send_getFreeAwbCount(long providerId, String type) throws org.apache.thrift.TException
    {
      getFreeAwbCount_args args = new getFreeAwbCount_args();
      args.setProviderId(providerId);
      args.setType(type);
      sendBase("getFreeAwbCount", args);
    }

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

    public List<Long> getHolidays(long fromDate, long toDate) throws org.apache.thrift.TException
    {
      send_getHolidays(fromDate, toDate);
      return recv_getHolidays();
    }

    public void send_getHolidays(long fromDate, long toDate) throws org.apache.thrift.TException
    {
      getHolidays_args args = new getHolidays_args();
      args.setFromDate(fromDate);
      args.setToDate(toDate);
      sendBase("getHolidays", args);
    }

    public List<Long> recv_getHolidays() throws org.apache.thrift.TException
    {
      getHolidays_result result = new getHolidays_result();
      receiveBase(result, "getHolidays");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
    }

    public boolean isCodAllowed(String destination_pincode) throws org.apache.thrift.TException
    {
      send_isCodAllowed(destination_pincode);
      return recv_isCodAllowed();
    }

    public void send_isCodAllowed(String destination_pincode) throws org.apache.thrift.TException
    {
      isCodAllowed_args args = new isCodAllowed_args();
      args.setDestination_pincode(destination_pincode);
      sendBase("isCodAllowed", args);
    }

    public boolean recv_isCodAllowed() throws org.apache.thrift.TException
    {
      isCodAllowed_result result = new isCodAllowed_result();
      receiveBase(result, "isCodAllowed");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isCodAllowed 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 getProvider(long providerId, org.apache.thrift.async.AsyncMethodCallback<getProvider_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getProvider_call method_call = new getProvider_call(providerId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

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

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

      public Provider getResult() throws LogisticsServiceException, 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_getProvider();
      }
    }

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

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

      public List<Provider> getResult() throws LogisticsServiceException, 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_getAllProviders();
      }
    }

    public void getLogisticsEstimation(long itemId, String destination_pin, org.apache.thrift.async.AsyncMethodCallback<getLogisticsEstimation_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLogisticsEstimation_call method_call = new getLogisticsEstimation_call(itemId, destination_pin, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLogisticsEstimation_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private String destination_pin;
      public getLogisticsEstimation_call(long itemId, String destination_pin, org.apache.thrift.async.AsyncMethodCallback<getLogisticsEstimation_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.itemId = itemId;
        this.destination_pin = destination_pin;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLogisticsEstimation", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLogisticsEstimation_args args = new getLogisticsEstimation_args();
        args.setItemId(itemId);
        args.setDestination_pin(destination_pin);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public LogisticsInfo getResult() throws LogisticsServiceException, 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_getLogisticsEstimation();
      }
    }

    public void getLogisticsInfo(String destination_pincode, long item_id, DeliveryType type, org.apache.thrift.async.AsyncMethodCallback<getLogisticsInfo_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLogisticsInfo_call method_call = new getLogisticsInfo_call(destination_pincode, item_id, type, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLogisticsInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String destination_pincode;
      private long item_id;
      private DeliveryType type;
      public getLogisticsInfo_call(String destination_pincode, long item_id, DeliveryType type, org.apache.thrift.async.AsyncMethodCallback<getLogisticsInfo_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.destination_pincode = destination_pincode;
        this.item_id = item_id;
        this.type = type;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLogisticsInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLogisticsInfo_args args = new getLogisticsInfo_args();
        args.setDestination_pincode(destination_pincode);
        args.setItem_id(item_id);
        args.setType(type);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public LogisticsInfo getResult() throws LogisticsServiceException, 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_getLogisticsInfo();
      }
    }

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

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

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

      public String getResult() throws LogisticsServiceException, 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_getEmptyAWB();
      }
    }

    public void getShipmentInfo(String awb, long providerId, org.apache.thrift.async.AsyncMethodCallback<getShipmentInfo_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getShipmentInfo_call method_call = new getShipmentInfo_call(awb, providerId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getShipmentInfo_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String awb;
      private long providerId;
      public getShipmentInfo_call(String awb, long providerId, org.apache.thrift.async.AsyncMethodCallback<getShipmentInfo_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.awb = awb;
        this.providerId = providerId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getShipmentInfo", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getShipmentInfo_args args = new getShipmentInfo_args();
        args.setAwb(awb);
        args.setProviderId(providerId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<AwbUpdate> getResult() throws LogisticsServiceException, 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_getShipmentInfo();
      }
    }

    public void getDestinationCode(long providerId, String pinCode, org.apache.thrift.async.AsyncMethodCallback<getDestinationCode_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getDestinationCode_call method_call = new getDestinationCode_call(providerId, pinCode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getDestinationCode_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long providerId;
      private String pinCode;
      public getDestinationCode_call(long providerId, String pinCode, org.apache.thrift.async.AsyncMethodCallback<getDestinationCode_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.providerId = providerId;
        this.pinCode = pinCode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getDestinationCode", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getDestinationCode_args args = new getDestinationCode_args();
        args.setProviderId(providerId);
        args.setPinCode(pinCode);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws LogisticsServiceException, 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_getDestinationCode();
      }
    }

    public void getFreeAwbCount(long providerId, String type, org.apache.thrift.async.AsyncMethodCallback<getFreeAwbCount_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getFreeAwbCount_call method_call = new getFreeAwbCount_call(providerId, type, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getFreeAwbCount_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long providerId;
      private String type;
      public getFreeAwbCount_call(long providerId, String type, org.apache.thrift.async.AsyncMethodCallback<getFreeAwbCount_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.providerId = providerId;
        this.type = type;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFreeAwbCount", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getFreeAwbCount_args args = new getFreeAwbCount_args();
        args.setProviderId(providerId);
        args.setType(type);
        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_getFreeAwbCount();
      }
    }

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

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

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHolidays", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getHolidays_args args = new getHolidays_args();
        args.setFromDate(fromDate);
        args.setToDate(toDate);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<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_getHolidays();
      }
    }

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

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

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

      public boolean 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_isCodAllowed();
      }
    }

  }

  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("getProvider", new getProvider());
      processMap.put("getAllProviders", new getAllProviders());
      processMap.put("getLogisticsEstimation", new getLogisticsEstimation());
      processMap.put("getLogisticsInfo", new getLogisticsInfo());
      processMap.put("getEmptyAWB", new getEmptyAWB());
      processMap.put("getShipmentInfo", new getShipmentInfo());
      processMap.put("getDestinationCode", new getDestinationCode());
      processMap.put("getFreeAwbCount", new getFreeAwbCount());
      processMap.put("getHolidays", new getHolidays());
      processMap.put("isCodAllowed", new isCodAllowed());
      return processMap;
    }

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

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

      protected getProvider_result getResult(I iface, getProvider_args args) throws org.apache.thrift.TException {
        getProvider_result result = new getProvider_result();
        try {
          result.success = iface.getProvider(args.providerId);
        } catch (LogisticsServiceException lse) {
          result.lse = lse;
        }
        return result;
      }
    }

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

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

      protected getAllProviders_result getResult(I iface, getAllProviders_args args) throws org.apache.thrift.TException {
        getAllProviders_result result = new getAllProviders_result();
        try {
          result.success = iface.getAllProviders();
        } catch (LogisticsServiceException lse) {
          result.lse = lse;
        }
        return result;
      }
    }

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

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

      protected getLogisticsEstimation_result getResult(I iface, getLogisticsEstimation_args args) throws org.apache.thrift.TException {
        getLogisticsEstimation_result result = new getLogisticsEstimation_result();
        try {
          result.success = iface.getLogisticsEstimation(args.itemId, args.destination_pin);
        } catch (LogisticsServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

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

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

      protected getLogisticsInfo_result getResult(I iface, getLogisticsInfo_args args) throws org.apache.thrift.TException {
        getLogisticsInfo_result result = new getLogisticsInfo_result();
        try {
          result.success = iface.getLogisticsInfo(args.destination_pincode, args.item_id, args.type);
        } catch (LogisticsServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

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

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

      protected getEmptyAWB_result getResult(I iface, getEmptyAWB_args args) throws org.apache.thrift.TException {
        getEmptyAWB_result result = new getEmptyAWB_result();
        try {
          result.success = iface.getEmptyAWB(args.providerId);
        } catch (LogisticsServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

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

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

      protected getShipmentInfo_result getResult(I iface, getShipmentInfo_args args) throws org.apache.thrift.TException {
        getShipmentInfo_result result = new getShipmentInfo_result();
        try {
          result.success = iface.getShipmentInfo(args.awb, args.providerId);
        } catch (LogisticsServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

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

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

      protected getDestinationCode_result getResult(I iface, getDestinationCode_args args) throws org.apache.thrift.TException {
        getDestinationCode_result result = new getDestinationCode_result();
        try {
          result.success = iface.getDestinationCode(args.providerId, args.pinCode);
        } catch (LogisticsServiceException se) {
          result.se = se;
        }
        return result;
      }
    }

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

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

      protected getFreeAwbCount_result getResult(I iface, getFreeAwbCount_args args) throws org.apache.thrift.TException {
        getFreeAwbCount_result result = new getFreeAwbCount_result();
        result.success = iface.getFreeAwbCount(args.providerId, args.type);
        result.setSuccessIsSet(true);
        return result;
      }
    }

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

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

      protected getHolidays_result getResult(I iface, getHolidays_args args) throws org.apache.thrift.TException {
        getHolidays_result result = new getHolidays_result();
        result.success = iface.getHolidays(args.fromDate, args.toDate);
        return result;
      }
    }

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

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

      protected isCodAllowed_result getResult(I iface, isCodAllowed_args args) throws org.apache.thrift.TException {
        isCodAllowed_result result = new isCodAllowed_result();
        result.success = iface.isCodAllowed(args.destination_pincode);
        result.setSuccessIsSet(true);
        return result;
      }
    }

  }

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

    private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long providerId; // 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 {
      PROVIDER_ID((short)1, "providerId");

      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: // PROVIDER_ID
            return PROVIDER_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 __PROVIDERID_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.PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", 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(getProvider_args.class, metaDataMap);
    }

    public getProvider_args() {
    }

    public getProvider_args(
      long providerId)
    {
      this();
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setProviderIdIsSet(false);
      this.providerId = 0;
    }

    public long getProviderId() {
      return this.providerId;
    }

    public void setProviderId(long providerId) {
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

    public void unsetProviderId() {
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
    }

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

    public void setProviderIdIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROVIDER_ID:
        if (value == null) {
          unsetProviderId();
        } else {
          setProviderId((Long)value);
        }
        break;

      }
    }

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

      }
      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 PROVIDER_ID:
        return isSetProviderId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_providerId = true;
      boolean that_present_providerId = true;
      if (this_present_providerId || that_present_providerId) {
        if (!(this_present_providerId && that_present_providerId))
          return false;
        if (this.providerId != that.providerId)
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(typedOther.isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProviderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);
        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: // PROVIDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.providerId = iprot.readI64();
              setProviderIdIsSet(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(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.providerId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("providerId:");
      sb.append(this.providerId);
      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 getProvider_result implements org.apache.thrift.TBase<getProvider_result, getProvider_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getProvider_result");

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

    private Provider success; // required
    private LogisticsServiceException lse; // 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"),
      LSE((short)1, "lse");

      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;
          case 1: // LSE
            return LSE;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

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

    public getProvider_result() {
    }

    public getProvider_result(
      Provider success,
      LogisticsServiceException lse)
    {
      this();
      this.success = success;
      this.lse = lse;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getProvider_result(getProvider_result other) {
      if (other.isSetSuccess()) {
        this.success = new Provider(other.success);
      }
      if (other.isSetLse()) {
        this.lse = new LogisticsServiceException(other.lse);
      }
    }

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

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

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

    public void setSuccess(Provider 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 LogisticsServiceException getLse() {
      return this.lse;
    }

    public void setLse(LogisticsServiceException lse) {
      this.lse = lse;
    }

    public void unsetLse() {
      this.lse = null;
    }

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

    public void setLseIsSet(boolean value) {
      if (!value) {
        this.lse = null;
      }
    }

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

      case LSE:
        if (value == null) {
          unsetLse();
        } else {
          setLse((LogisticsServiceException)value);
        }
        break;

      }
    }

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

      case LSE:
        return getLse();

      }
      throw new IllegalStateException();
    }

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

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

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

    public boolean equals(getProvider_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;
      }

      boolean this_present_lse = true && this.isSetLse();
      boolean that_present_lse = true && that.isSetLse();
      if (this_present_lse || that_present_lse) {
        if (!(this_present_lse && that_present_lse))
          return false;
        if (!this.lse.equals(that.lse))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      getProvider_result typedOther = (getProvider_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;
        }
      }
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(typedOther.isSetLse());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLse()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lse, typedOther.lse);
        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.STRUCT) {
              this.success = new Provider();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // LSE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.lse = new LogisticsServiceException();
              this.lse.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 {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetLse()) {
        oprot.writeFieldBegin(LSE_FIELD_DESC);
        this.lse.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lse:");
      if (this.lse == null) {
        sb.append("null");
      } else {
        sb.append(this.lse);
      }
      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 getAllProviders_args implements org.apache.thrift.TBase<getAllProviders_args, getAllProviders_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllProviders_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(getAllProviders_args.class, metaDataMap);
    }

    public getAllProviders_args() {
    }

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

    public getAllProviders_args deepCopy() {
      return new getAllProviders_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 getAllProviders_args)
        return this.equals((getAllProviders_args)that);
      return false;
    }

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

      return true;
    }

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

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

      int lastComparison = 0;
      getAllProviders_args typedOther = (getAllProviders_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("getAllProviders_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 getAllProviders_result implements org.apache.thrift.TBase<getAllProviders_result, getAllProviders_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllProviders_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField LSE_FIELD_DESC = new org.apache.thrift.protocol.TField("lse", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Provider> success; // required
    private LogisticsServiceException lse; // 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"),
      LSE((short)1, "lse");

      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;
          case 1: // LSE
            return LSE;
          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, Provider.class))));
      tmpMap.put(_Fields.LSE, new org.apache.thrift.meta_data.FieldMetaData("lse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllProviders_result.class, metaDataMap);
    }

    public getAllProviders_result() {
    }

    public getAllProviders_result(
      List<Provider> success,
      LogisticsServiceException lse)
    {
      this();
      this.success = success;
      this.lse = lse;
    }

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

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

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

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

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

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

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

    public void setSuccess(List<Provider> 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 LogisticsServiceException getLse() {
      return this.lse;
    }

    public void setLse(LogisticsServiceException lse) {
      this.lse = lse;
    }

    public void unsetLse() {
      this.lse = null;
    }

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

    public void setLseIsSet(boolean value) {
      if (!value) {
        this.lse = null;
      }
    }

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

      case LSE:
        if (value == null) {
          unsetLse();
        } else {
          setLse((LogisticsServiceException)value);
        }
        break;

      }
    }

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

      case LSE:
        return getLse();

      }
      throw new IllegalStateException();
    }

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

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

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

    public boolean equals(getAllProviders_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;
      }

      boolean this_present_lse = true && this.isSetLse();
      boolean that_present_lse = true && that.isSetLse();
      if (this_present_lse || that_present_lse) {
        if (!(this_present_lse && that_present_lse))
          return false;
        if (!this.lse.equals(that.lse))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      getAllProviders_result typedOther = (getAllProviders_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;
        }
      }
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(typedOther.isSetLse());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLse()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lse, typedOther.lse);
        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 _list5 = iprot.readListBegin();
                this.success = new ArrayList<Provider>(_list5.size);
                for (int _i6 = 0; _i6 < _list5.size; ++_i6)
                {
                  Provider _elem7; // required
                  _elem7 = new Provider();
                  _elem7.read(iprot);
                  this.success.add(_elem7);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // LSE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.lse = new LogisticsServiceException();
              this.lse.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 {
      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 (Provider _iter8 : this.success)
          {
            _iter8.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetLse()) {
        oprot.writeFieldBegin(LSE_FIELD_DESC);
        this.lse.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("lse:");
      if (this.lse == null) {
        sb.append("null");
      } else {
        sb.append(this.lse);
      }
      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 getLogisticsEstimation_args implements org.apache.thrift.TBase<getLogisticsEstimation_args, getLogisticsEstimation_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLogisticsEstimation_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField DESTINATION_PIN_FIELD_DESC = new org.apache.thrift.protocol.TField("destination_pin", org.apache.thrift.protocol.TType.STRING, (short)2);

    private long itemId; // required
    private String destination_pin; // 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 {
      ITEM_ID((short)1, "itemId"),
      DESTINATION_PIN((short)2, "destination_pin");

      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: // ITEM_ID
            return ITEM_ID;
          case 2: // DESTINATION_PIN
            return DESTINATION_PIN;
          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 __ITEMID_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.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.DESTINATION_PIN, new org.apache.thrift.meta_data.FieldMetaData("destination_pin", 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(getLogisticsEstimation_args.class, metaDataMap);
    }

    public getLogisticsEstimation_args() {
    }

    public getLogisticsEstimation_args(
      long itemId,
      String destination_pin)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.destination_pin = destination_pin;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLogisticsEstimation_args(getLogisticsEstimation_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      if (other.isSetDestination_pin()) {
        this.destination_pin = other.destination_pin;
      }
    }

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

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      this.destination_pin = null;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

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

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public String getDestination_pin() {
      return this.destination_pin;
    }

    public void setDestination_pin(String destination_pin) {
      this.destination_pin = destination_pin;
    }

    public void unsetDestination_pin() {
      this.destination_pin = null;
    }

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

    public void setDestination_pinIsSet(boolean value) {
      if (!value) {
        this.destination_pin = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case DESTINATION_PIN:
        if (value == null) {
          unsetDestination_pin();
        } else {
          setDestination_pin((String)value);
        }
        break;

      }
    }

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

      case DESTINATION_PIN:
        return getDestination_pin();

      }
      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 ITEM_ID:
        return isSetItemId();
      case DESTINATION_PIN:
        return isSetDestination_pin();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_destination_pin = true && this.isSetDestination_pin();
      boolean that_present_destination_pin = true && that.isSetDestination_pin();
      if (this_present_destination_pin || that_present_destination_pin) {
        if (!(this_present_destination_pin && that_present_destination_pin))
          return false;
        if (!this.destination_pin.equals(that.destination_pin))
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDestination_pin()).compareTo(typedOther.isSetDestination_pin());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDestination_pin()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destination_pin, typedOther.destination_pin);
        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: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // DESTINATION_PIN
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.destination_pin = 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(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      if (this.destination_pin != null) {
        oprot.writeFieldBegin(DESTINATION_PIN_FIELD_DESC);
        oprot.writeString(this.destination_pin);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("destination_pin:");
      if (this.destination_pin == null) {
        sb.append("null");
      } else {
        sb.append(this.destination_pin);
      }
      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 getLogisticsEstimation_result implements org.apache.thrift.TBase<getLogisticsEstimation_result, getLogisticsEstimation_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLogisticsEstimation_result");

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

    private LogisticsInfo success; // required
    private LogisticsServiceException se; // 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"),
      SE((short)1, "se");

      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;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

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

    public getLogisticsEstimation_result() {
    }

    public getLogisticsEstimation_result(
      LogisticsInfo success,
      LogisticsServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLogisticsEstimation_result(getLogisticsEstimation_result other) {
      if (other.isSetSuccess()) {
        this.success = new LogisticsInfo(other.success);
      }
      if (other.isSetSe()) {
        this.se = new LogisticsServiceException(other.se);
      }
    }

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

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

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

    public void setSuccess(LogisticsInfo 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 LogisticsServiceException getSe() {
      return this.se;
    }

    public void setSe(LogisticsServiceException se) {
      this.se = se;
    }

    public void unsetSe() {
      this.se = null;
    }

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

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

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

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((LogisticsServiceException)value);
        }
        break;

      }
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

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

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

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

    public boolean equals(getLogisticsEstimation_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;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      getLogisticsEstimation_result typedOther = (getLogisticsEstimation_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;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(typedOther.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, typedOther.se);
        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.STRUCT) {
              this.success = new LogisticsInfo();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.se = new LogisticsServiceException();
              this.se.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 {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSe()) {
        oprot.writeFieldBegin(SE_FIELD_DESC);
        this.se.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      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 getLogisticsInfo_args implements org.apache.thrift.TBase<getLogisticsInfo_args, getLogisticsInfo_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLogisticsInfo_args");

    private static final org.apache.thrift.protocol.TField DESTINATION_PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("destination_pincode", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)3);

    private String destination_pincode; // required
    private long item_id; // required
    private DeliveryType type; // 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 {
      DESTINATION_PINCODE((short)1, "destination_pincode"),
      ITEM_ID((short)2, "item_id"),
      /**
       * 
       * @see DeliveryType
       */
      TYPE((short)3, "type");

      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: // DESTINATION_PINCODE
            return DESTINATION_PINCODE;
          case 2: // ITEM_ID
            return ITEM_ID;
          case 3: // TYPE
            return TYPE;
          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 __ITEM_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.DESTINATION_PINCODE, new org.apache.thrift.meta_data.FieldMetaData("destination_pincode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DeliveryType.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLogisticsInfo_args.class, metaDataMap);
    }

    public getLogisticsInfo_args() {
    }

    public getLogisticsInfo_args(
      String destination_pincode,
      long item_id,
      DeliveryType type)
    {
      this();
      this.destination_pincode = destination_pincode;
      this.item_id = item_id;
      setItem_idIsSet(true);
      this.type = type;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLogisticsInfo_args(getLogisticsInfo_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetDestination_pincode()) {
        this.destination_pincode = other.destination_pincode;
      }
      this.item_id = other.item_id;
      if (other.isSetType()) {
        this.type = other.type;
      }
    }

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

    @Override
    public void clear() {
      this.destination_pincode = null;
      setItem_idIsSet(false);
      this.item_id = 0;
      this.type = null;
    }

    public String getDestination_pincode() {
      return this.destination_pincode;
    }

    public void setDestination_pincode(String destination_pincode) {
      this.destination_pincode = destination_pincode;
    }

    public void unsetDestination_pincode() {
      this.destination_pincode = null;
    }

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

    public void setDestination_pincodeIsSet(boolean value) {
      if (!value) {
        this.destination_pincode = null;
      }
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

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

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    /**
     * 
     * @see DeliveryType
     */
    public DeliveryType getType() {
      return this.type;
    }

    /**
     * 
     * @see DeliveryType
     */
    public void setType(DeliveryType type) {
      this.type = type;
    }

    public void unsetType() {
      this.type = null;
    }

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

    public void setTypeIsSet(boolean value) {
      if (!value) {
        this.type = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DESTINATION_PINCODE:
        if (value == null) {
          unsetDestination_pincode();
        } else {
          setDestination_pincode((String)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      case TYPE:
        if (value == null) {
          unsetType();
        } else {
          setType((DeliveryType)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DESTINATION_PINCODE:
        return getDestination_pincode();

      case ITEM_ID:
        return Long.valueOf(getItem_id());

      case TYPE:
        return getType();

      }
      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 DESTINATION_PINCODE:
        return isSetDestination_pincode();
      case ITEM_ID:
        return isSetItem_id();
      case TYPE:
        return isSetType();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_destination_pincode = true && this.isSetDestination_pincode();
      boolean that_present_destination_pincode = true && that.isSetDestination_pincode();
      if (this_present_destination_pincode || that_present_destination_pincode) {
        if (!(this_present_destination_pincode && that_present_destination_pincode))
          return false;
        if (!this.destination_pincode.equals(that.destination_pincode))
          return false;
      }

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      boolean this_present_type = true && this.isSetType();
      boolean that_present_type = true && that.isSetType();
      if (this_present_type || that_present_type) {
        if (!(this_present_type && that_present_type))
          return false;
        if (!this.type.equals(that.type))
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetDestination_pincode()).compareTo(typedOther.isSetDestination_pincode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDestination_pincode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destination_pincode, typedOther.destination_pincode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
        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: // DESTINATION_PINCODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.destination_pincode = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // TYPE
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.type = DeliveryType.findByValue(iprot.readI32());
            } 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.destination_pincode != null) {
        oprot.writeFieldBegin(DESTINATION_PINCODE_FIELD_DESC);
        oprot.writeString(this.destination_pincode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      if (this.type != null) {
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
        oprot.writeI32(this.type.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("destination_pincode:");
      if (this.destination_pincode == null) {
        sb.append("null");
      } else {
        sb.append(this.destination_pincode);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("type:");
      if (this.type == null) {
        sb.append("null");
      } else {
        sb.append(this.type);
      }
      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 getLogisticsInfo_result implements org.apache.thrift.TBase<getLogisticsInfo_result, getLogisticsInfo_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLogisticsInfo_result");

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

    private LogisticsInfo success; // required
    private LogisticsServiceException se; // 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"),
      SE((short)1, "se");

      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;
          case 1: // SE
            return SE;
          default:
            return null;
        }
      }

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

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

      private final short _thriftId;
      private final String _fieldName;

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

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

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

    public getLogisticsInfo_result() {
    }

    public getLogisticsInfo_result(
      LogisticsInfo success,
      LogisticsServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLogisticsInfo_result(getLogisticsInfo_result other) {
      if (other.isSetSuccess()) {
        this.success = new LogisticsInfo(other.success);
      }
      if (other.isSetSe()) {
        this.se = new LogisticsServiceException(other.se);
      }
    }

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

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

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

    public void setSuccess(LogisticsInfo 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 LogisticsServiceException getSe() {
      return this.se;
    }

    public void setSe(LogisticsServiceException se) {
      this.se = se;
    }

    public void unsetSe() {
      this.se = null;
    }

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

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

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

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((LogisticsServiceException)value);
        }
        break;

      }
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

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

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

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

    public boolean equals(getLogisticsInfo_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;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      getLogisticsInfo_result typedOther = (getLogisticsInfo_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;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(typedOther.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, typedOther.se);
        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.STRUCT) {
              this.success = new LogisticsInfo();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.se = new LogisticsServiceException();
              this.se.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 {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetSe()) {
        oprot.writeFieldBegin(SE_FIELD_DESC);
        this.se.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      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 getEmptyAWB_args implements org.apache.thrift.TBase<getEmptyAWB_args, getEmptyAWB_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEmptyAWB_args");

    private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long providerId; // 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 {
      PROVIDER_ID((short)1, "providerId");

      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: // PROVIDER_ID
            return PROVIDER_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 __PROVIDERID_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.PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", 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(getEmptyAWB_args.class, metaDataMap);
    }

    public getEmptyAWB_args() {
    }

    public getEmptyAWB_args(
      long providerId)
    {
      this();
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setProviderIdIsSet(false);
      this.providerId = 0;
    }

    public long getProviderId() {
      return this.providerId;
    }

    public void setProviderId(long providerId) {
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

    public void unsetProviderId() {
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
    }

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

    public void setProviderIdIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROVIDER_ID:
        if (value == null) {
          unsetProviderId();
        } else {
          setProviderId((Long)value);
        }
        break;

      }
    }

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

      }
      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 PROVIDER_ID:
        return isSetProviderId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_providerId = true;
      boolean that_present_providerId = true;
      if (this_present_providerId || that_present_providerId) {
        if (!(this_present_providerId && that_present_providerId))
          return false;
        if (this.providerId != that.providerId)
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(typedOther.isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProviderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);
        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: // PROVIDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.providerId = iprot.readI64();
              setProviderIdIsSet(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(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.providerId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("providerId:");
      sb.append(this.providerId);
      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 getEmptyAWB_result implements org.apache.thrift.TBase<getEmptyAWB_result, getEmptyAWB_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEmptyAWB_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private String success; // required
    private LogisticsServiceException se; // 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"),
      SE((short)1, "se");

      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;
          case 1: // SE
            return SE;
          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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getEmptyAWB_result.class, metaDataMap);
    }

    public getEmptyAWB_result() {
    }

    public getEmptyAWB_result(
      String success,
      LogisticsServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getEmptyAWB_result(getEmptyAWB_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetSe()) {
        this.se = new LogisticsServiceException(other.se);
      }
    }

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

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

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

    public void setSuccess(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 LogisticsServiceException getSe() {
      return this.se;
    }

    public void setSe(LogisticsServiceException se) {
      this.se = se;
    }

    public void unsetSe() {
      this.se = null;
    }

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

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

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

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((LogisticsServiceException)value);
        }
        break;

      }
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

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

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

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

    public boolean equals(getEmptyAWB_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;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      getEmptyAWB_result typedOther = (getEmptyAWB_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;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(typedOther.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, typedOther.se);
        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.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.se = new LogisticsServiceException();
              this.se.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 {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetSe()) {
        oprot.writeFieldBegin(SE_FIELD_DESC);
        this.se.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      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 getShipmentInfo_args implements org.apache.thrift.TBase<getShipmentInfo_args, getShipmentInfo_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getShipmentInfo_args");

    private static final org.apache.thrift.protocol.TField AWB_FIELD_DESC = new org.apache.thrift.protocol.TField("awb", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)2);

    private String awb; // required
    private long providerId; // 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 {
      AWB((short)1, "awb"),
      PROVIDER_ID((short)2, "providerId");

      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: // AWB
            return AWB;
          case 2: // PROVIDER_ID
            return PROVIDER_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 __PROVIDERID_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.AWB, new org.apache.thrift.meta_data.FieldMetaData("awb", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", 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(getShipmentInfo_args.class, metaDataMap);
    }

    public getShipmentInfo_args() {
    }

    public getShipmentInfo_args(
      String awb,
      long providerId)
    {
      this();
      this.awb = awb;
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getShipmentInfo_args(getShipmentInfo_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetAwb()) {
        this.awb = other.awb;
      }
      this.providerId = other.providerId;
    }

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

    @Override
    public void clear() {
      this.awb = null;
      setProviderIdIsSet(false);
      this.providerId = 0;
    }

    public String getAwb() {
      return this.awb;
    }

    public void setAwb(String awb) {
      this.awb = awb;
    }

    public void unsetAwb() {
      this.awb = null;
    }

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

    public void setAwbIsSet(boolean value) {
      if (!value) {
        this.awb = null;
      }
    }

    public long getProviderId() {
      return this.providerId;
    }

    public void setProviderId(long providerId) {
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

    public void unsetProviderId() {
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
    }

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

    public void setProviderIdIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AWB:
        if (value == null) {
          unsetAwb();
        } else {
          setAwb((String)value);
        }
        break;

      case PROVIDER_ID:
        if (value == null) {
          unsetProviderId();
        } else {
          setProviderId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AWB:
        return getAwb();

      case PROVIDER_ID:
        return Long.valueOf(getProviderId());

      }
      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 AWB:
        return isSetAwb();
      case PROVIDER_ID:
        return isSetProviderId();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_awb = true && this.isSetAwb();
      boolean that_present_awb = true && that.isSetAwb();
      if (this_present_awb || that_present_awb) {
        if (!(this_present_awb && that_present_awb))
          return false;
        if (!this.awb.equals(that.awb))
          return false;
      }

      boolean this_present_providerId = true;
      boolean that_present_providerId = true;
      if (this_present_providerId || that_present_providerId) {
        if (!(this_present_providerId && that_present_providerId))
          return false;
        if (this.providerId != that.providerId)
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetAwb()).compareTo(typedOther.isSetAwb());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAwb()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.awb, typedOther.awb);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(typedOther.isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProviderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);
        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: // AWB
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.awb = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PROVIDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.providerId = iprot.readI64();
              setProviderIdIsSet(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);
      if (this.awb != null) {
        oprot.writeFieldBegin(AWB_FIELD_DESC);
        oprot.writeString(this.awb);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.providerId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("awb:");
      if (this.awb == null) {
        sb.append("null");
      } else {
        sb.append(this.awb);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("providerId:");
      sb.append(this.providerId);
      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 getShipmentInfo_result implements org.apache.thrift.TBase<getShipmentInfo_result, getShipmentInfo_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getShipmentInfo_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<AwbUpdate> success; // required
    private LogisticsServiceException se; // 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"),
      SE((short)1, "se");

      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;
          case 1: // SE
            return SE;
          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, AwbUpdate.class))));
      tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getShipmentInfo_result.class, metaDataMap);
    }

    public getShipmentInfo_result() {
    }

    public getShipmentInfo_result(
      List<AwbUpdate> success,
      LogisticsServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

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

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

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

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

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

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

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

    public void setSuccess(List<AwbUpdate> 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 LogisticsServiceException getSe() {
      return this.se;
    }

    public void setSe(LogisticsServiceException se) {
      this.se = se;
    }

    public void unsetSe() {
      this.se = null;
    }

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

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

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

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((LogisticsServiceException)value);
        }
        break;

      }
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

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

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

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

    public boolean equals(getShipmentInfo_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;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      getShipmentInfo_result typedOther = (getShipmentInfo_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;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(typedOther.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, typedOther.se);
        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 _list9 = iprot.readListBegin();
                this.success = new ArrayList<AwbUpdate>(_list9.size);
                for (int _i10 = 0; _i10 < _list9.size; ++_i10)
                {
                  AwbUpdate _elem11; // required
                  _elem11 = new AwbUpdate();
                  _elem11.read(iprot);
                  this.success.add(_elem11);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.se = new LogisticsServiceException();
              this.se.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 {
      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 (AwbUpdate _iter12 : this.success)
          {
            _iter12.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetSe()) {
        oprot.writeFieldBegin(SE_FIELD_DESC);
        this.se.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      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 getDestinationCode_args implements org.apache.thrift.TBase<getDestinationCode_args, getDestinationCode_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDestinationCode_args");

    private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField PIN_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pinCode", org.apache.thrift.protocol.TType.STRING, (short)2);

    private long providerId; // required
    private String pinCode; // 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 {
      PROVIDER_ID((short)1, "providerId"),
      PIN_CODE((short)2, "pinCode");

      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: // PROVIDER_ID
            return PROVIDER_ID;
          case 2: // PIN_CODE
            return PIN_CODE;
          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 __PROVIDERID_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.PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.PIN_CODE, new org.apache.thrift.meta_data.FieldMetaData("pinCode", 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(getDestinationCode_args.class, metaDataMap);
    }

    public getDestinationCode_args() {
    }

    public getDestinationCode_args(
      long providerId,
      String pinCode)
    {
      this();
      this.providerId = providerId;
      setProviderIdIsSet(true);
      this.pinCode = pinCode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getDestinationCode_args(getDestinationCode_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.providerId = other.providerId;
      if (other.isSetPinCode()) {
        this.pinCode = other.pinCode;
      }
    }

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

    @Override
    public void clear() {
      setProviderIdIsSet(false);
      this.providerId = 0;
      this.pinCode = null;
    }

    public long getProviderId() {
      return this.providerId;
    }

    public void setProviderId(long providerId) {
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

    public void unsetProviderId() {
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
    }

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

    public void setProviderIdIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
    }

    public String getPinCode() {
      return this.pinCode;
    }

    public void setPinCode(String pinCode) {
      this.pinCode = pinCode;
    }

    public void unsetPinCode() {
      this.pinCode = null;
    }

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

    public void setPinCodeIsSet(boolean value) {
      if (!value) {
        this.pinCode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROVIDER_ID:
        if (value == null) {
          unsetProviderId();
        } else {
          setProviderId((Long)value);
        }
        break;

      case PIN_CODE:
        if (value == null) {
          unsetPinCode();
        } else {
          setPinCode((String)value);
        }
        break;

      }
    }

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

      case PIN_CODE:
        return getPinCode();

      }
      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 PROVIDER_ID:
        return isSetProviderId();
      case PIN_CODE:
        return isSetPinCode();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_providerId = true;
      boolean that_present_providerId = true;
      if (this_present_providerId || that_present_providerId) {
        if (!(this_present_providerId && that_present_providerId))
          return false;
        if (this.providerId != that.providerId)
          return false;
      }

      boolean this_present_pinCode = true && this.isSetPinCode();
      boolean that_present_pinCode = true && that.isSetPinCode();
      if (this_present_pinCode || that_present_pinCode) {
        if (!(this_present_pinCode && that_present_pinCode))
          return false;
        if (!this.pinCode.equals(that.pinCode))
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(typedOther.isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProviderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPinCode()).compareTo(typedOther.isSetPinCode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPinCode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pinCode, typedOther.pinCode);
        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: // PROVIDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.providerId = iprot.readI64();
              setProviderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PIN_CODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.pinCode = 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(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.providerId);
      oprot.writeFieldEnd();
      if (this.pinCode != null) {
        oprot.writeFieldBegin(PIN_CODE_FIELD_DESC);
        oprot.writeString(this.pinCode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("providerId:");
      sb.append(this.providerId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("pinCode:");
      if (this.pinCode == null) {
        sb.append("null");
      } else {
        sb.append(this.pinCode);
      }
      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 getDestinationCode_result implements org.apache.thrift.TBase<getDestinationCode_result, getDestinationCode_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getDestinationCode_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
    private static final org.apache.thrift.protocol.TField SE_FIELD_DESC = new org.apache.thrift.protocol.TField("se", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private String success; // required
    private LogisticsServiceException se; // 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"),
      SE((short)1, "se");

      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;
          case 1: // SE
            return SE;
          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.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.SE, new org.apache.thrift.meta_data.FieldMetaData("se", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getDestinationCode_result.class, metaDataMap);
    }

    public getDestinationCode_result() {
    }

    public getDestinationCode_result(
      String success,
      LogisticsServiceException se)
    {
      this();
      this.success = success;
      this.se = se;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getDestinationCode_result(getDestinationCode_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
      if (other.isSetSe()) {
        this.se = new LogisticsServiceException(other.se);
      }
    }

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

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

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

    public void setSuccess(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 LogisticsServiceException getSe() {
      return this.se;
    }

    public void setSe(LogisticsServiceException se) {
      this.se = se;
    }

    public void unsetSe() {
      this.se = null;
    }

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

    public void setSeIsSet(boolean value) {
      if (!value) {
        this.se = null;
      }
    }

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

      case SE:
        if (value == null) {
          unsetSe();
        } else {
          setSe((LogisticsServiceException)value);
        }
        break;

      }
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

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

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

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

    public boolean equals(getDestinationCode_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;
      }

      boolean this_present_se = true && this.isSetSe();
      boolean that_present_se = true && that.isSetSe();
      if (this_present_se || that_present_se) {
        if (!(this_present_se && that_present_se))
          return false;
        if (!this.se.equals(that.se))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      getDestinationCode_result typedOther = (getDestinationCode_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;
        }
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(typedOther.isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSe()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.se, typedOther.se);
        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.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // SE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.se = new LogisticsServiceException();
              this.se.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 {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetSe()) {
        oprot.writeFieldBegin(SE_FIELD_DESC);
        this.se.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("se:");
      if (this.se == null) {
        sb.append("null");
      } else {
        sb.append(this.se);
      }
      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 getFreeAwbCount_args implements org.apache.thrift.TBase<getFreeAwbCount_args, getFreeAwbCount_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFreeAwbCount_args");

    private static final org.apache.thrift.protocol.TField PROVIDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("providerId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.STRING, (short)2);

    private long providerId; // required
    private String type; // 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 {
      PROVIDER_ID((short)1, "providerId"),
      TYPE((short)2, "type");

      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: // PROVIDER_ID
            return PROVIDER_ID;
          case 2: // TYPE
            return TYPE;
          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 __PROVIDERID_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.PROVIDER_ID, new org.apache.thrift.meta_data.FieldMetaData("providerId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", 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(getFreeAwbCount_args.class, metaDataMap);
    }

    public getFreeAwbCount_args() {
    }

    public getFreeAwbCount_args(
      long providerId,
      String type)
    {
      this();
      this.providerId = providerId;
      setProviderIdIsSet(true);
      this.type = type;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFreeAwbCount_args(getFreeAwbCount_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.providerId = other.providerId;
      if (other.isSetType()) {
        this.type = other.type;
      }
    }

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

    @Override
    public void clear() {
      setProviderIdIsSet(false);
      this.providerId = 0;
      this.type = null;
    }

    public long getProviderId() {
      return this.providerId;
    }

    public void setProviderId(long providerId) {
      this.providerId = providerId;
      setProviderIdIsSet(true);
    }

    public void unsetProviderId() {
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
    }

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

    public void setProviderIdIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
    }

    public String getType() {
      return this.type;
    }

    public void setType(String type) {
      this.type = type;
    }

    public void unsetType() {
      this.type = null;
    }

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

    public void setTypeIsSet(boolean value) {
      if (!value) {
        this.type = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROVIDER_ID:
        if (value == null) {
          unsetProviderId();
        } else {
          setProviderId((Long)value);
        }
        break;

      case TYPE:
        if (value == null) {
          unsetType();
        } else {
          setType((String)value);
        }
        break;

      }
    }

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

      case TYPE:
        return getType();

      }
      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 PROVIDER_ID:
        return isSetProviderId();
      case TYPE:
        return isSetType();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_providerId = true;
      boolean that_present_providerId = true;
      if (this_present_providerId || that_present_providerId) {
        if (!(this_present_providerId && that_present_providerId))
          return false;
        if (this.providerId != that.providerId)
          return false;
      }

      boolean this_present_type = true && this.isSetType();
      boolean that_present_type = true && that.isSetType();
      if (this_present_type || that_present_type) {
        if (!(this_present_type && that_present_type))
          return false;
        if (!this.type.equals(that.type))
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(typedOther.isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetProviderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.providerId, typedOther.providerId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
        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: // PROVIDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.providerId = iprot.readI64();
              setProviderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TYPE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.type = 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(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.providerId);
      oprot.writeFieldEnd();
      if (this.type != null) {
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
        oprot.writeString(this.type);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("providerId:");
      sb.append(this.providerId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("type:");
      if (this.type == null) {
        sb.append("null");
      } else {
        sb.append(this.type);
      }
      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 getFreeAwbCount_result implements org.apache.thrift.TBase<getFreeAwbCount_result, getFreeAwbCount_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFreeAwbCount_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(getFreeAwbCount_result.class, metaDataMap);
    }

    public getFreeAwbCount_result() {
    }

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

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

    public getFreeAwbCount_result deepCopy() {
      return new getFreeAwbCount_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 getFreeAwbCount_result)
        return this.equals((getFreeAwbCount_result)that);
      return false;
    }

    public boolean equals(getFreeAwbCount_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(getFreeAwbCount_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFreeAwbCount_result typedOther = (getFreeAwbCount_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("getFreeAwbCount_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 getHolidays_args implements org.apache.thrift.TBase<getHolidays_args, getHolidays_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHolidays_args");

    private static final org.apache.thrift.protocol.TField FROM_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("fromDate", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TO_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("toDate", org.apache.thrift.protocol.TType.I64, (short)2);

    private long fromDate; // required
    private long toDate; // 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 {
      FROM_DATE((short)1, "fromDate"),
      TO_DATE((short)2, "toDate");

      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: // FROM_DATE
            return FROM_DATE;
          case 2: // TO_DATE
            return TO_DATE;
          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 __FROMDATE_ISSET_ID = 0;
    private static final int __TODATE_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.FROM_DATE, new org.apache.thrift.meta_data.FieldMetaData("fromDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TO_DATE, new org.apache.thrift.meta_data.FieldMetaData("toDate", 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(getHolidays_args.class, metaDataMap);
    }

    public getHolidays_args() {
    }

    public getHolidays_args(
      long fromDate,
      long toDate)
    {
      this();
      this.fromDate = fromDate;
      setFromDateIsSet(true);
      this.toDate = toDate;
      setToDateIsSet(true);
    }

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

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

    @Override
    public void clear() {
      setFromDateIsSet(false);
      this.fromDate = 0;
      setToDateIsSet(false);
      this.toDate = 0;
    }

    public long getFromDate() {
      return this.fromDate;
    }

    public void setFromDate(long fromDate) {
      this.fromDate = fromDate;
      setFromDateIsSet(true);
    }

    public void unsetFromDate() {
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
    }

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

    public void setFromDateIsSet(boolean value) {
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
    }

    public long getToDate() {
      return this.toDate;
    }

    public void setToDate(long toDate) {
      this.toDate = toDate;
      setToDateIsSet(true);
    }

    public void unsetToDate() {
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
    }

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

    public void setToDateIsSet(boolean value) {
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case FROM_DATE:
        if (value == null) {
          unsetFromDate();
        } else {
          setFromDate((Long)value);
        }
        break;

      case TO_DATE:
        if (value == null) {
          unsetToDate();
        } else {
          setToDate((Long)value);
        }
        break;

      }
    }

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

      case TO_DATE:
        return Long.valueOf(getToDate());

      }
      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 FROM_DATE:
        return isSetFromDate();
      case TO_DATE:
        return isSetToDate();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_fromDate = true;
      boolean that_present_fromDate = true;
      if (this_present_fromDate || that_present_fromDate) {
        if (!(this_present_fromDate && that_present_fromDate))
          return false;
        if (this.fromDate != that.fromDate)
          return false;
      }

      boolean this_present_toDate = true;
      boolean that_present_toDate = true;
      if (this_present_toDate || that_present_toDate) {
        if (!(this_present_toDate && that_present_toDate))
          return false;
        if (this.toDate != that.toDate)
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(typedOther.isSetFromDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFromDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromDate, typedOther.fromDate);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(typedOther.isSetToDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetToDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toDate, typedOther.toDate);
        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: // FROM_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.fromDate = iprot.readI64();
              setFromDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TO_DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.toDate = iprot.readI64();
              setToDateIsSet(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(FROM_DATE_FIELD_DESC);
      oprot.writeI64(this.fromDate);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
      oprot.writeI64(this.toDate);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("fromDate:");
      sb.append(this.fromDate);
      first = false;
      if (!first) sb.append(", ");
      sb.append("toDate:");
      sb.append(this.toDate);
      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 getHolidays_result implements org.apache.thrift.TBase<getHolidays_result, getHolidays_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHolidays_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<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.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHolidays_result.class, metaDataMap);
    }

    public getHolidays_result() {
    }

    public getHolidays_result(
      List<Long> success)
    {
      this();
      this.success = success;
    }

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

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

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

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

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

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

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

    public void setSuccess(List<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((List<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 getHolidays_result)
        return this.equals((getHolidays_result)that);
      return false;
    }

    public boolean equals(getHolidays_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(getHolidays_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getHolidays_result typedOther = (getHolidays_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 _list13 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list13.size);
                for (int _i14 = 0; _i14 < _list13.size; ++_i14)
                {
                  long _elem15; // required
                  _elem15 = iprot.readI64();
                  this.success.add(_elem15);
                }
                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.I64, this.success.size()));
          for (long _iter16 : this.success)
          {
            oprot.writeI64(_iter16);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHolidays_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 isCodAllowed_args implements org.apache.thrift.TBase<isCodAllowed_args, isCodAllowed_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodAllowed_args");

    private static final org.apache.thrift.protocol.TField DESTINATION_PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("destination_pincode", org.apache.thrift.protocol.TType.STRING, (short)1);

    private String destination_pincode; // 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 {
      DESTINATION_PINCODE((short)1, "destination_pincode");

      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: // DESTINATION_PINCODE
            return DESTINATION_PINCODE;
          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.DESTINATION_PINCODE, new org.apache.thrift.meta_data.FieldMetaData("destination_pincode", 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(isCodAllowed_args.class, metaDataMap);
    }

    public isCodAllowed_args() {
    }

    public isCodAllowed_args(
      String destination_pincode)
    {
      this();
      this.destination_pincode = destination_pincode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isCodAllowed_args(isCodAllowed_args other) {
      if (other.isSetDestination_pincode()) {
        this.destination_pincode = other.destination_pincode;
      }
    }

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

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

    public String getDestination_pincode() {
      return this.destination_pincode;
    }

    public void setDestination_pincode(String destination_pincode) {
      this.destination_pincode = destination_pincode;
    }

    public void unsetDestination_pincode() {
      this.destination_pincode = null;
    }

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

    public void setDestination_pincodeIsSet(boolean value) {
      if (!value) {
        this.destination_pincode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case DESTINATION_PINCODE:
        if (value == null) {
          unsetDestination_pincode();
        } else {
          setDestination_pincode((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case DESTINATION_PINCODE:
        return getDestination_pincode();

      }
      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 DESTINATION_PINCODE:
        return isSetDestination_pincode();
      }
      throw new IllegalStateException();
    }

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

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

      boolean this_present_destination_pincode = true && this.isSetDestination_pincode();
      boolean that_present_destination_pincode = true && that.isSetDestination_pincode();
      if (this_present_destination_pincode || that_present_destination_pincode) {
        if (!(this_present_destination_pincode && that_present_destination_pincode))
          return false;
        if (!this.destination_pincode.equals(that.destination_pincode))
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetDestination_pincode()).compareTo(typedOther.isSetDestination_pincode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDestination_pincode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.destination_pincode, typedOther.destination_pincode);
        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: // DESTINATION_PINCODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.destination_pincode = 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.destination_pincode != null) {
        oprot.writeFieldBegin(DESTINATION_PINCODE_FIELD_DESC);
        oprot.writeString(this.destination_pincode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("destination_pincode:");
      if (this.destination_pincode == null) {
        sb.append("null");
      } else {
        sb.append(this.destination_pincode);
      }
      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 isCodAllowed_result implements org.apache.thrift.TBase<isCodAllowed_result, isCodAllowed_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isCodAllowed_result");

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

    private boolean 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.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isCodAllowed_result.class, metaDataMap);
    }

    public isCodAllowed_result() {
    }

    public isCodAllowed_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

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

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

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

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean 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((Boolean)value);
        }
        break;

      }
    }

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

      }
      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 isCodAllowed_result)
        return this.equals((isCodAllowed_result)that);
      return false;
    }

    public boolean equals(isCodAllowed_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(isCodAllowed_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isCodAllowed_result typedOther = (isCodAllowed_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.BOOL) {
              this.success = iprot.readBool();
              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.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

  }

}