Subversion Repositories SmartDukaan

Rev

Rev 412 | Rev 471 | 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 {

    public void addEmptyAWBs(List<String> numbers, long provider_id) throws TException;

    public String getEmptyAWB(long provider_id) throws TException;

    public List<Provider> getProviders() throws TException;

    public Provider getProvider(long provider_id) throws TException;

    public void createShipment(Shipment shipment) throws TException;

    public void updateShipmentStatus(String awb, ShipmentUpdate shipment_update) throws TException;

    public ShipmentStatusInfo getShipmentInfo(String awb) throws TException;

    public List<Shipment> getShipments(long warehouse_id, long from_date, long to_date, long provider_id) throws TException;

    public List<Shipment> getTodaysShipments(long warehouse_id, long provider_id) 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 addEmptyAWBs(List<String> numbers, long provider_id) throws TException
    {
      send_addEmptyAWBs(numbers, provider_id);
      recv_addEmptyAWBs();
    }

    public void send_addEmptyAWBs(List<String> numbers, long provider_id) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("addEmptyAWBs", TMessageType.CALL, seqid_));
      addEmptyAWBs_args args = new addEmptyAWBs_args();
      args.numbers = numbers;
      args.provider_id = provider_id;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

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

    public String getEmptyAWB(long provider_id) throws TException
    {
      send_getEmptyAWB(provider_id);
      return recv_getEmptyAWB();
    }

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

    public String recv_getEmptyAWB() throws 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;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getEmptyAWB failed: unknown result");
    }

    public List<Provider> getProviders() throws TException
    {
      send_getProviders();
      return recv_getProviders();
    }

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

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

    public Provider getProvider(long provider_id) throws TException
    {
      send_getProvider(provider_id);
      return recv_getProvider();
    }

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

    public Provider recv_getProvider() throws 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;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getProvider failed: unknown result");
    }

    public void createShipment(Shipment shipment) throws TException
    {
      send_createShipment(shipment);
      recv_createShipment();
    }

    public void send_createShipment(Shipment shipment) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("createShipment", TMessageType.CALL, seqid_));
      createShipment_args args = new createShipment_args();
      args.shipment = shipment;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

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

    public void updateShipmentStatus(String awb, ShipmentUpdate shipment_update) throws TException
    {
      send_updateShipmentStatus(awb, shipment_update);
      recv_updateShipmentStatus();
    }

    public void send_updateShipmentStatus(String awb, ShipmentUpdate shipment_update) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("updateShipmentStatus", TMessageType.CALL, seqid_));
      updateShipmentStatus_args args = new updateShipmentStatus_args();
      args.awb = awb;
      args.shipment_update = shipment_update;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

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

    public ShipmentStatusInfo getShipmentInfo(String awb) throws TException
    {
      send_getShipmentInfo(awb);
      return recv_getShipmentInfo();
    }

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

    public ShipmentStatusInfo recv_getShipmentInfo() throws 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;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getShipmentInfo failed: unknown result");
    }

    public List<Shipment> getShipments(long warehouse_id, long from_date, long to_date, long provider_id) throws TException
    {
      send_getShipments(warehouse_id, from_date, to_date, provider_id);
      return recv_getShipments();
    }

    public void send_getShipments(long warehouse_id, long from_date, long to_date, long provider_id) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getShipments", TMessageType.CALL, seqid_));
      getShipments_args args = new getShipments_args();
      args.warehouse_id = warehouse_id;
      args.from_date = from_date;
      args.to_date = to_date;
      args.provider_id = provider_id;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

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

    public List<Shipment> getTodaysShipments(long warehouse_id, long provider_id) throws TException
    {
      send_getTodaysShipments(warehouse_id, provider_id);
      return recv_getTodaysShipments();
    }

    public void send_getTodaysShipments(long warehouse_id, long provider_id) throws TException
    {
      oprot_.writeMessageBegin(new TMessage("getTodaysShipments", TMessageType.CALL, seqid_));
      getTodaysShipments_args args = new getTodaysShipments_args();
      args.warehouse_id = warehouse_id;
      args.provider_id = provider_id;
      args.write(oprot_);
      oprot_.writeMessageEnd();
      oprot_.getTransport().flush();
    }

    public List<Shipment> recv_getTodaysShipments() throws TException
    {
      TMessage msg = iprot_.readMessageBegin();
      if (msg.type == TMessageType.EXCEPTION) {
        TApplicationException x = TApplicationException.read(iprot_);
        iprot_.readMessageEnd();
        throw x;
      }
      getTodaysShipments_result result = new getTodaysShipments_result();
      result.read(iprot_);
      iprot_.readMessageEnd();
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTodaysShipments 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("addEmptyAWBs", new addEmptyAWBs());
      processMap_.put("getEmptyAWB", new getEmptyAWB());
      processMap_.put("getProviders", new getProviders());
      processMap_.put("getProvider", new getProvider());
      processMap_.put("createShipment", new createShipment());
      processMap_.put("updateShipmentStatus", new updateShipmentStatus());
      processMap_.put("getShipmentInfo", new getShipmentInfo());
      processMap_.put("getShipments", new getShipments());
      processMap_.put("getTodaysShipments", new getTodaysShipments());
    }

    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 addEmptyAWBs implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        addEmptyAWBs_args args = new addEmptyAWBs_args();
        args.read(iprot);
        iprot.readMessageEnd();
        addEmptyAWBs_result result = new addEmptyAWBs_result();
        iface_.addEmptyAWBs(args.numbers, args.provider_id);
        oprot.writeMessageBegin(new TMessage("addEmptyAWBs", 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();
        result.success = iface_.getEmptyAWB(args.provider_id);
        oprot.writeMessageBegin(new TMessage("getEmptyAWB", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getProviders implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getProviders_args args = new getProviders_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getProviders_result result = new getProviders_result();
        result.success = iface_.getProviders();
        oprot.writeMessageBegin(new TMessage("getProviders", 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();
        result.success = iface_.getProvider(args.provider_id);
        oprot.writeMessageBegin(new TMessage("getProvider", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

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

    }

    private class updateShipmentStatus implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        updateShipmentStatus_args args = new updateShipmentStatus_args();
        args.read(iprot);
        iprot.readMessageEnd();
        updateShipmentStatus_result result = new updateShipmentStatus_result();
        iface_.updateShipmentStatus(args.awb, args.shipment_update);
        oprot.writeMessageBegin(new TMessage("updateShipmentStatus", 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();
        result.success = iface_.getShipmentInfo(args.awb);
        oprot.writeMessageBegin(new TMessage("getShipmentInfo", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

    private class getShipments implements ProcessFunction {
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
      {
        getShipments_args args = new getShipments_args();
        args.read(iprot);
        iprot.readMessageEnd();
        getShipments_result result = new getShipments_result();
        result.success = iface_.getShipments(args.warehouse_id, args.from_date, args.to_date, args.provider_id);
        oprot.writeMessageBegin(new TMessage("getShipments", TMessageType.REPLY, seqid));
        result.write(oprot);
        oprot.writeMessageEnd();
        oprot.getTransport().flush();
      }

    }

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

    }

  }

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

    private static final TField NUMBERS_FIELD_DESC = new TField("numbers", TType.LIST, (short)1);
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)2);

    private List<String> numbers;
    private long provider_id;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      NUMBERS((short)1, "numbers"),
      PROVIDER_ID((short)2, "provider_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 __PROVIDER_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.NUMBERS, new FieldMetaData("numbers", TFieldRequirementType.DEFAULT, 
          new ListMetaData(TType.LIST, 
              new FieldValueMetaData(TType.STRING))));
      put(_Fields.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

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

    public addEmptyAWBs_args() {
    }

    public addEmptyAWBs_args(
      List<String> numbers,
      long provider_id)
    {
      this();
      this.numbers = numbers;
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addEmptyAWBs_args(addEmptyAWBs_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetNumbers()) {
        List<String> __this__numbers = new ArrayList<String>();
        for (String other_element : other.numbers) {
          __this__numbers.add(other_element);
        }
        this.numbers = __this__numbers;
      }
      this.provider_id = other.provider_id;
    }

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

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

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

    public java.util.Iterator<String> getNumbersIterator() {
      return (this.numbers == null) ? null : this.numbers.iterator();
    }

    public void addToNumbers(String elem) {
      if (this.numbers == null) {
        this.numbers = new ArrayList<String>();
      }
      this.numbers.add(elem);
    }

    public List<String> getNumbers() {
      return this.numbers;
    }

    public addEmptyAWBs_args setNumbers(List<String> numbers) {
      this.numbers = numbers;
      return this;
    }

    public void unsetNumbers() {
      this.numbers = null;
    }

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

    public void setNumbersIsSet(boolean value) {
      if (!value) {
        this.numbers = null;
      }
    }

    public long getProvider_id() {
      return this.provider_id;
    }

    public addEmptyAWBs_args setProvider_id(long provider_id) {
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
      return this;
    }

    public void unsetProvider_id() {
      __isset_bit_vector.clear(__PROVIDER_ID_ISSET_ID);
    }

    /** Returns true if field provider_id is set (has been asigned a value) and false otherwise */
    public boolean isSetProvider_id() {
      return __isset_bit_vector.get(__PROVIDER_ID_ISSET_ID);
    }

    public void setProvider_idIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case NUMBERS:
        if (value == null) {
          unsetNumbers();
        } else {
          setNumbers((List<String>)value);
        }
        break;

      case PROVIDER_ID:
        if (value == null) {
          unsetProvider_id();
        } else {
          setProvider_id((Long)value);
        }
        break;

      }
    }

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

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case NUMBERS:
        return getNumbers();

      case PROVIDER_ID:
        return new Long(getProvider_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 NUMBERS:
        return isSetNumbers();
      case PROVIDER_ID:
        return isSetProvider_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 addEmptyAWBs_args)
        return this.equals((addEmptyAWBs_args)that);
      return false;
    }

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

      boolean this_present_numbers = true && this.isSetNumbers();
      boolean that_present_numbers = true && that.isSetNumbers();
      if (this_present_numbers || that_present_numbers) {
        if (!(this_present_numbers && that_present_numbers))
          return false;
        if (!this.numbers.equals(that.numbers))
          return false;
      }

      boolean this_present_provider_id = true;
      boolean that_present_provider_id = true;
      if (this_present_provider_id || that_present_provider_id) {
        if (!(this_present_provider_id && that_present_provider_id))
          return false;
        if (this.provider_id != that.provider_id)
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetNumbers()).compareTo(isSetNumbers());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(numbers, typedOther.numbers);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetProvider_id()).compareTo(isSetProvider_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(provider_id, typedOther.provider_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 NUMBERS:
              if (field.type == TType.LIST) {
                {
                  TList _list4 = iprot.readListBegin();
                  this.numbers = new ArrayList<String>(_list4.size);
                  for (int _i5 = 0; _i5 < _list4.size; ++_i5)
                  {
                    String _elem6;
                    _elem6 = iprot.readString();
                    this.numbers.add(_elem6);
                  }
                  iprot.readListEnd();
                }
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.provider_id = iprot.readI64();
                setProvider_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.numbers != null) {
        oprot.writeFieldBegin(NUMBERS_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRING, this.numbers.size()));
          for (String _iter7 : this.numbers)
          {
            oprot.writeString(_iter7);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.provider_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

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

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

  }

  public static class addEmptyAWBs_result implements TBase<addEmptyAWBs_result._Fields>, java.io.Serializable, Cloneable, Comparable<addEmptyAWBs_result>   {
    private static final TStruct STRUCT_DESC = new TStruct("addEmptyAWBs_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(addEmptyAWBs_result.class, metaDataMap);
    }

    public addEmptyAWBs_result() {
    }

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

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

    @Deprecated
    public addEmptyAWBs_result clone() {
      return new addEmptyAWBs_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 addEmptyAWBs_result)
        return this.equals((addEmptyAWBs_result)that);
      return false;
    }

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

      return true;
    }

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

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

      int lastComparison = 0;
      addEmptyAWBs_result typedOther = (addEmptyAWBs_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("addEmptyAWBs_result(");
      boolean first = true;

      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("provider_id", TType.I64, (short)1);

    private long provider_id;

    /** 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, "provider_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 __PROVIDER_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.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

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

    public getEmptyAWB_args() {
    }

    public getEmptyAWB_args(
      long provider_id)
    {
      this();
      this.provider_id = provider_id;
      setProvider_idIsSet(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.provider_id = other.provider_id;
    }

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

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

    public long getProvider_id() {
      return this.provider_id;
    }

    public getEmptyAWB_args setProvider_id(long provider_id) {
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
      return this;
    }

    public void unsetProvider_id() {
      __isset_bit_vector.clear(__PROVIDER_ID_ISSET_ID);
    }

    /** Returns true if field provider_id is set (has been asigned a value) and false otherwise */
    public boolean isSetProvider_id() {
      return __isset_bit_vector.get(__PROVIDER_ID_ISSET_ID);
    }

    public void setProvider_idIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROVIDER_ID:
        if (value == null) {
          unsetProvider_id();
        } else {
          setProvider_id((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(getProvider_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 PROVIDER_ID:
        return isSetProvider_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 getEmptyAWB_args)
        return this.equals((getEmptyAWB_args)that);
      return false;
    }

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

      boolean this_present_provider_id = true;
      boolean that_present_provider_id = true;
      if (this_present_provider_id || that_present_provider_id) {
        if (!(this_present_provider_id && that_present_provider_id))
          return false;
        if (this.provider_id != that.provider_id)
          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(isSetProvider_id()).compareTo(isSetProvider_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(provider_id, typedOther.provider_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 PROVIDER_ID:
              if (field.type == TType.I64) {
                this.provider_id = iprot.readI64();
                setProvider_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);
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.provider_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("provider_id:");
      sb.append(this.provider_id);
      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 String 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 FieldValueMetaData(TType.STRING)));
    }});

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

    public getEmptyAWB_result() {
    }

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

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

    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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)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 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;
      }

      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;
      }
      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;
          }
          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();
      }
      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;
      sb.append(")");
      return sb.toString();
    }

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

  }

  public static class getProviders_args implements TBase<getProviders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getProviders_args>   {
    private static final TStruct STRUCT_DESC = new TStruct("getProviders_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(getProviders_args.class, metaDataMap);
    }

    public getProviders_args() {
    }

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

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

    @Deprecated
    public getProviders_args clone() {
      return new getProviders_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 getProviders_args)
        return this.equals((getProviders_args)that);
      return false;
    }

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

      return true;
    }

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

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

      int lastComparison = 0;
      getProviders_args typedOther = (getProviders_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("getProviders_args(");
      boolean first = true;

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

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

  }

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

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

    private List<Provider> 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 StructMetaData(TType.STRUCT, Provider.class))));
    }});

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

    public getProviders_result() {
    }

    public getProviders_result(
      List<Provider> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getProviders_result(getProviders_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;
      }
    }

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

    @Deprecated
    public getProviders_result clone() {
      return new getProviders_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 getProviders_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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Provider>)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 getProviders_result)
        return this.equals((getProviders_result)that);
      return false;
    }

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

      int lastComparison = 0;
      getProviders_result typedOther = (getProviders_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<Provider>(_list8.size);
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
                  {
                    Provider _elem10;
                    _elem10 = new Provider();
                    _elem10.read(iprot);
                    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.STRUCT, this.success.size()));
          for (Provider _iter11 : this.success)
          {
            _iter11.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

  }

  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("provider_id", TType.I64, (short)1);

    private long provider_id;

    /** 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, "provider_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 __PROVIDER_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.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

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

    public getProvider_args() {
    }

    public getProvider_args(
      long provider_id)
    {
      this();
      this.provider_id = provider_id;
      setProvider_idIsSet(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.provider_id = other.provider_id;
    }

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

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

    public long getProvider_id() {
      return this.provider_id;
    }

    public getProvider_args setProvider_id(long provider_id) {
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
      return this;
    }

    public void unsetProvider_id() {
      __isset_bit_vector.clear(__PROVIDER_ID_ISSET_ID);
    }

    /** Returns true if field provider_id is set (has been asigned a value) and false otherwise */
    public boolean isSetProvider_id() {
      return __isset_bit_vector.get(__PROVIDER_ID_ISSET_ID);
    }

    public void setProvider_idIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case PROVIDER_ID:
        if (value == null) {
          unsetProvider_id();
        } else {
          setProvider_id((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(getProvider_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 PROVIDER_ID:
        return isSetProvider_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 getProvider_args)
        return this.equals((getProvider_args)that);
      return false;
    }

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

      boolean this_present_provider_id = true;
      boolean that_present_provider_id = true;
      if (this_present_provider_id || that_present_provider_id) {
        if (!(this_present_provider_id && that_present_provider_id))
          return false;
        if (this.provider_id != that.provider_id)
          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(isSetProvider_id()).compareTo(isSetProvider_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(provider_id, typedOther.provider_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 PROVIDER_ID:
              if (field.type == TType.I64) {
                this.provider_id = iprot.readI64();
                setProvider_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);
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.provider_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("provider_id:");
      sb.append(this.provider_id);
      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 Provider 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 StructMetaData(TType.STRUCT, Provider.class)));
    }});

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

    public getProvider_result() {
    }

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

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

    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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Provider)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 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;
      }

      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;
      }
      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;
          }
          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();
      }
      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;
      sb.append(")");
      return sb.toString();
    }

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

  }

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

    private static final TField SHIPMENT_FIELD_DESC = new TField("shipment", TType.STRUCT, (short)1);

    private Shipment shipment;

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

      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.SHIPMENT, new FieldMetaData("shipment", TFieldRequirementType.DEFAULT, 
          new StructMetaData(TType.STRUCT, Shipment.class)));
    }});

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

    public createShipment_args() {
    }

    public createShipment_args(
      Shipment shipment)
    {
      this();
      this.shipment = shipment;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public createShipment_args(createShipment_args other) {
      if (other.isSetShipment()) {
        this.shipment = new Shipment(other.shipment);
      }
    }

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

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

    public Shipment getShipment() {
      return this.shipment;
    }

    public createShipment_args setShipment(Shipment shipment) {
      this.shipment = shipment;
      return this;
    }

    public void unsetShipment() {
      this.shipment = null;
    }

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

    public void setShipmentIsSet(boolean value) {
      if (!value) {
        this.shipment = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SHIPMENT:
        if (value == null) {
          unsetShipment();
        } else {
          setShipment((Shipment)value);
        }
        break;

      }
    }

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

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SHIPMENT:
        return getShipment();

      }
      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 SHIPMENT:
        return isSetShipment();
      }
      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 createShipment_args)
        return this.equals((createShipment_args)that);
      return false;
    }

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

      boolean this_present_shipment = true && this.isSetShipment();
      boolean that_present_shipment = true && that.isSetShipment();
      if (this_present_shipment || that_present_shipment) {
        if (!(this_present_shipment && that_present_shipment))
          return false;
        if (!this.shipment.equals(that.shipment))
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetShipment()).compareTo(isSetShipment());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(shipment, typedOther.shipment);
      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 SHIPMENT:
              if (field.type == TType.STRUCT) {
                this.shipment = new Shipment();
                this.shipment.read(iprot);
              } 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.shipment != null) {
        oprot.writeFieldBegin(SHIPMENT_FIELD_DESC);
        this.shipment.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

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

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

  }

  public static class createShipment_result implements TBase<createShipment_result._Fields>, java.io.Serializable, Cloneable, Comparable<createShipment_result>   {
    private static final TStruct STRUCT_DESC = new TStruct("createShipment_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(createShipment_result.class, metaDataMap);
    }

    public createShipment_result() {
    }

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

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

    @Deprecated
    public createShipment_result clone() {
      return new createShipment_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 createShipment_result)
        return this.equals((createShipment_result)that);
      return false;
    }

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

      return true;
    }

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

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

      int lastComparison = 0;
      createShipment_result typedOther = (createShipment_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("createShipment_result(");
      boolean first = true;

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

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

  }

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

    private static final TField AWB_FIELD_DESC = new TField("awb", TType.STRING, (short)1);
    private static final TField SHIPMENT_UPDATE_FIELD_DESC = new TField("shipment_update", TType.STRUCT, (short)2);

    private String awb;
    private ShipmentUpdate shipment_update;

    /** 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"),
      SHIPMENT_UPDATE((short)2, "shipment_update");

      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.AWB, new FieldMetaData("awb", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
      put(_Fields.SHIPMENT_UPDATE, new FieldMetaData("shipment_update", TFieldRequirementType.DEFAULT, 
          new StructMetaData(TType.STRUCT, ShipmentUpdate.class)));
    }});

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

    public updateShipmentStatus_args() {
    }

    public updateShipmentStatus_args(
      String awb,
      ShipmentUpdate shipment_update)
    {
      this();
      this.awb = awb;
      this.shipment_update = shipment_update;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateShipmentStatus_args(updateShipmentStatus_args other) {
      if (other.isSetAwb()) {
        this.awb = other.awb;
      }
      if (other.isSetShipment_update()) {
        this.shipment_update = new ShipmentUpdate(other.shipment_update);
      }
    }

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

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

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

    public updateShipmentStatus_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 ShipmentUpdate getShipment_update() {
      return this.shipment_update;
    }

    public updateShipmentStatus_args setShipment_update(ShipmentUpdate shipment_update) {
      this.shipment_update = shipment_update;
      return this;
    }

    public void unsetShipment_update() {
      this.shipment_update = null;
    }

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

    public void setShipment_updateIsSet(boolean value) {
      if (!value) {
        this.shipment_update = null;
      }
    }

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

      case SHIPMENT_UPDATE:
        if (value == null) {
          unsetShipment_update();
        } else {
          setShipment_update((ShipmentUpdate)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 SHIPMENT_UPDATE:
        return getShipment_update();

      }
      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 SHIPMENT_UPDATE:
        return isSetShipment_update();
      }
      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 updateShipmentStatus_args)
        return this.equals((updateShipmentStatus_args)that);
      return false;
    }

    public boolean equals(updateShipmentStatus_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_shipment_update = true && this.isSetShipment_update();
      boolean that_present_shipment_update = true && that.isSetShipment_update();
      if (this_present_shipment_update || that_present_shipment_update) {
        if (!(this_present_shipment_update && that_present_shipment_update))
          return false;
        if (!this.shipment_update.equals(that.shipment_update))
          return false;
      }

      return true;
    }

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

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

      int lastComparison = 0;
      updateShipmentStatus_args typedOther = (updateShipmentStatus_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(isSetShipment_update()).compareTo(isSetShipment_update());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(shipment_update, typedOther.shipment_update);
      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 SHIPMENT_UPDATE:
              if (field.type == TType.STRUCT) {
                this.shipment_update = new ShipmentUpdate();
                this.shipment_update.read(iprot);
              } 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();
      }
      if (this.shipment_update != null) {
        oprot.writeFieldBegin(SHIPMENT_UPDATE_FIELD_DESC);
        this.shipment_update.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateShipmentStatus_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("shipment_update:");
      if (this.shipment_update == null) {
        sb.append("null");
      } else {
        sb.append(this.shipment_update);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

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

  }

  public static class updateShipmentStatus_result implements TBase<updateShipmentStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateShipmentStatus_result>   {
    private static final TStruct STRUCT_DESC = new TStruct("updateShipmentStatus_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(updateShipmentStatus_result.class, metaDataMap);
    }

    public updateShipmentStatus_result() {
    }

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

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

    @Deprecated
    public updateShipmentStatus_result clone() {
      return new updateShipmentStatus_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 updateShipmentStatus_result)
        return this.equals((updateShipmentStatus_result)that);
      return false;
    }

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

      return true;
    }

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

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

      int lastComparison = 0;
      updateShipmentStatus_result typedOther = (updateShipmentStatus_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("updateShipmentStatus_result(");
      boolean first = true;

      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 String awb;

    /** 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");

      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.AWB, new FieldMetaData("awb", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.STRING)));
    }});

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

    public getShipmentInfo_args() {
    }

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

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

    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 void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AWB:
        if (value == null) {
          unsetAwb();
        } else {
          setAwb((String)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();

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

      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;
      }
      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;
          }
          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.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;
      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.STRUCT, (short)0);

    private ShipmentStatusInfo 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 StructMetaData(TType.STRUCT, ShipmentStatusInfo.class)));
    }});

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

    public getShipmentInfo_result() {
    }

    public getShipmentInfo_result(
      ShipmentStatusInfo success)
    {
      this();
      this.success = success;
    }

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

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

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

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

    public getShipmentInfo_result setSuccess(ShipmentStatusInfo 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((ShipmentStatusInfo)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 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;
      }

      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;
      }
      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 ShipmentStatusInfo();
                this.success.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();
      }
      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;
      sb.append(")");
      return sb.toString();
    }

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

  }

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

    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)1);
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)4);

    private long warehouse_id;
    private long from_date;
    private long to_date;
    private long provider_id;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id"),
      FROM_DATE((short)2, "from_date"),
      TO_DATE((short)3, "to_date"),
      PROVIDER_ID((short)4, "provider_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 __WAREHOUSE_ID_ISSET_ID = 0;
    private static final int __FROM_DATE_ISSET_ID = 1;
    private static final int __TO_DATE_ISSET_ID = 2;
    private static final int __PROVIDER_ID_ISSET_ID = 3;
    private BitSet __isset_bit_vector = new BitSet(4);

    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
      put(_Fields.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

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

    public getShipments_args() {
    }

    public getShipments_args(
      long warehouse_id,
      long from_date,
      long to_date,
      long provider_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      this.from_date = from_date;
      setFrom_dateIsSet(true);
      this.to_date = to_date;
      setTo_dateIsSet(true);
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getShipments_args(getShipments_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
      this.from_date = other.from_date;
      this.to_date = other.to_date;
      this.provider_id = other.provider_id;
    }

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

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

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public getShipments_args setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      return this;
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public long getFrom_date() {
      return this.from_date;
    }

    public getShipments_args setFrom_date(long from_date) {
      this.from_date = from_date;
      setFrom_dateIsSet(true);
      return this;
    }

    public void unsetFrom_date() {
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
    }

    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
    public boolean isSetFrom_date() {
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
    }

    public void setFrom_dateIsSet(boolean value) {
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
    }

    public long getTo_date() {
      return this.to_date;
    }

    public getShipments_args setTo_date(long to_date) {
      this.to_date = to_date;
      setTo_dateIsSet(true);
      return this;
    }

    public void unsetTo_date() {
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
    }

    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
    public boolean isSetTo_date() {
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
    }

    public void setTo_dateIsSet(boolean value) {
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
    }

    public long getProvider_id() {
      return this.provider_id;
    }

    public getShipments_args setProvider_id(long provider_id) {
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
      return this;
    }

    public void unsetProvider_id() {
      __isset_bit_vector.clear(__PROVIDER_ID_ISSET_ID);
    }

    /** Returns true if field provider_id is set (has been asigned a value) and false otherwise */
    public boolean isSetProvider_id() {
      return __isset_bit_vector.get(__PROVIDER_ID_ISSET_ID);
    }

    public void setProvider_idIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      case FROM_DATE:
        if (value == null) {
          unsetFrom_date();
        } else {
          setFrom_date((Long)value);
        }
        break;

      case TO_DATE:
        if (value == null) {
          unsetTo_date();
        } else {
          setTo_date((Long)value);
        }
        break;

      case PROVIDER_ID:
        if (value == null) {
          unsetProvider_id();
        } else {
          setProvider_id((Long)value);
        }
        break;

      }
    }

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

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return new Long(getWarehouse_id());

      case FROM_DATE:
        return new Long(getFrom_date());

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

      case PROVIDER_ID:
        return new Long(getProvider_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 WAREHOUSE_ID:
        return isSetWarehouse_id();
      case FROM_DATE:
        return isSetFrom_date();
      case TO_DATE:
        return isSetTo_date();
      case PROVIDER_ID:
        return isSetProvider_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 getShipments_args)
        return this.equals((getShipments_args)that);
      return false;
    }

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

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      boolean this_present_from_date = true;
      boolean that_present_from_date = true;
      if (this_present_from_date || that_present_from_date) {
        if (!(this_present_from_date && that_present_from_date))
          return false;
        if (this.from_date != that.from_date)
          return false;
      }

      boolean this_present_to_date = true;
      boolean that_present_to_date = true;
      if (this_present_to_date || that_present_to_date) {
        if (!(this_present_to_date && that_present_to_date))
          return false;
        if (this.to_date != that.to_date)
          return false;
      }

      boolean this_present_provider_id = true;
      boolean that_present_provider_id = true;
      if (this_present_provider_id || that_present_provider_id) {
        if (!(this_present_provider_id && that_present_provider_id))
          return false;
        if (this.provider_id != that.provider_id)
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetProvider_id()).compareTo(isSetProvider_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(provider_id, typedOther.provider_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 WAREHOUSE_ID:
              if (field.type == TType.I64) {
                this.warehouse_id = iprot.readI64();
                setWarehouse_idIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case FROM_DATE:
              if (field.type == TType.I64) {
                this.from_date = iprot.readI64();
                setFrom_dateIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case TO_DATE:
              if (field.type == TType.I64) {
                this.to_date = iprot.readI64();
                setTo_dateIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.provider_id = iprot.readI64();
                setProvider_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);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
      oprot.writeI64(this.from_date);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
      oprot.writeI64(this.to_date);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.provider_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("from_date:");
      sb.append(this.from_date);
      first = false;
      if (!first) sb.append(", ");
      sb.append("to_date:");
      sb.append(this.to_date);
      first = false;
      if (!first) sb.append(", ");
      sb.append("provider_id:");
      sb.append(this.provider_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

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

  }

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

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

    private List<Shipment> 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 StructMetaData(TType.STRUCT, Shipment.class))));
    }});

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

    public getShipments_result() {
    }

    public getShipments_result(
      List<Shipment> success)
    {
      this();
      this.success = success;
    }

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

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

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

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

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

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

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

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

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

      int lastComparison = 0;
      getShipments_result typedOther = (getShipments_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 _list12 = iprot.readListBegin();
                  this.success = new ArrayList<Shipment>(_list12.size);
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
                  {
                    Shipment _elem14;
                    _elem14 = new Shipment();
                    _elem14.read(iprot);
                    this.success.add(_elem14);
                  }
                  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.STRUCT, this.success.size()));
          for (Shipment _iter15 : this.success)
          {
            _iter15.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

  }

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

    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)1);
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)2);

    private long warehouse_id;
    private long provider_id;

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id"),
      PROVIDER_ID((short)2, "provider_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 __WAREHOUSE_ID_ISSET_ID = 0;
    private static final int __PROVIDER_ID_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.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
      put(_Fields.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
          new FieldValueMetaData(TType.I64)));
    }});

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

    public getTodaysShipments_args() {
    }

    public getTodaysShipments_args(
      long warehouse_id,
      long provider_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
    }

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

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

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

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public getTodaysShipments_args setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      return this;
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public long getProvider_id() {
      return this.provider_id;
    }

    public getTodaysShipments_args setProvider_id(long provider_id) {
      this.provider_id = provider_id;
      setProvider_idIsSet(true);
      return this;
    }

    public void unsetProvider_id() {
      __isset_bit_vector.clear(__PROVIDER_ID_ISSET_ID);
    }

    /** Returns true if field provider_id is set (has been asigned a value) and false otherwise */
    public boolean isSetProvider_id() {
      return __isset_bit_vector.get(__PROVIDER_ID_ISSET_ID);
    }

    public void setProvider_idIsSet(boolean value) {
      __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      case PROVIDER_ID:
        if (value == null) {
          unsetProvider_id();
        } else {
          setProvider_id((Long)value);
        }
        break;

      }
    }

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

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return new Long(getWarehouse_id());

      case PROVIDER_ID:
        return new Long(getProvider_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 WAREHOUSE_ID:
        return isSetWarehouse_id();
      case PROVIDER_ID:
        return isSetProvider_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 getTodaysShipments_args)
        return this.equals((getTodaysShipments_args)that);
      return false;
    }

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

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      boolean this_present_provider_id = true;
      boolean that_present_provider_id = true;
      if (this_present_provider_id || that_present_provider_id) {
        if (!(this_present_provider_id && that_present_provider_id))
          return false;
        if (this.provider_id != that.provider_id)
          return false;
      }

      return true;
    }

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

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

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

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = Boolean.valueOf(isSetProvider_id()).compareTo(isSetProvider_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      lastComparison = TBaseHelper.compareTo(provider_id, typedOther.provider_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 WAREHOUSE_ID:
              if (field.type == TType.I64) {
                this.warehouse_id = iprot.readI64();
                setWarehouse_idIsSet(true);
              } else { 
                TProtocolUtil.skip(iprot, field.type);
              }
              break;
            case PROVIDER_ID:
              if (field.type == TType.I64) {
                this.provider_id = iprot.readI64();
                setProvider_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);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
      oprot.writeI64(this.provider_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("provider_id:");
      sb.append(this.provider_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

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

  }

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

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

    private List<Shipment> 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 StructMetaData(TType.STRUCT, Shipment.class))));
    }});

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

    public getTodaysShipments_result() {
    }

    public getTodaysShipments_result(
      List<Shipment> success)
    {
      this();
      this.success = success;
    }

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

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

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

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

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

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

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

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

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

      int lastComparison = 0;
      getTodaysShipments_result typedOther = (getTodaysShipments_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 _list16 = iprot.readListBegin();
                  this.success = new ArrayList<Shipment>(_list16.size);
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
                  {
                    Shipment _elem18;
                    _elem18 = new Shipment();
                    _elem18.read(iprot);
                    this.success.add(_elem18);
                  }
                  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.STRUCT, this.success.size()));
          for (Shipment _iter19 : this.success)
          {
            _iter19.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

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

  }

}