Subversion Repositories SmartDukaan

Rev

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

/**
 * Autogenerated by Thrift
 *
 * 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.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.thrift.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.protocol.*;

public class LogisticsService {

  public interface Iface {

    /**
     * For closing the open session in sqlalchemy
     */
    public void closeSession() throws TException;

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

    /**
     * Returns a list containing all the providers.
     */
    public List<Provider> getAllProviders() throws LogisticsServiceException, 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, TException;

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

    /**
     * Returns an unused AWB number for the given provider.
     * 
     * @param providerId
     */
    public String getEmptyAWB(long providerId) throws LogisticsServiceException, 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, 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, TException;

    /**
     * Returns the number of unused AWB numbers for the given provider
     * 
     * @param providerId
     */
    public long getFreeAwbCount(long providerId) throws 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 TException;

  }

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

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

    protected TProtocol iprot_;
    protected TProtocol oprot_;

    protected int seqid_;

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

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

    public void closeSession() throws TException
    {
      send_closeSession();
      recv_closeSession();
    }

    public void send_closeSession() throws TException
    {
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
      closeSession_args args = new closeSession_args();
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public void recv_closeSession() throws TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      closeSession_result result = new closeSession_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      return;
    }

    public Provider getProvider(long providerId) throws LogisticsServiceException, TException
    {
      send_getProvider(providerId);
      return recv_getProvider();
    }

    public void send_getProvider(long providerId) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getProvider", TMessageType.CALL, seqid_));
      getProvider_args args = new getProvider_args();
      args.providerId = providerId;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public Provider recv_getProvider() throws LogisticsServiceException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getProvider_result result = new getProvider_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.lse != null) {
        throw result.lse;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
    }

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

    public void send_getAllProviders() throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getAllProviders", TMessageType.CALL, seqid_));
      getAllProviders_args args = new getAllProviders_args();
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List<Provider> recv_getAllProviders() throws LogisticsServiceException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getAllProviders_result result = new getAllProviders_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.lse != null) {
        throw result.lse;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllProviders failed: unknown result");
    }

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

    public void send_getLogisticsEstimation(long itemId, String destination_pin) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.CALL, seqid_));
      getLogisticsEstimation_args args = new getLogisticsEstimation_args();
      args.itemId = itemId;
      args.destination_pin = destination_pin;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public LogisticsInfo recv_getLogisticsEstimation() throws LogisticsServiceException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getLogisticsEstimation_result result = new getLogisticsEstimation_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
    }

    public LogisticsInfo getLogisticsInfo(String destination_pincode, long item_id) throws LogisticsServiceException, TException
    {
      send_getLogisticsInfo(destination_pincode, item_id);
      return recv_getLogisticsInfo();
    }

    public void send_getLogisticsInfo(String destination_pincode, long item_id) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.CALL, seqid_));
      getLogisticsInfo_args args = new getLogisticsInfo_args();
      args.destination_pincode = destination_pincode;
      args.item_id = item_id;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public LogisticsInfo recv_getLogisticsInfo() throws LogisticsServiceException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getLogisticsInfo_result result = new getLogisticsInfo_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsInfo failed: unknown result");
    }

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

    public void send_getEmptyAWB(long providerId) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getEmptyAWB", TMessageType.CALL, seqid_));
      getEmptyAWB_args args = new getEmptyAWB_args();
      args.providerId = providerId;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_getEmptyAWB() throws LogisticsServiceException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getEmptyAWB_result result = new getEmptyAWB_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
    }

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

    public void send_getShipmentInfo(String awb, long providerId) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getShipmentInfo", TMessageType.CALL, seqid_));
      getShipmentInfo_args args = new getShipmentInfo_args();
      args.awb = awb;
      args.providerId = providerId;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List<AwbUpdate> recv_getShipmentInfo() throws LogisticsServiceException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getShipmentInfo_result result = new getShipmentInfo_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
    }

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

    public void send_getDestinationCode(long providerId, String pinCode) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getDestinationCode", TMessageType.CALL, seqid_));
      getDestinationCode_args args = new getDestinationCode_args();
      args.providerId = providerId;
      args.pinCode = pinCode;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public String recv_getDestinationCode() throws LogisticsServiceException, TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getDestinationCode_result result = new getDestinationCode_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.se != null) {
        throw result.se;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDestinationCode failed: unknown result");
    }

    public long getFreeAwbCount(long providerId) throws TException
    {
      send_getFreeAwbCount(providerId);
      return recv_getFreeAwbCount();
    }

    public void send_getFreeAwbCount(long providerId) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getFreeAwbCount", TMessageType.CALL, seqid_));
      getFreeAwbCount_args args = new getFreeAwbCount_args();
      args.providerId = providerId;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public long recv_getFreeAwbCount() throws TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getFreeAwbCount_result result = new getFreeAwbCount_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getFreeAwbCount failed: unknown result");
    }

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

    public void send_getHolidays(long fromDate, long toDate) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getHolidays", TMessageType.CALL, seqid_));
      getHolidays_args args = new getHolidays_args();
      args.fromDate = fromDate;
      args.toDate = toDate;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List<Long> recv_getHolidays() throws TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getHolidays_result result = new getHolidays_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getHolidays failed: unknown result");
    }

  }
  public static class Processor implements TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(Iface iface)
    {
      iface_ = iface;
      processMap_.put("closeSession", new closeSession());
      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());
    }

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

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

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

    private class closeSession implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        closeSession_args args = new closeSession_args();
        args.read(iprot);
        iprot.readMessageEnd();
        closeSession_result result = new closeSession_result();
        iface_.closeSession();
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getProvider implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getProvider_args args = new getProvider_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getProvider_result result = new getProvider_result();
        try {
          result.success = iface_.getProvider(args.providerId);
        } catch (LogisticsServiceException lse) {
          result.lse = lse;
        } catch (Throwable th) {
          LOGGER.error("Internal error processing getProvider", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getProvider");
          oprot.writeMessageBegin(new TMessage("getProvider", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          return;
        }
        oprot.writeMessageBegin(new TMessage("getProvider", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getAllProviders implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getAllProviders_args args = new getAllProviders_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getAllProviders_result result = new getAllProviders_result();
        try {
          result.success = iface_.getAllProviders();
        } catch (LogisticsServiceException lse) {
          result.lse = lse;
        } catch (Throwable th) {
          LOGGER.error("Internal error processing getAllProviders", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllProviders");
          oprot.writeMessageBegin(new TMessage("getAllProviders", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          return;
        }
        oprot.writeMessageBegin(new TMessage("getAllProviders", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getLogisticsEstimation implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getLogisticsEstimation_args args = new getLogisticsEstimation_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getLogisticsEstimation_result result = new getLogisticsEstimation_result();
        try {
          result.success = iface_.getLogisticsEstimation(args.itemId, args.destination_pin);
        } catch (LogisticsServiceException se) {
          result.se = se;
        } catch (Throwable th) {
          LOGGER.error("Internal error processing getLogisticsEstimation", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLogisticsEstimation");
          oprot.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          return;
        }
        oprot.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getLogisticsInfo implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getLogisticsInfo_args args = new getLogisticsInfo_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getLogisticsInfo_result result = new getLogisticsInfo_result();
        try {
          result.success = iface_.getLogisticsInfo(args.destination_pincode, args.item_id);
        } catch (LogisticsServiceException se) {
          result.se = se;
        } catch (Throwable th) {
          LOGGER.error("Internal error processing getLogisticsInfo", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLogisticsInfo");
          oprot.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          return;
        }
        oprot.writeMessageBegin(new TMessage("getLogisticsInfo", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getEmptyAWB implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getEmptyAWB_args args = new getEmptyAWB_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getEmptyAWB_result result = new getEmptyAWB_result();
        try {
          result.success = iface_.getEmptyAWB(args.providerId);
        } catch (LogisticsServiceException se) {
          result.se = se;
        } catch (Throwable th) {
          LOGGER.error("Internal error processing getEmptyAWB", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getEmptyAWB");
          oprot.writeMessageBegin(new TMessage("getEmptyAWB", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          return;
        }
        oprot.writeMessageBegin(new TMessage("getEmptyAWB", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getShipmentInfo implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getShipmentInfo_args args = new getShipmentInfo_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getShipmentInfo_result result = new getShipmentInfo_result();
        try {
          result.success = iface_.getShipmentInfo(args.awb, args.providerId);
        } catch (LogisticsServiceException se) {
          result.se = se;
        } catch (Throwable th) {
          LOGGER.error("Internal error processing getShipmentInfo", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getShipmentInfo");
          oprot.writeMessageBegin(new TMessage("getShipmentInfo", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          return;
        }
        oprot.writeMessageBegin(new TMessage("getShipmentInfo", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getDestinationCode implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getDestinationCode_args args = new getDestinationCode_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getDestinationCode_result result = new getDestinationCode_result();
        try {
          result.success = iface_.getDestinationCode(args.providerId, args.pinCode);
        } catch (LogisticsServiceException se) {
          result.se = se;
        } catch (Throwable th) {
          LOGGER.error("Internal error processing getDestinationCode", th);
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDestinationCode");
          oprot.writeMessageBegin(new TMessage("getDestinationCode", TMessageType.EXCEPTION, seqid));
          x.write(oprot);
          oprot.writeMessageEnd();
          oprot.getTransport().flush();
          return;
        }
        oprot.writeMessageBegin(new TMessage("getDestinationCode", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getFreeAwbCount implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getFreeAwbCount_args args = new getFreeAwbCount_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getFreeAwbCount_result result = new getFreeAwbCount_result();
        result.success = iface_.getFreeAwbCount(args.providerId);
        result.setSuccessIsSet(true);
        oprot.writeMessageBegin(new TMessage("getFreeAwbCount", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getHolidays implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getHolidays_args args = new getHolidays_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getHolidays_result result = new getHolidays_result();
        result.success = iface_.getHolidays(args.fromDate, args.toDate);
        oprot.writeMessageBegin(new TMessage("getHolidays", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

  }

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



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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
    }});

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

    public closeSession_args() {
    }

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

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

    @Deprecated
    public closeSession_args clone() {
      return new closeSession_args(this);
    }

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

    public void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

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

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

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

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

      return true;
    }

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

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

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

      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

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

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

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

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

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

  }

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



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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
    }});

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

    public closeSession_result() {
    }

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

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

    @Deprecated
    public closeSession_result clone() {
      return new closeSession_result(this);
    }

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

    public void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

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

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

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

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

      return true;
    }

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

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

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

      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

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

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

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

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

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

  }

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

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

    private long providerId;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      PROVIDER_ID((short)1, "providerId");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

    static {
      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);
    }

    @Deprecated
    public getProvider_args clone() {
      return new getProvider_args(this);
    }

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

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

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

    /** Returns true if field providerId is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case PROVIDER_ID:
        return isSetProviderId();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.providerId = iprot.readI64();
                setProviderIdIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private Provider success;
    private LogisticsServiceException lse;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new StructMetaData(TType.STRUCT, Provider.class)));
      put(_Fields.LSE, new FieldMetaData("lse", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
    }});

    static {
      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);
    }

    @Deprecated
    public getProvider_result clone() {
      return new getProvider_result(this);
    }

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

    public getProvider_result setSuccess(Provider success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 getProvider_result setLse(LogisticsServiceException lse) {
      this.lse = lse;
      return this;
    }

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

    /** Returns true if field lse is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case LSE:
        return getLse();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case LSE:
        return isSetLse();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(isSetLse());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(lse, typedOther.lse);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.STRUCT) {
                this.success = new Provider();
                this.success.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case LSE:
              if (field.type == TType.STRUCT) {
                this.lse = new LogisticsServiceException();
                this.lse.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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



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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
    }});

    static {
      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);
    }

    @Deprecated
    public getAllProviders_args clone() {
      return new getAllProviders_args(this);
    }

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

    public void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

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

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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 void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private List<Provider> success;
    private LogisticsServiceException lse;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new ListMetaData(TType.LIST, 
              new StructMetaData(TType.STRUCT, Provider.class))));
      put(_Fields.LSE, new FieldMetaData("lse", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
    }});

    static {
      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);
    }

    @Deprecated
    public getAllProviders_result clone() {
      return new getAllProviders_result(this);
    }

    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 getAllProviders_result setSuccess(List<Provider> success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 getAllProviders_result setLse(LogisticsServiceException lse) {
      this.lse = lse;
      return this;
    }

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

    /** Returns true if field lse is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case LSE:
        return getLse();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case LSE:
        return isSetLse();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetLse()).compareTo(isSetLse());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(lse, typedOther.lse);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.LIST) {
                {
                  TList _list0 = iprot.readListBegin();
                  this.success = new ArrayList<Provider>(_list0.size);
                  for (int _i1 = 0; _i1 < _list0.size; ++_i1)
                  {
                    Provider _elem2;
                    _elem2 = new Provider();
                    _elem2.read(iprot);
                    this.success.add(_elem2);
                  }
                  iprot.readListEnd();
                }
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case LSE:
              if (field.type == TType.STRUCT) {
                this.lse = new LogisticsServiceException();
                this.lse.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

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

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (Provider _iter3 : this.success)
          {
            _iter3.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 TException {
      // check for required fields
    }

  }

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

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

    private long itemId;
    private String destination_pin;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      DESTINATION_PIN((short)2, "destination_pin");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
      put(_Fields.DESTINATION_PIN, new FieldMetaData("destination_pin", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
    }});

    static {
      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);
    }

    @Deprecated
    public getLogisticsEstimation_args clone() {
      return new getLogisticsEstimation_args(this);
    }

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

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

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

    /** Returns true if field itemId is set (has been asigned 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 getLogisticsEstimation_args setDestination_pin(String destination_pin) {
      this.destination_pin = destination_pin;
      return this;
    }

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

    /** Returns true if field destination_pin is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case DESTINATION_PIN:
        return getDestination_pin();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case DESTINATION_PIN:
        return isSetDestination_pin();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetDestination_pin()).compareTo(isSetDestination_pin());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(destination_pin, typedOther.destination_pin);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case ITEM_ID:
              if (field.type == TType.I64) {
                this.itemId = iprot.readI64();
                setItemIdIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case DESTINATION_PIN:
              if (field.type == TType.STRING) {
                this.destination_pin = iprot.readString();
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private LogisticsInfo success;
    private LogisticsServiceException se;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new StructMetaData(TType.STRUCT, LogisticsInfo.class)));
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
    }});

    static {
      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);
    }

    @Deprecated
    public getLogisticsEstimation_result clone() {
      return new getLogisticsEstimation_result(this);
    }

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

    public getLogisticsEstimation_result setSuccess(LogisticsInfo success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 getLogisticsEstimation_result setSe(LogisticsServiceException se) {
      this.se = se;
      return this;
    }

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

    /** Returns true if field se is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.STRUCT) {
                this.success = new LogisticsInfo();
                this.success.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case SE:
              if (field.type == TType.STRUCT) {
                this.se = new LogisticsServiceException();
                this.se.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

    private static final TField DESTINATION_PINCODE_FIELD_DESC = new TField("destination_pincode", TType.STRING, (short)1);
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);

    private String destination_pincode;
    private long item_id;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      DESTINATION_PINCODE((short)1, "destination_pincode"),
      ITEM_ID((short)2, "item_id");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.DESTINATION_PINCODE, new FieldMetaData("destination_pincode", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

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

    public getLogisticsInfo_args() {
    }

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

    /**
     * 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;
    }

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

    @Deprecated
    public getLogisticsInfo_args clone() {
      return new getLogisticsInfo_args(this);
    }

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

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

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

    /** Returns true if field destination_pincode is set (has been asigned 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 getLogisticsInfo_args setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
      return this;
    }

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

    /** Returns true if field item_id is set (has been asigned 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);
    }

    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;

      }
    }

    public void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case ITEM_ID:
        return new Long(getItem_id());

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case DESTINATION_PINCODE:
        return isSetDestination_pincode();
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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;
      }

      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(isSetDestination_pincode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(destination_pincode, typedOther.destination_pincode);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case DESTINATION_PINCODE:
              if (field.type == TType.STRING) {
                this.destination_pincode = iprot.readString();
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case ITEM_ID:
              if (field.type == TType.I64) {
                this.item_id = iprot.readI64();
                setItem_idIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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();
      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;
      sb.append(")");
      return sb.toString();
    }

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

  }

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

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

    private LogisticsInfo success;
    private LogisticsServiceException se;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new StructMetaData(TType.STRUCT, LogisticsInfo.class)));
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
    }});

    static {
      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);
    }

    @Deprecated
    public getLogisticsInfo_result clone() {
      return new getLogisticsInfo_result(this);
    }

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

    public getLogisticsInfo_result setSuccess(LogisticsInfo success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 getLogisticsInfo_result setSe(LogisticsServiceException se) {
      this.se = se;
      return this;
    }

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

    /** Returns true if field se is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.STRUCT) {
                this.success = new LogisticsInfo();
                this.success.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case SE:
              if (field.type == TType.STRUCT) {
                this.se = new LogisticsServiceException();
                this.se.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private long providerId;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      PROVIDER_ID((short)1, "providerId");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

    static {
      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);
    }

    @Deprecated
    public getEmptyAWB_args clone() {
      return new getEmptyAWB_args(this);
    }

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

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

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

    /** Returns true if field providerId is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case PROVIDER_ID:
        return isSetProviderId();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.providerId = iprot.readI64();
                setProviderIdIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private String success;
    private LogisticsServiceException se;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
    }});

    static {
      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);
    }

    @Deprecated
    public getEmptyAWB_result clone() {
      return new getEmptyAWB_result(this);
    }

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

    public getEmptyAWB_result setSuccess(String success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 getEmptyAWB_result setSe(LogisticsServiceException se) {
      this.se = se;
      return this;
    }

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

    /** Returns true if field se is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.STRING) {
                this.success = iprot.readString();
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case SE:
              if (field.type == TType.STRUCT) {
                this.se = new LogisticsServiceException();
                this.se.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

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

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.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 TException {
      // check for required fields
    }

  }

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

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

    private String awb;
    private long providerId;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      AWB((short)1, "awb"),
      PROVIDER_ID((short)2, "providerId");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.AWB, new FieldMetaData("awb", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

    static {
      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);
    }

    @Deprecated
    public getShipmentInfo_args clone() {
      return new getShipmentInfo_args(this);
    }

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

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

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

    /** Returns true if field awb is set (has been asigned 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 getShipmentInfo_args setProviderId(long providerId) {
      this.providerId = providerId;
      setProviderIdIsSet(true);
      return this;
    }

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

    /** Returns true if field providerId is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case PROVIDER_ID:
        return new Long(getProviderId());

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case AWB:
        return isSetAwb();
      case PROVIDER_ID:
        return isSetProviderId();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetAwb());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(awb, typedOther.awb);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case AWB:
              if (field.type == TType.STRING) {
                this.awb = iprot.readString();
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.providerId = iprot.readI64();
                setProviderIdIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private List<AwbUpdate> success;
    private LogisticsServiceException se;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new ListMetaData(TType.LIST, 
              new StructMetaData(TType.STRUCT, AwbUpdate.class))));
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
    }});

    static {
      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);
    }

    @Deprecated
    public getShipmentInfo_result clone() {
      return new getShipmentInfo_result(this);
    }

    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 getShipmentInfo_result setSuccess(List<AwbUpdate> success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 getShipmentInfo_result setSe(LogisticsServiceException se) {
      this.se = se;
      return this;
    }

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

    /** Returns true if field se is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.LIST) {
                {
                  TList _list4 = iprot.readListBegin();
                  this.success = new ArrayList<AwbUpdate>(_list4.size);
                  for (int _i5 = 0; _i5 < _list4.size; ++_i5)
                  {
                    AwbUpdate _elem6;
                    _elem6 = new AwbUpdate();
                    _elem6.read(iprot);
                    this.success.add(_elem6);
                  }
                  iprot.readListEnd();
                }
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case SE:
              if (field.type == TType.STRUCT) {
                this.se = new LogisticsServiceException();
                this.se.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

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

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
          for (AwbUpdate _iter7 : this.success)
          {
            _iter7.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 TException {
      // check for required fields
    }

  }

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

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

    private long providerId;
    private String pinCode;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      PROVIDER_ID((short)1, "providerId"),
      PIN_CODE((short)2, "pinCode");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
      put(_Fields.PIN_CODE, new FieldMetaData("pinCode", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
    }});

    static {
      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);
    }

    @Deprecated
    public getDestinationCode_args clone() {
      return new getDestinationCode_args(this);
    }

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

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

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

    /** Returns true if field providerId is set (has been asigned 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 getDestinationCode_args setPinCode(String pinCode) {
      this.pinCode = pinCode;
      return this;
    }

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

    /** Returns true if field pinCode is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case PIN_CODE:
        return getPinCode();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case PROVIDER_ID:
        return isSetProviderId();
      case PIN_CODE:
        return isSetPinCode();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetPinCode()).compareTo(isSetPinCode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(pinCode, typedOther.pinCode);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.providerId = iprot.readI64();
                setProviderIdIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case PIN_CODE:
              if (field.type == TType.STRING) {
                this.pinCode = iprot.readString();
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private String success;
    private LogisticsServiceException se;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRUCT)));
    }});

    static {
      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);
    }

    @Deprecated
    public getDestinationCode_result clone() {
      return new getDestinationCode_result(this);
    }

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

    public getDestinationCode_result setSuccess(String success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 getDestinationCode_result setSe(LogisticsServiceException se) {
      this.se = se;
      return this;
    }

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

    /** Returns true if field se is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case SE:
        return getSe();

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case SE:
        return isSetSe();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.STRING) {
                this.success = iprot.readString();
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case SE:
              if (field.type == TType.STRUCT) {
                this.se = new LogisticsServiceException();
                this.se.read(iprot);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

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

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      } else if (this.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 TException {
      // check for required fields
    }

  }

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

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

    private long providerId;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      PROVIDER_ID((short)1, "providerId");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

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

    public getFreeAwbCount_args() {
    }

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

    /**
     * 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;
    }

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

    @Deprecated
    public getFreeAwbCount_args clone() {
      return new getFreeAwbCount_args(this);
    }

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

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

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

    /** Returns true if field providerId is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case PROVIDER_ID:
        return isSetProviderId();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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;
      }

      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(isSetProviderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.providerId = iprot.readI64();
                setProviderIdIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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("getFreeAwbCount_args(");
      boolean first = true;

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

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

  }

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

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

    private long success;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

    static {
      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);
    }

    @Deprecated
    public getFreeAwbCount_result clone() {
      return new getFreeAwbCount_result(this);
    }

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

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

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

    /** Returns true if field success is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.I64) {
                this.success = iprot.readI64();
                setSuccessIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

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

    private long fromDate;
    private long toDate;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      FROM_DATE((short)1, "fromDate"),
      TO_DATE((short)2, "toDate");

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.FROM_DATE, new FieldMetaData("fromDate", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
      put(_Fields.TO_DATE, new FieldMetaData("toDate", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

    static {
      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);
    }

    @Deprecated
    public getHolidays_args clone() {
      return new getHolidays_args(this);
    }

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

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

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

    /** Returns true if field fromDate is set (has been asigned 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 getHolidays_args setToDate(long toDate) {
      this.toDate = toDate;
      setToDateIsSet(true);
      return this;
    }

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

    /** Returns true if field toDate is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      case TO_DATE:
        return new Long(getToDate());

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case FROM_DATE:
        return isSetFromDate();
      case TO_DATE:
        return isSetToDate();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetFromDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(fromDate, typedOther.fromDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(isSetToDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(toDate, typedOther.toDate);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case FROM_DATE:
              if (field.type == TType.I64) {
                this.fromDate = iprot.readI64();
                setFromDateIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case TO_DATE:
              if (field.type == TType.I64) {
                this.toDate = iprot.readI64();
                setToDateIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(TProtocol oprot) throws 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 TException {
      // check for required fields
    }

  }

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

    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);

    private List<Long> success;

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

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

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

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

      /**
       * 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, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
          new ListMetaData(TType.LIST, 
              new FieldValueMetaData(TType.I64))));
    }});

    static {
      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);
    }

    @Deprecated
    public getHolidays_result clone() {
      return new getHolidays_result(this);
    }

    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 getHolidays_result setSuccess(List<Long> success) {
      this.success = success;
      return this;
    }

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

    /** Returns true if field success is set (has been asigned 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 void setFieldValue(int fieldID, Object value) {
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
    }

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

      }
      throw new IllegalStateException();
    }

    public Object getFieldValue(int fieldId) {
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
    }

    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    public boolean isSet(int fieldID) {
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
    }

    @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(isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
      if (lastComparison != 0) {
        return lastComparison;
      }
      return 0;
    }

    public void read(TProtocol iprot) throws TException {
      TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == TType.STOP) { 
          break;
        }
        _Fields fieldId = _Fields.findByThriftId(field.id);
        if (fieldId == null) {
          TProtocolUtil.skip(iprot, field.type);
        } else {
          switch (fieldId) {
            case SUCCESS:
              if (field.type == TType.LIST) {
                {
                  TList _list8 = iprot.readListBegin();
                  this.success = new ArrayList<Long>(_list8.size);
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
                  {
                    long _elem10;
                    _elem10 = iprot.readI64();
                    this.success.add(_elem10);
                  }
                  iprot.readListEnd();
                }
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
          }
          iprot.readFieldEnd();
        }
      }
      iprot.readStructEnd();
      validate();
    }

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

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
          for (long _iter11 : this.success)
          {
            oprot.writeI64(_iter11);
          }
          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 TException {
      // check for required fields
    }

  }

}