Subversion Repositories SmartDukaan

Rev

Rev 442 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 442 Rev 471
Line 25... Line 25...
25
 
25
 
26
public class LogisticsService {
26
public class LogisticsService {
27
 
27
 
28
  public interface Iface {
28
  public interface Iface {
29
 
29
 
-
 
30
    public ItemLogistics getLogisticsEstimation(long itemId, String destination_pin, long provider_id) throws LogisticsServiceException, TException;
-
 
31
 
-
 
32
    public void addDeliveryEstimate(long warahouse_id, String destination_pin, long provider_id, long delivery_time) throws TException;
-
 
33
 
30
    public void addEmptyAWBs(List<String> numbers, long provider_id) throws TException;
34
    public void addEmptyAWBs(List<String> numbers, long provider_id) throws TException;
31
 
35
 
32
    public String getEmptyAWB(long provider_id) throws TException;
36
    public String getEmptyAWB(long provider_id) throws TException;
33
 
37
 
34
    public List<Provider> getProviders() throws TException;
38
    public List<Provider> getProviders() throws TException;
Line 72... Line 76...
72
    public TProtocol getOutputProtocol()
76
    public TProtocol getOutputProtocol()
73
    {
77
    {
74
      return this.oprot_;
78
      return this.oprot_;
75
    }
79
    }
76
 
80
 
-
 
81
    public ItemLogistics getLogisticsEstimation(long itemId, String destination_pin, long provider_id) throws LogisticsServiceException, TException
-
 
82
    {
-
 
83
      send_getLogisticsEstimation(itemId, destination_pin, provider_id);
-
 
84
      return recv_getLogisticsEstimation();
-
 
85
    }
-
 
86
 
-
 
87
    public void send_getLogisticsEstimation(long itemId, String destination_pin, long provider_id) throws TException
-
 
88
    {
-
 
89
      oprot_.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.CALL, seqid_));
-
 
90
      getLogisticsEstimation_args args = new getLogisticsEstimation_args();
-
 
91
      args.itemId = itemId;
-
 
92
      args.destination_pin = destination_pin;
-
 
93
      args.provider_id = provider_id;
-
 
94
      args.write(oprot_);
-
 
95
      oprot_.writeMessageEnd();
-
 
96
      oprot_.getTransport().flush();
-
 
97
    }
-
 
98
 
-
 
99
    public ItemLogistics recv_getLogisticsEstimation() throws LogisticsServiceException, TException
-
 
100
    {
-
 
101
      TMessage msg = iprot_.readMessageBegin();
-
 
102
      if (msg.type == TMessageType.EXCEPTION) {
-
 
103
        TApplicationException x = TApplicationException.read(iprot_);
-
 
104
        iprot_.readMessageEnd();
-
 
105
        throw x;
-
 
106
      }
-
 
107
      getLogisticsEstimation_result result = new getLogisticsEstimation_result();
-
 
108
      result.read(iprot_);
-
 
109
      iprot_.readMessageEnd();
-
 
110
      if (result.isSetSuccess()) {
-
 
111
        return result.success;
-
 
112
      }
-
 
113
      if (result.se != null) {
-
 
114
        throw result.se;
-
 
115
      }
-
 
116
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLogisticsEstimation failed: unknown result");
-
 
117
    }
-
 
118
 
-
 
119
    public void addDeliveryEstimate(long warahouse_id, String destination_pin, long provider_id, long delivery_time) throws TException
-
 
120
    {
-
 
121
      send_addDeliveryEstimate(warahouse_id, destination_pin, provider_id, delivery_time);
-
 
122
      recv_addDeliveryEstimate();
-
 
123
    }
-
 
124
 
-
 
125
    public void send_addDeliveryEstimate(long warahouse_id, String destination_pin, long provider_id, long delivery_time) throws TException
-
 
126
    {
-
 
127
      oprot_.writeMessageBegin(new TMessage("addDeliveryEstimate", TMessageType.CALL, seqid_));
-
 
128
      addDeliveryEstimate_args args = new addDeliveryEstimate_args();
-
 
129
      args.warahouse_id = warahouse_id;
-
 
130
      args.destination_pin = destination_pin;
-
 
131
      args.provider_id = provider_id;
-
 
132
      args.delivery_time = delivery_time;
-
 
133
      args.write(oprot_);
-
 
134
      oprot_.writeMessageEnd();
-
 
135
      oprot_.getTransport().flush();
-
 
136
    }
-
 
137
 
-
 
138
    public void recv_addDeliveryEstimate() throws TException
-
 
139
    {
-
 
140
      TMessage msg = iprot_.readMessageBegin();
-
 
141
      if (msg.type == TMessageType.EXCEPTION) {
-
 
142
        TApplicationException x = TApplicationException.read(iprot_);
-
 
143
        iprot_.readMessageEnd();
-
 
144
        throw x;
-
 
145
      }
-
 
146
      addDeliveryEstimate_result result = new addDeliveryEstimate_result();
-
 
147
      result.read(iprot_);
-
 
148
      iprot_.readMessageEnd();
-
 
149
      return;
-
 
150
    }
-
 
151
 
77
    public void addEmptyAWBs(List<String> numbers, long provider_id) throws TException
152
    public void addEmptyAWBs(List<String> numbers, long provider_id) throws TException
78
    {
153
    {
79
      send_addEmptyAWBs(numbers, provider_id);
154
      send_addEmptyAWBs(numbers, provider_id);
80
      recv_addEmptyAWBs();
155
      recv_addEmptyAWBs();
81
    }
156
    }
Line 371... Line 446...
371
  public static class Processor implements TProcessor {
446
  public static class Processor implements TProcessor {
372
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
447
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
373
    public Processor(Iface iface)
448
    public Processor(Iface iface)
374
    {
449
    {
375
      iface_ = iface;
450
      iface_ = iface;
-
 
451
      processMap_.put("getLogisticsEstimation", new getLogisticsEstimation());
-
 
452
      processMap_.put("addDeliveryEstimate", new addDeliveryEstimate());
376
      processMap_.put("addEmptyAWBs", new addEmptyAWBs());
453
      processMap_.put("addEmptyAWBs", new addEmptyAWBs());
377
      processMap_.put("getEmptyAWB", new getEmptyAWB());
454
      processMap_.put("getEmptyAWB", new getEmptyAWB());
378
      processMap_.put("getProviders", new getProviders());
455
      processMap_.put("getProviders", new getProviders());
379
      processMap_.put("getProvider", new getProvider());
456
      processMap_.put("getProvider", new getProvider());
380
      processMap_.put("createShipment", new createShipment());
457
      processMap_.put("createShipment", new createShipment());
Line 407... Line 484...
407
      }
484
      }
408
      fn.process(msg.seqid, iprot, oprot);
485
      fn.process(msg.seqid, iprot, oprot);
409
      return true;
486
      return true;
410
    }
487
    }
411
 
488
 
-
 
489
    private class getLogisticsEstimation implements ProcessFunction {
-
 
490
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
491
      {
-
 
492
        getLogisticsEstimation_args args = new getLogisticsEstimation_args();
-
 
493
        args.read(iprot);
-
 
494
        iprot.readMessageEnd();
-
 
495
        getLogisticsEstimation_result result = new getLogisticsEstimation_result();
-
 
496
        try {
-
 
497
          result.success = iface_.getLogisticsEstimation(args.itemId, args.destination_pin, args.provider_id);
-
 
498
        } catch (LogisticsServiceException se) {
-
 
499
          result.se = se;
-
 
500
        } catch (Throwable th) {
-
 
501
          LOGGER.error("Internal error processing getLogisticsEstimation", th);
-
 
502
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLogisticsEstimation");
-
 
503
          oprot.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.EXCEPTION, seqid));
-
 
504
          x.write(oprot);
-
 
505
          oprot.writeMessageEnd();
-
 
506
          oprot.getTransport().flush();
-
 
507
          return;
-
 
508
        }
-
 
509
        oprot.writeMessageBegin(new TMessage("getLogisticsEstimation", TMessageType.REPLY, seqid));
-
 
510
        result.write(oprot);
-
 
511
        oprot.writeMessageEnd();
-
 
512
        oprot.getTransport().flush();
-
 
513
      }
-
 
514
 
-
 
515
    }
-
 
516
 
-
 
517
    private class addDeliveryEstimate implements ProcessFunction {
-
 
518
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
519
      {
-
 
520
        addDeliveryEstimate_args args = new addDeliveryEstimate_args();
-
 
521
        args.read(iprot);
-
 
522
        iprot.readMessageEnd();
-
 
523
        addDeliveryEstimate_result result = new addDeliveryEstimate_result();
-
 
524
        iface_.addDeliveryEstimate(args.warahouse_id, args.destination_pin, args.provider_id, args.delivery_time);
-
 
525
        oprot.writeMessageBegin(new TMessage("addDeliveryEstimate", TMessageType.REPLY, seqid));
-
 
526
        result.write(oprot);
-
 
527
        oprot.writeMessageEnd();
-
 
528
        oprot.getTransport().flush();
-
 
529
      }
-
 
530
 
-
 
531
    }
-
 
532
 
412
    private class addEmptyAWBs implements ProcessFunction {
533
    private class addEmptyAWBs implements ProcessFunction {
413
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
534
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
414
      {
535
      {
415
        addEmptyAWBs_args args = new addEmptyAWBs_args();
536
        addEmptyAWBs_args args = new addEmptyAWBs_args();
416
        args.read(iprot);
537
        args.read(iprot);
Line 553... Line 674...
553
 
674
 
554
    }
675
    }
555
 
676
 
556
  }
677
  }
557
 
678
 
-
 
679
  public static class getLogisticsEstimation_args implements TBase<getLogisticsEstimation_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsEstimation_args>   {
-
 
680
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsEstimation_args");
-
 
681
 
-
 
682
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)1);
-
 
683
    private static final TField DESTINATION_PIN_FIELD_DESC = new TField("destination_pin", TType.STRING, (short)2);
-
 
684
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)3);
-
 
685
 
-
 
686
    private long itemId;
-
 
687
    private String destination_pin;
-
 
688
    private long provider_id;
-
 
689
 
-
 
690
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
691
    public enum _Fields implements TFieldIdEnum {
-
 
692
      ITEM_ID((short)1, "itemId"),
-
 
693
      DESTINATION_PIN((short)2, "destination_pin"),
-
 
694
      PROVIDER_ID((short)3, "provider_id");
-
 
695
 
-
 
696
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
697
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
698
 
-
 
699
      static {
-
 
700
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
701
          byId.put((int)field._thriftId, field);
-
 
702
          byName.put(field.getFieldName(), field);
-
 
703
        }
-
 
704
      }
-
 
705
 
-
 
706
      /**
-
 
707
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
708
       */
-
 
709
      public static _Fields findByThriftId(int fieldId) {
-
 
710
        return byId.get(fieldId);
-
 
711
      }
-
 
712
 
-
 
713
      /**
-
 
714
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
715
       * if it is not found.
-
 
716
       */
-
 
717
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
718
        _Fields fields = findByThriftId(fieldId);
-
 
719
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
720
        return fields;
-
 
721
      }
-
 
722
 
-
 
723
      /**
-
 
724
       * Find the _Fields constant that matches name, or null if its not found.
-
 
725
       */
-
 
726
      public static _Fields findByName(String name) {
-
 
727
        return byName.get(name);
-
 
728
      }
-
 
729
 
-
 
730
      private final short _thriftId;
-
 
731
      private final String _fieldName;
-
 
732
 
-
 
733
      _Fields(short thriftId, String fieldName) {
-
 
734
        _thriftId = thriftId;
-
 
735
        _fieldName = fieldName;
-
 
736
      }
-
 
737
 
-
 
738
      public short getThriftFieldId() {
-
 
739
        return _thriftId;
-
 
740
      }
-
 
741
 
-
 
742
      public String getFieldName() {
-
 
743
        return _fieldName;
-
 
744
      }
-
 
745
    }
-
 
746
 
-
 
747
    // isset id assignments
-
 
748
    private static final int __ITEMID_ISSET_ID = 0;
-
 
749
    private static final int __PROVIDER_ID_ISSET_ID = 1;
-
 
750
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
751
 
-
 
752
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
753
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
-
 
754
          new FieldValueMetaData(TType.I64)));
-
 
755
      put(_Fields.DESTINATION_PIN, new FieldMetaData("destination_pin", TFieldRequirementType.DEFAULT, 
-
 
756
          new FieldValueMetaData(TType.STRING)));
-
 
757
      put(_Fields.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
-
 
758
          new FieldValueMetaData(TType.I64)));
-
 
759
    }});
-
 
760
 
-
 
761
    static {
-
 
762
      FieldMetaData.addStructMetaDataMap(getLogisticsEstimation_args.class, metaDataMap);
-
 
763
    }
-
 
764
 
-
 
765
    public getLogisticsEstimation_args() {
-
 
766
    }
-
 
767
 
-
 
768
    public getLogisticsEstimation_args(
-
 
769
      long itemId,
-
 
770
      String destination_pin,
-
 
771
      long provider_id)
-
 
772
    {
-
 
773
      this();
-
 
774
      this.itemId = itemId;
-
 
775
      setItemIdIsSet(true);
-
 
776
      this.destination_pin = destination_pin;
-
 
777
      this.provider_id = provider_id;
-
 
778
      setProvider_idIsSet(true);
-
 
779
    }
-
 
780
 
-
 
781
    /**
-
 
782
     * Performs a deep copy on <i>other</i>.
-
 
783
     */
-
 
784
    public getLogisticsEstimation_args(getLogisticsEstimation_args other) {
-
 
785
      __isset_bit_vector.clear();
-
 
786
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
787
      this.itemId = other.itemId;
-
 
788
      if (other.isSetDestination_pin()) {
-
 
789
        this.destination_pin = other.destination_pin;
-
 
790
      }
-
 
791
      this.provider_id = other.provider_id;
-
 
792
    }
-
 
793
 
-
 
794
    public getLogisticsEstimation_args deepCopy() {
-
 
795
      return new getLogisticsEstimation_args(this);
-
 
796
    }
-
 
797
 
-
 
798
    @Deprecated
-
 
799
    public getLogisticsEstimation_args clone() {
-
 
800
      return new getLogisticsEstimation_args(this);
-
 
801
    }
-
 
802
 
-
 
803
    public long getItemId() {
-
 
804
      return this.itemId;
-
 
805
    }
-
 
806
 
-
 
807
    public getLogisticsEstimation_args setItemId(long itemId) {
-
 
808
      this.itemId = itemId;
-
 
809
      setItemIdIsSet(true);
-
 
810
      return this;
-
 
811
    }
-
 
812
 
-
 
813
    public void unsetItemId() {
-
 
814
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
-
 
815
    }
-
 
816
 
-
 
817
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
-
 
818
    public boolean isSetItemId() {
-
 
819
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
-
 
820
    }
-
 
821
 
-
 
822
    public void setItemIdIsSet(boolean value) {
-
 
823
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
-
 
824
    }
-
 
825
 
-
 
826
    public String getDestination_pin() {
-
 
827
      return this.destination_pin;
-
 
828
    }
-
 
829
 
-
 
830
    public getLogisticsEstimation_args setDestination_pin(String destination_pin) {
-
 
831
      this.destination_pin = destination_pin;
-
 
832
      return this;
-
 
833
    }
-
 
834
 
-
 
835
    public void unsetDestination_pin() {
-
 
836
      this.destination_pin = null;
-
 
837
    }
-
 
838
 
-
 
839
    /** Returns true if field destination_pin is set (has been asigned a value) and false otherwise */
-
 
840
    public boolean isSetDestination_pin() {
-
 
841
      return this.destination_pin != null;
-
 
842
    }
-
 
843
 
-
 
844
    public void setDestination_pinIsSet(boolean value) {
-
 
845
      if (!value) {
-
 
846
        this.destination_pin = null;
-
 
847
      }
-
 
848
    }
-
 
849
 
-
 
850
    public long getProvider_id() {
-
 
851
      return this.provider_id;
-
 
852
    }
-
 
853
 
-
 
854
    public getLogisticsEstimation_args setProvider_id(long provider_id) {
-
 
855
      this.provider_id = provider_id;
-
 
856
      setProvider_idIsSet(true);
-
 
857
      return this;
-
 
858
    }
-
 
859
 
-
 
860
    public void unsetProvider_id() {
-
 
861
      __isset_bit_vector.clear(__PROVIDER_ID_ISSET_ID);
-
 
862
    }
-
 
863
 
-
 
864
    /** Returns true if field provider_id is set (has been asigned a value) and false otherwise */
-
 
865
    public boolean isSetProvider_id() {
-
 
866
      return __isset_bit_vector.get(__PROVIDER_ID_ISSET_ID);
-
 
867
    }
-
 
868
 
-
 
869
    public void setProvider_idIsSet(boolean value) {
-
 
870
      __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
-
 
871
    }
-
 
872
 
-
 
873
    public void setFieldValue(_Fields field, Object value) {
-
 
874
      switch (field) {
-
 
875
      case ITEM_ID:
-
 
876
        if (value == null) {
-
 
877
          unsetItemId();
-
 
878
        } else {
-
 
879
          setItemId((Long)value);
-
 
880
        }
-
 
881
        break;
-
 
882
 
-
 
883
      case DESTINATION_PIN:
-
 
884
        if (value == null) {
-
 
885
          unsetDestination_pin();
-
 
886
        } else {
-
 
887
          setDestination_pin((String)value);
-
 
888
        }
-
 
889
        break;
-
 
890
 
-
 
891
      case PROVIDER_ID:
-
 
892
        if (value == null) {
-
 
893
          unsetProvider_id();
-
 
894
        } else {
-
 
895
          setProvider_id((Long)value);
-
 
896
        }
-
 
897
        break;
-
 
898
 
-
 
899
      }
-
 
900
    }
-
 
901
 
-
 
902
    public void setFieldValue(int fieldID, Object value) {
-
 
903
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
904
    }
-
 
905
 
-
 
906
    public Object getFieldValue(_Fields field) {
-
 
907
      switch (field) {
-
 
908
      case ITEM_ID:
-
 
909
        return new Long(getItemId());
-
 
910
 
-
 
911
      case DESTINATION_PIN:
-
 
912
        return getDestination_pin();
-
 
913
 
-
 
914
      case PROVIDER_ID:
-
 
915
        return new Long(getProvider_id());
-
 
916
 
-
 
917
      }
-
 
918
      throw new IllegalStateException();
-
 
919
    }
-
 
920
 
-
 
921
    public Object getFieldValue(int fieldId) {
-
 
922
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
923
    }
-
 
924
 
-
 
925
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
926
    public boolean isSet(_Fields field) {
-
 
927
      switch (field) {
-
 
928
      case ITEM_ID:
-
 
929
        return isSetItemId();
-
 
930
      case DESTINATION_PIN:
-
 
931
        return isSetDestination_pin();
-
 
932
      case PROVIDER_ID:
-
 
933
        return isSetProvider_id();
-
 
934
      }
-
 
935
      throw new IllegalStateException();
-
 
936
    }
-
 
937
 
-
 
938
    public boolean isSet(int fieldID) {
-
 
939
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
940
    }
-
 
941
 
-
 
942
    @Override
-
 
943
    public boolean equals(Object that) {
-
 
944
      if (that == null)
-
 
945
        return false;
-
 
946
      if (that instanceof getLogisticsEstimation_args)
-
 
947
        return this.equals((getLogisticsEstimation_args)that);
-
 
948
      return false;
-
 
949
    }
-
 
950
 
-
 
951
    public boolean equals(getLogisticsEstimation_args that) {
-
 
952
      if (that == null)
-
 
953
        return false;
-
 
954
 
-
 
955
      boolean this_present_itemId = true;
-
 
956
      boolean that_present_itemId = true;
-
 
957
      if (this_present_itemId || that_present_itemId) {
-
 
958
        if (!(this_present_itemId && that_present_itemId))
-
 
959
          return false;
-
 
960
        if (this.itemId != that.itemId)
-
 
961
          return false;
-
 
962
      }
-
 
963
 
-
 
964
      boolean this_present_destination_pin = true && this.isSetDestination_pin();
-
 
965
      boolean that_present_destination_pin = true && that.isSetDestination_pin();
-
 
966
      if (this_present_destination_pin || that_present_destination_pin) {
-
 
967
        if (!(this_present_destination_pin && that_present_destination_pin))
-
 
968
          return false;
-
 
969
        if (!this.destination_pin.equals(that.destination_pin))
-
 
970
          return false;
-
 
971
      }
-
 
972
 
-
 
973
      boolean this_present_provider_id = true;
-
 
974
      boolean that_present_provider_id = true;
-
 
975
      if (this_present_provider_id || that_present_provider_id) {
-
 
976
        if (!(this_present_provider_id && that_present_provider_id))
-
 
977
          return false;
-
 
978
        if (this.provider_id != that.provider_id)
-
 
979
          return false;
-
 
980
      }
-
 
981
 
-
 
982
      return true;
-
 
983
    }
-
 
984
 
-
 
985
    @Override
-
 
986
    public int hashCode() {
-
 
987
      return 0;
-
 
988
    }
-
 
989
 
-
 
990
    public int compareTo(getLogisticsEstimation_args other) {
-
 
991
      if (!getClass().equals(other.getClass())) {
-
 
992
        return getClass().getName().compareTo(other.getClass().getName());
-
 
993
      }
-
 
994
 
-
 
995
      int lastComparison = 0;
-
 
996
      getLogisticsEstimation_args typedOther = (getLogisticsEstimation_args)other;
-
 
997
 
-
 
998
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
-
 
999
      if (lastComparison != 0) {
-
 
1000
        return lastComparison;
-
 
1001
      }
-
 
1002
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
-
 
1003
      if (lastComparison != 0) {
-
 
1004
        return lastComparison;
-
 
1005
      }
-
 
1006
      lastComparison = Boolean.valueOf(isSetDestination_pin()).compareTo(isSetDestination_pin());
-
 
1007
      if (lastComparison != 0) {
-
 
1008
        return lastComparison;
-
 
1009
      }
-
 
1010
      lastComparison = TBaseHelper.compareTo(destination_pin, typedOther.destination_pin);
-
 
1011
      if (lastComparison != 0) {
-
 
1012
        return lastComparison;
-
 
1013
      }
-
 
1014
      lastComparison = Boolean.valueOf(isSetProvider_id()).compareTo(isSetProvider_id());
-
 
1015
      if (lastComparison != 0) {
-
 
1016
        return lastComparison;
-
 
1017
      }
-
 
1018
      lastComparison = TBaseHelper.compareTo(provider_id, typedOther.provider_id);
-
 
1019
      if (lastComparison != 0) {
-
 
1020
        return lastComparison;
-
 
1021
      }
-
 
1022
      return 0;
-
 
1023
    }
-
 
1024
 
-
 
1025
    public void read(TProtocol iprot) throws TException {
-
 
1026
      TField field;
-
 
1027
      iprot.readStructBegin();
-
 
1028
      while (true)
-
 
1029
      {
-
 
1030
        field = iprot.readFieldBegin();
-
 
1031
        if (field.type == TType.STOP) { 
-
 
1032
          break;
-
 
1033
        }
-
 
1034
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1035
        if (fieldId == null) {
-
 
1036
          TProtocolUtil.skip(iprot, field.type);
-
 
1037
        } else {
-
 
1038
          switch (fieldId) {
-
 
1039
            case ITEM_ID:
-
 
1040
              if (field.type == TType.I64) {
-
 
1041
                this.itemId = iprot.readI64();
-
 
1042
                setItemIdIsSet(true);
-
 
1043
              } else { 
-
 
1044
                TProtocolUtil.skip(iprot, field.type);
-
 
1045
              }
-
 
1046
              break;
-
 
1047
            case DESTINATION_PIN:
-
 
1048
              if (field.type == TType.STRING) {
-
 
1049
                this.destination_pin = iprot.readString();
-
 
1050
              } else { 
-
 
1051
                TProtocolUtil.skip(iprot, field.type);
-
 
1052
              }
-
 
1053
              break;
-
 
1054
            case PROVIDER_ID:
-
 
1055
              if (field.type == TType.I64) {
-
 
1056
                this.provider_id = iprot.readI64();
-
 
1057
                setProvider_idIsSet(true);
-
 
1058
              } else { 
-
 
1059
                TProtocolUtil.skip(iprot, field.type);
-
 
1060
              }
-
 
1061
              break;
-
 
1062
          }
-
 
1063
          iprot.readFieldEnd();
-
 
1064
        }
-
 
1065
      }
-
 
1066
      iprot.readStructEnd();
-
 
1067
      validate();
-
 
1068
    }
-
 
1069
 
-
 
1070
    public void write(TProtocol oprot) throws TException {
-
 
1071
      validate();
-
 
1072
 
-
 
1073
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1074
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
-
 
1075
      oprot.writeI64(this.itemId);
-
 
1076
      oprot.writeFieldEnd();
-
 
1077
      if (this.destination_pin != null) {
-
 
1078
        oprot.writeFieldBegin(DESTINATION_PIN_FIELD_DESC);
-
 
1079
        oprot.writeString(this.destination_pin);
-
 
1080
        oprot.writeFieldEnd();
-
 
1081
      }
-
 
1082
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
-
 
1083
      oprot.writeI64(this.provider_id);
-
 
1084
      oprot.writeFieldEnd();
-
 
1085
      oprot.writeFieldStop();
-
 
1086
      oprot.writeStructEnd();
-
 
1087
    }
-
 
1088
 
-
 
1089
    @Override
-
 
1090
    public String toString() {
-
 
1091
      StringBuilder sb = new StringBuilder("getLogisticsEstimation_args(");
-
 
1092
      boolean first = true;
-
 
1093
 
-
 
1094
      sb.append("itemId:");
-
 
1095
      sb.append(this.itemId);
-
 
1096
      first = false;
-
 
1097
      if (!first) sb.append(", ");
-
 
1098
      sb.append("destination_pin:");
-
 
1099
      if (this.destination_pin == null) {
-
 
1100
        sb.append("null");
-
 
1101
      } else {
-
 
1102
        sb.append(this.destination_pin);
-
 
1103
      }
-
 
1104
      first = false;
-
 
1105
      if (!first) sb.append(", ");
-
 
1106
      sb.append("provider_id:");
-
 
1107
      sb.append(this.provider_id);
-
 
1108
      first = false;
-
 
1109
      sb.append(")");
-
 
1110
      return sb.toString();
-
 
1111
    }
-
 
1112
 
-
 
1113
    public void validate() throws TException {
-
 
1114
      // check for required fields
-
 
1115
    }
-
 
1116
 
-
 
1117
  }
-
 
1118
 
-
 
1119
  public static class getLogisticsEstimation_result implements TBase<getLogisticsEstimation_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLogisticsEstimation_result>   {
-
 
1120
    private static final TStruct STRUCT_DESC = new TStruct("getLogisticsEstimation_result");
-
 
1121
 
-
 
1122
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
-
 
1123
    private static final TField SE_FIELD_DESC = new TField("se", TType.STRUCT, (short)1);
-
 
1124
 
-
 
1125
    private ItemLogistics success;
-
 
1126
    private LogisticsServiceException se;
-
 
1127
 
-
 
1128
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1129
    public enum _Fields implements TFieldIdEnum {
-
 
1130
      SUCCESS((short)0, "success"),
-
 
1131
      SE((short)1, "se");
-
 
1132
 
-
 
1133
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1134
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1135
 
-
 
1136
      static {
-
 
1137
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1138
          byId.put((int)field._thriftId, field);
-
 
1139
          byName.put(field.getFieldName(), field);
-
 
1140
        }
-
 
1141
      }
-
 
1142
 
-
 
1143
      /**
-
 
1144
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1145
       */
-
 
1146
      public static _Fields findByThriftId(int fieldId) {
-
 
1147
        return byId.get(fieldId);
-
 
1148
      }
-
 
1149
 
-
 
1150
      /**
-
 
1151
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1152
       * if it is not found.
-
 
1153
       */
-
 
1154
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1155
        _Fields fields = findByThriftId(fieldId);
-
 
1156
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1157
        return fields;
-
 
1158
      }
-
 
1159
 
-
 
1160
      /**
-
 
1161
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1162
       */
-
 
1163
      public static _Fields findByName(String name) {
-
 
1164
        return byName.get(name);
-
 
1165
      }
-
 
1166
 
-
 
1167
      private final short _thriftId;
-
 
1168
      private final String _fieldName;
-
 
1169
 
-
 
1170
      _Fields(short thriftId, String fieldName) {
-
 
1171
        _thriftId = thriftId;
-
 
1172
        _fieldName = fieldName;
-
 
1173
      }
-
 
1174
 
-
 
1175
      public short getThriftFieldId() {
-
 
1176
        return _thriftId;
-
 
1177
      }
-
 
1178
 
-
 
1179
      public String getFieldName() {
-
 
1180
        return _fieldName;
-
 
1181
      }
-
 
1182
    }
-
 
1183
 
-
 
1184
    // isset id assignments
-
 
1185
 
-
 
1186
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1187
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
1188
          new StructMetaData(TType.STRUCT, ItemLogistics.class)));
-
 
1189
      put(_Fields.SE, new FieldMetaData("se", TFieldRequirementType.DEFAULT, 
-
 
1190
          new FieldValueMetaData(TType.STRUCT)));
-
 
1191
    }});
-
 
1192
 
-
 
1193
    static {
-
 
1194
      FieldMetaData.addStructMetaDataMap(getLogisticsEstimation_result.class, metaDataMap);
-
 
1195
    }
-
 
1196
 
-
 
1197
    public getLogisticsEstimation_result() {
-
 
1198
    }
-
 
1199
 
-
 
1200
    public getLogisticsEstimation_result(
-
 
1201
      ItemLogistics success,
-
 
1202
      LogisticsServiceException se)
-
 
1203
    {
-
 
1204
      this();
-
 
1205
      this.success = success;
-
 
1206
      this.se = se;
-
 
1207
    }
-
 
1208
 
-
 
1209
    /**
-
 
1210
     * Performs a deep copy on <i>other</i>.
-
 
1211
     */
-
 
1212
    public getLogisticsEstimation_result(getLogisticsEstimation_result other) {
-
 
1213
      if (other.isSetSuccess()) {
-
 
1214
        this.success = new ItemLogistics(other.success);
-
 
1215
      }
-
 
1216
      if (other.isSetSe()) {
-
 
1217
        this.se = new LogisticsServiceException(other.se);
-
 
1218
      }
-
 
1219
    }
-
 
1220
 
-
 
1221
    public getLogisticsEstimation_result deepCopy() {
-
 
1222
      return new getLogisticsEstimation_result(this);
-
 
1223
    }
-
 
1224
 
-
 
1225
    @Deprecated
-
 
1226
    public getLogisticsEstimation_result clone() {
-
 
1227
      return new getLogisticsEstimation_result(this);
-
 
1228
    }
-
 
1229
 
-
 
1230
    public ItemLogistics getSuccess() {
-
 
1231
      return this.success;
-
 
1232
    }
-
 
1233
 
-
 
1234
    public getLogisticsEstimation_result setSuccess(ItemLogistics success) {
-
 
1235
      this.success = success;
-
 
1236
      return this;
-
 
1237
    }
-
 
1238
 
-
 
1239
    public void unsetSuccess() {
-
 
1240
      this.success = null;
-
 
1241
    }
-
 
1242
 
-
 
1243
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
1244
    public boolean isSetSuccess() {
-
 
1245
      return this.success != null;
-
 
1246
    }
-
 
1247
 
-
 
1248
    public void setSuccessIsSet(boolean value) {
-
 
1249
      if (!value) {
-
 
1250
        this.success = null;
-
 
1251
      }
-
 
1252
    }
-
 
1253
 
-
 
1254
    public LogisticsServiceException getSe() {
-
 
1255
      return this.se;
-
 
1256
    }
-
 
1257
 
-
 
1258
    public getLogisticsEstimation_result setSe(LogisticsServiceException se) {
-
 
1259
      this.se = se;
-
 
1260
      return this;
-
 
1261
    }
-
 
1262
 
-
 
1263
    public void unsetSe() {
-
 
1264
      this.se = null;
-
 
1265
    }
-
 
1266
 
-
 
1267
    /** Returns true if field se is set (has been asigned a value) and false otherwise */
-
 
1268
    public boolean isSetSe() {
-
 
1269
      return this.se != null;
-
 
1270
    }
-
 
1271
 
-
 
1272
    public void setSeIsSet(boolean value) {
-
 
1273
      if (!value) {
-
 
1274
        this.se = null;
-
 
1275
      }
-
 
1276
    }
-
 
1277
 
-
 
1278
    public void setFieldValue(_Fields field, Object value) {
-
 
1279
      switch (field) {
-
 
1280
      case SUCCESS:
-
 
1281
        if (value == null) {
-
 
1282
          unsetSuccess();
-
 
1283
        } else {
-
 
1284
          setSuccess((ItemLogistics)value);
-
 
1285
        }
-
 
1286
        break;
-
 
1287
 
-
 
1288
      case SE:
-
 
1289
        if (value == null) {
-
 
1290
          unsetSe();
-
 
1291
        } else {
-
 
1292
          setSe((LogisticsServiceException)value);
-
 
1293
        }
-
 
1294
        break;
-
 
1295
 
-
 
1296
      }
-
 
1297
    }
-
 
1298
 
-
 
1299
    public void setFieldValue(int fieldID, Object value) {
-
 
1300
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1301
    }
-
 
1302
 
-
 
1303
    public Object getFieldValue(_Fields field) {
-
 
1304
      switch (field) {
-
 
1305
      case SUCCESS:
-
 
1306
        return getSuccess();
-
 
1307
 
-
 
1308
      case SE:
-
 
1309
        return getSe();
-
 
1310
 
-
 
1311
      }
-
 
1312
      throw new IllegalStateException();
-
 
1313
    }
-
 
1314
 
-
 
1315
    public Object getFieldValue(int fieldId) {
-
 
1316
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1317
    }
-
 
1318
 
-
 
1319
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
1320
    public boolean isSet(_Fields field) {
-
 
1321
      switch (field) {
-
 
1322
      case SUCCESS:
-
 
1323
        return isSetSuccess();
-
 
1324
      case SE:
-
 
1325
        return isSetSe();
-
 
1326
      }
-
 
1327
      throw new IllegalStateException();
-
 
1328
    }
-
 
1329
 
-
 
1330
    public boolean isSet(int fieldID) {
-
 
1331
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1332
    }
-
 
1333
 
-
 
1334
    @Override
-
 
1335
    public boolean equals(Object that) {
-
 
1336
      if (that == null)
-
 
1337
        return false;
-
 
1338
      if (that instanceof getLogisticsEstimation_result)
-
 
1339
        return this.equals((getLogisticsEstimation_result)that);
-
 
1340
      return false;
-
 
1341
    }
-
 
1342
 
-
 
1343
    public boolean equals(getLogisticsEstimation_result that) {
-
 
1344
      if (that == null)
-
 
1345
        return false;
-
 
1346
 
-
 
1347
      boolean this_present_success = true && this.isSetSuccess();
-
 
1348
      boolean that_present_success = true && that.isSetSuccess();
-
 
1349
      if (this_present_success || that_present_success) {
-
 
1350
        if (!(this_present_success && that_present_success))
-
 
1351
          return false;
-
 
1352
        if (!this.success.equals(that.success))
-
 
1353
          return false;
-
 
1354
      }
-
 
1355
 
-
 
1356
      boolean this_present_se = true && this.isSetSe();
-
 
1357
      boolean that_present_se = true && that.isSetSe();
-
 
1358
      if (this_present_se || that_present_se) {
-
 
1359
        if (!(this_present_se && that_present_se))
-
 
1360
          return false;
-
 
1361
        if (!this.se.equals(that.se))
-
 
1362
          return false;
-
 
1363
      }
-
 
1364
 
-
 
1365
      return true;
-
 
1366
    }
-
 
1367
 
-
 
1368
    @Override
-
 
1369
    public int hashCode() {
-
 
1370
      return 0;
-
 
1371
    }
-
 
1372
 
-
 
1373
    public int compareTo(getLogisticsEstimation_result other) {
-
 
1374
      if (!getClass().equals(other.getClass())) {
-
 
1375
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1376
      }
-
 
1377
 
-
 
1378
      int lastComparison = 0;
-
 
1379
      getLogisticsEstimation_result typedOther = (getLogisticsEstimation_result)other;
-
 
1380
 
-
 
1381
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
1382
      if (lastComparison != 0) {
-
 
1383
        return lastComparison;
-
 
1384
      }
-
 
1385
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
1386
      if (lastComparison != 0) {
-
 
1387
        return lastComparison;
-
 
1388
      }
-
 
1389
      lastComparison = Boolean.valueOf(isSetSe()).compareTo(isSetSe());
-
 
1390
      if (lastComparison != 0) {
-
 
1391
        return lastComparison;
-
 
1392
      }
-
 
1393
      lastComparison = TBaseHelper.compareTo(se, typedOther.se);
-
 
1394
      if (lastComparison != 0) {
-
 
1395
        return lastComparison;
-
 
1396
      }
-
 
1397
      return 0;
-
 
1398
    }
-
 
1399
 
-
 
1400
    public void read(TProtocol iprot) throws TException {
-
 
1401
      TField field;
-
 
1402
      iprot.readStructBegin();
-
 
1403
      while (true)
-
 
1404
      {
-
 
1405
        field = iprot.readFieldBegin();
-
 
1406
        if (field.type == TType.STOP) { 
-
 
1407
          break;
-
 
1408
        }
-
 
1409
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1410
        if (fieldId == null) {
-
 
1411
          TProtocolUtil.skip(iprot, field.type);
-
 
1412
        } else {
-
 
1413
          switch (fieldId) {
-
 
1414
            case SUCCESS:
-
 
1415
              if (field.type == TType.STRUCT) {
-
 
1416
                this.success = new ItemLogistics();
-
 
1417
                this.success.read(iprot);
-
 
1418
              } else { 
-
 
1419
                TProtocolUtil.skip(iprot, field.type);
-
 
1420
              }
-
 
1421
              break;
-
 
1422
            case SE:
-
 
1423
              if (field.type == TType.STRUCT) {
-
 
1424
                this.se = new LogisticsServiceException();
-
 
1425
                this.se.read(iprot);
-
 
1426
              } else { 
-
 
1427
                TProtocolUtil.skip(iprot, field.type);
-
 
1428
              }
-
 
1429
              break;
-
 
1430
          }
-
 
1431
          iprot.readFieldEnd();
-
 
1432
        }
-
 
1433
      }
-
 
1434
      iprot.readStructEnd();
-
 
1435
      validate();
-
 
1436
    }
-
 
1437
 
-
 
1438
    public void write(TProtocol oprot) throws TException {
-
 
1439
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1440
 
-
 
1441
      if (this.isSetSuccess()) {
-
 
1442
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
1443
        this.success.write(oprot);
-
 
1444
        oprot.writeFieldEnd();
-
 
1445
      } else if (this.isSetSe()) {
-
 
1446
        oprot.writeFieldBegin(SE_FIELD_DESC);
-
 
1447
        this.se.write(oprot);
-
 
1448
        oprot.writeFieldEnd();
-
 
1449
      }
-
 
1450
      oprot.writeFieldStop();
-
 
1451
      oprot.writeStructEnd();
-
 
1452
    }
-
 
1453
 
-
 
1454
    @Override
-
 
1455
    public String toString() {
-
 
1456
      StringBuilder sb = new StringBuilder("getLogisticsEstimation_result(");
-
 
1457
      boolean first = true;
-
 
1458
 
-
 
1459
      sb.append("success:");
-
 
1460
      if (this.success == null) {
-
 
1461
        sb.append("null");
-
 
1462
      } else {
-
 
1463
        sb.append(this.success);
-
 
1464
      }
-
 
1465
      first = false;
-
 
1466
      if (!first) sb.append(", ");
-
 
1467
      sb.append("se:");
-
 
1468
      if (this.se == null) {
-
 
1469
        sb.append("null");
-
 
1470
      } else {
-
 
1471
        sb.append(this.se);
-
 
1472
      }
-
 
1473
      first = false;
-
 
1474
      sb.append(")");
-
 
1475
      return sb.toString();
-
 
1476
    }
-
 
1477
 
-
 
1478
    public void validate() throws TException {
-
 
1479
      // check for required fields
-
 
1480
    }
-
 
1481
 
-
 
1482
  }
-
 
1483
 
-
 
1484
  public static class addDeliveryEstimate_args implements TBase<addDeliveryEstimate_args._Fields>, java.io.Serializable, Cloneable, Comparable<addDeliveryEstimate_args>   {
-
 
1485
    private static final TStruct STRUCT_DESC = new TStruct("addDeliveryEstimate_args");
-
 
1486
 
-
 
1487
    private static final TField WARAHOUSE_ID_FIELD_DESC = new TField("warahouse_id", TType.I64, (short)1);
-
 
1488
    private static final TField DESTINATION_PIN_FIELD_DESC = new TField("destination_pin", TType.STRING, (short)2);
-
 
1489
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)3);
-
 
1490
    private static final TField DELIVERY_TIME_FIELD_DESC = new TField("delivery_time", TType.I64, (short)4);
-
 
1491
 
-
 
1492
    private long warahouse_id;
-
 
1493
    private String destination_pin;
-
 
1494
    private long provider_id;
-
 
1495
    private long delivery_time;
-
 
1496
 
-
 
1497
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
1498
    public enum _Fields implements TFieldIdEnum {
-
 
1499
      WARAHOUSE_ID((short)1, "warahouse_id"),
-
 
1500
      DESTINATION_PIN((short)2, "destination_pin"),
-
 
1501
      PROVIDER_ID((short)3, "provider_id"),
-
 
1502
      DELIVERY_TIME((short)4, "delivery_time");
-
 
1503
 
-
 
1504
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
1505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
1506
 
-
 
1507
      static {
-
 
1508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
1509
          byId.put((int)field._thriftId, field);
-
 
1510
          byName.put(field.getFieldName(), field);
-
 
1511
        }
-
 
1512
      }
-
 
1513
 
-
 
1514
      /**
-
 
1515
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
1516
       */
-
 
1517
      public static _Fields findByThriftId(int fieldId) {
-
 
1518
        return byId.get(fieldId);
-
 
1519
      }
-
 
1520
 
-
 
1521
      /**
-
 
1522
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
1523
       * if it is not found.
-
 
1524
       */
-
 
1525
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
1526
        _Fields fields = findByThriftId(fieldId);
-
 
1527
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
1528
        return fields;
-
 
1529
      }
-
 
1530
 
-
 
1531
      /**
-
 
1532
       * Find the _Fields constant that matches name, or null if its not found.
-
 
1533
       */
-
 
1534
      public static _Fields findByName(String name) {
-
 
1535
        return byName.get(name);
-
 
1536
      }
-
 
1537
 
-
 
1538
      private final short _thriftId;
-
 
1539
      private final String _fieldName;
-
 
1540
 
-
 
1541
      _Fields(short thriftId, String fieldName) {
-
 
1542
        _thriftId = thriftId;
-
 
1543
        _fieldName = fieldName;
-
 
1544
      }
-
 
1545
 
-
 
1546
      public short getThriftFieldId() {
-
 
1547
        return _thriftId;
-
 
1548
      }
-
 
1549
 
-
 
1550
      public String getFieldName() {
-
 
1551
        return _fieldName;
-
 
1552
      }
-
 
1553
    }
-
 
1554
 
-
 
1555
    // isset id assignments
-
 
1556
    private static final int __WARAHOUSE_ID_ISSET_ID = 0;
-
 
1557
    private static final int __PROVIDER_ID_ISSET_ID = 1;
-
 
1558
    private static final int __DELIVERY_TIME_ISSET_ID = 2;
-
 
1559
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
1560
 
-
 
1561
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
1562
      put(_Fields.WARAHOUSE_ID, new FieldMetaData("warahouse_id", TFieldRequirementType.DEFAULT, 
-
 
1563
          new FieldValueMetaData(TType.I64)));
-
 
1564
      put(_Fields.DESTINATION_PIN, new FieldMetaData("destination_pin", TFieldRequirementType.DEFAULT, 
-
 
1565
          new FieldValueMetaData(TType.STRING)));
-
 
1566
      put(_Fields.PROVIDER_ID, new FieldMetaData("provider_id", TFieldRequirementType.DEFAULT, 
-
 
1567
          new FieldValueMetaData(TType.I64)));
-
 
1568
      put(_Fields.DELIVERY_TIME, new FieldMetaData("delivery_time", TFieldRequirementType.DEFAULT, 
-
 
1569
          new FieldValueMetaData(TType.I64)));
-
 
1570
    }});
-
 
1571
 
-
 
1572
    static {
-
 
1573
      FieldMetaData.addStructMetaDataMap(addDeliveryEstimate_args.class, metaDataMap);
-
 
1574
    }
-
 
1575
 
-
 
1576
    public addDeliveryEstimate_args() {
-
 
1577
    }
-
 
1578
 
-
 
1579
    public addDeliveryEstimate_args(
-
 
1580
      long warahouse_id,
-
 
1581
      String destination_pin,
-
 
1582
      long provider_id,
-
 
1583
      long delivery_time)
-
 
1584
    {
-
 
1585
      this();
-
 
1586
      this.warahouse_id = warahouse_id;
-
 
1587
      setWarahouse_idIsSet(true);
-
 
1588
      this.destination_pin = destination_pin;
-
 
1589
      this.provider_id = provider_id;
-
 
1590
      setProvider_idIsSet(true);
-
 
1591
      this.delivery_time = delivery_time;
-
 
1592
      setDelivery_timeIsSet(true);
-
 
1593
    }
-
 
1594
 
-
 
1595
    /**
-
 
1596
     * Performs a deep copy on <i>other</i>.
-
 
1597
     */
-
 
1598
    public addDeliveryEstimate_args(addDeliveryEstimate_args other) {
-
 
1599
      __isset_bit_vector.clear();
-
 
1600
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
1601
      this.warahouse_id = other.warahouse_id;
-
 
1602
      if (other.isSetDestination_pin()) {
-
 
1603
        this.destination_pin = other.destination_pin;
-
 
1604
      }
-
 
1605
      this.provider_id = other.provider_id;
-
 
1606
      this.delivery_time = other.delivery_time;
-
 
1607
    }
-
 
1608
 
-
 
1609
    public addDeliveryEstimate_args deepCopy() {
-
 
1610
      return new addDeliveryEstimate_args(this);
-
 
1611
    }
-
 
1612
 
-
 
1613
    @Deprecated
-
 
1614
    public addDeliveryEstimate_args clone() {
-
 
1615
      return new addDeliveryEstimate_args(this);
-
 
1616
    }
-
 
1617
 
-
 
1618
    public long getWarahouse_id() {
-
 
1619
      return this.warahouse_id;
-
 
1620
    }
-
 
1621
 
-
 
1622
    public addDeliveryEstimate_args setWarahouse_id(long warahouse_id) {
-
 
1623
      this.warahouse_id = warahouse_id;
-
 
1624
      setWarahouse_idIsSet(true);
-
 
1625
      return this;
-
 
1626
    }
-
 
1627
 
-
 
1628
    public void unsetWarahouse_id() {
-
 
1629
      __isset_bit_vector.clear(__WARAHOUSE_ID_ISSET_ID);
-
 
1630
    }
-
 
1631
 
-
 
1632
    /** Returns true if field warahouse_id is set (has been asigned a value) and false otherwise */
-
 
1633
    public boolean isSetWarahouse_id() {
-
 
1634
      return __isset_bit_vector.get(__WARAHOUSE_ID_ISSET_ID);
-
 
1635
    }
-
 
1636
 
-
 
1637
    public void setWarahouse_idIsSet(boolean value) {
-
 
1638
      __isset_bit_vector.set(__WARAHOUSE_ID_ISSET_ID, value);
-
 
1639
    }
-
 
1640
 
-
 
1641
    public String getDestination_pin() {
-
 
1642
      return this.destination_pin;
-
 
1643
    }
-
 
1644
 
-
 
1645
    public addDeliveryEstimate_args setDestination_pin(String destination_pin) {
-
 
1646
      this.destination_pin = destination_pin;
-
 
1647
      return this;
-
 
1648
    }
-
 
1649
 
-
 
1650
    public void unsetDestination_pin() {
-
 
1651
      this.destination_pin = null;
-
 
1652
    }
-
 
1653
 
-
 
1654
    /** Returns true if field destination_pin is set (has been asigned a value) and false otherwise */
-
 
1655
    public boolean isSetDestination_pin() {
-
 
1656
      return this.destination_pin != null;
-
 
1657
    }
-
 
1658
 
-
 
1659
    public void setDestination_pinIsSet(boolean value) {
-
 
1660
      if (!value) {
-
 
1661
        this.destination_pin = null;
-
 
1662
      }
-
 
1663
    }
-
 
1664
 
-
 
1665
    public long getProvider_id() {
-
 
1666
      return this.provider_id;
-
 
1667
    }
-
 
1668
 
-
 
1669
    public addDeliveryEstimate_args setProvider_id(long provider_id) {
-
 
1670
      this.provider_id = provider_id;
-
 
1671
      setProvider_idIsSet(true);
-
 
1672
      return this;
-
 
1673
    }
-
 
1674
 
-
 
1675
    public void unsetProvider_id() {
-
 
1676
      __isset_bit_vector.clear(__PROVIDER_ID_ISSET_ID);
-
 
1677
    }
-
 
1678
 
-
 
1679
    /** Returns true if field provider_id is set (has been asigned a value) and false otherwise */
-
 
1680
    public boolean isSetProvider_id() {
-
 
1681
      return __isset_bit_vector.get(__PROVIDER_ID_ISSET_ID);
-
 
1682
    }
-
 
1683
 
-
 
1684
    public void setProvider_idIsSet(boolean value) {
-
 
1685
      __isset_bit_vector.set(__PROVIDER_ID_ISSET_ID, value);
-
 
1686
    }
-
 
1687
 
-
 
1688
    public long getDelivery_time() {
-
 
1689
      return this.delivery_time;
-
 
1690
    }
-
 
1691
 
-
 
1692
    public addDeliveryEstimate_args setDelivery_time(long delivery_time) {
-
 
1693
      this.delivery_time = delivery_time;
-
 
1694
      setDelivery_timeIsSet(true);
-
 
1695
      return this;
-
 
1696
    }
-
 
1697
 
-
 
1698
    public void unsetDelivery_time() {
-
 
1699
      __isset_bit_vector.clear(__DELIVERY_TIME_ISSET_ID);
-
 
1700
    }
-
 
1701
 
-
 
1702
    /** Returns true if field delivery_time is set (has been asigned a value) and false otherwise */
-
 
1703
    public boolean isSetDelivery_time() {
-
 
1704
      return __isset_bit_vector.get(__DELIVERY_TIME_ISSET_ID);
-
 
1705
    }
-
 
1706
 
-
 
1707
    public void setDelivery_timeIsSet(boolean value) {
-
 
1708
      __isset_bit_vector.set(__DELIVERY_TIME_ISSET_ID, value);
-
 
1709
    }
-
 
1710
 
-
 
1711
    public void setFieldValue(_Fields field, Object value) {
-
 
1712
      switch (field) {
-
 
1713
      case WARAHOUSE_ID:
-
 
1714
        if (value == null) {
-
 
1715
          unsetWarahouse_id();
-
 
1716
        } else {
-
 
1717
          setWarahouse_id((Long)value);
-
 
1718
        }
-
 
1719
        break;
-
 
1720
 
-
 
1721
      case DESTINATION_PIN:
-
 
1722
        if (value == null) {
-
 
1723
          unsetDestination_pin();
-
 
1724
        } else {
-
 
1725
          setDestination_pin((String)value);
-
 
1726
        }
-
 
1727
        break;
-
 
1728
 
-
 
1729
      case PROVIDER_ID:
-
 
1730
        if (value == null) {
-
 
1731
          unsetProvider_id();
-
 
1732
        } else {
-
 
1733
          setProvider_id((Long)value);
-
 
1734
        }
-
 
1735
        break;
-
 
1736
 
-
 
1737
      case DELIVERY_TIME:
-
 
1738
        if (value == null) {
-
 
1739
          unsetDelivery_time();
-
 
1740
        } else {
-
 
1741
          setDelivery_time((Long)value);
-
 
1742
        }
-
 
1743
        break;
-
 
1744
 
-
 
1745
      }
-
 
1746
    }
-
 
1747
 
-
 
1748
    public void setFieldValue(int fieldID, Object value) {
-
 
1749
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
1750
    }
-
 
1751
 
-
 
1752
    public Object getFieldValue(_Fields field) {
-
 
1753
      switch (field) {
-
 
1754
      case WARAHOUSE_ID:
-
 
1755
        return new Long(getWarahouse_id());
-
 
1756
 
-
 
1757
      case DESTINATION_PIN:
-
 
1758
        return getDestination_pin();
-
 
1759
 
-
 
1760
      case PROVIDER_ID:
-
 
1761
        return new Long(getProvider_id());
-
 
1762
 
-
 
1763
      case DELIVERY_TIME:
-
 
1764
        return new Long(getDelivery_time());
-
 
1765
 
-
 
1766
      }
-
 
1767
      throw new IllegalStateException();
-
 
1768
    }
-
 
1769
 
-
 
1770
    public Object getFieldValue(int fieldId) {
-
 
1771
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
1772
    }
-
 
1773
 
-
 
1774
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
1775
    public boolean isSet(_Fields field) {
-
 
1776
      switch (field) {
-
 
1777
      case WARAHOUSE_ID:
-
 
1778
        return isSetWarahouse_id();
-
 
1779
      case DESTINATION_PIN:
-
 
1780
        return isSetDestination_pin();
-
 
1781
      case PROVIDER_ID:
-
 
1782
        return isSetProvider_id();
-
 
1783
      case DELIVERY_TIME:
-
 
1784
        return isSetDelivery_time();
-
 
1785
      }
-
 
1786
      throw new IllegalStateException();
-
 
1787
    }
-
 
1788
 
-
 
1789
    public boolean isSet(int fieldID) {
-
 
1790
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
1791
    }
-
 
1792
 
-
 
1793
    @Override
-
 
1794
    public boolean equals(Object that) {
-
 
1795
      if (that == null)
-
 
1796
        return false;
-
 
1797
      if (that instanceof addDeliveryEstimate_args)
-
 
1798
        return this.equals((addDeliveryEstimate_args)that);
-
 
1799
      return false;
-
 
1800
    }
-
 
1801
 
-
 
1802
    public boolean equals(addDeliveryEstimate_args that) {
-
 
1803
      if (that == null)
-
 
1804
        return false;
-
 
1805
 
-
 
1806
      boolean this_present_warahouse_id = true;
-
 
1807
      boolean that_present_warahouse_id = true;
-
 
1808
      if (this_present_warahouse_id || that_present_warahouse_id) {
-
 
1809
        if (!(this_present_warahouse_id && that_present_warahouse_id))
-
 
1810
          return false;
-
 
1811
        if (this.warahouse_id != that.warahouse_id)
-
 
1812
          return false;
-
 
1813
      }
-
 
1814
 
-
 
1815
      boolean this_present_destination_pin = true && this.isSetDestination_pin();
-
 
1816
      boolean that_present_destination_pin = true && that.isSetDestination_pin();
-
 
1817
      if (this_present_destination_pin || that_present_destination_pin) {
-
 
1818
        if (!(this_present_destination_pin && that_present_destination_pin))
-
 
1819
          return false;
-
 
1820
        if (!this.destination_pin.equals(that.destination_pin))
-
 
1821
          return false;
-
 
1822
      }
-
 
1823
 
-
 
1824
      boolean this_present_provider_id = true;
-
 
1825
      boolean that_present_provider_id = true;
-
 
1826
      if (this_present_provider_id || that_present_provider_id) {
-
 
1827
        if (!(this_present_provider_id && that_present_provider_id))
-
 
1828
          return false;
-
 
1829
        if (this.provider_id != that.provider_id)
-
 
1830
          return false;
-
 
1831
      }
-
 
1832
 
-
 
1833
      boolean this_present_delivery_time = true;
-
 
1834
      boolean that_present_delivery_time = true;
-
 
1835
      if (this_present_delivery_time || that_present_delivery_time) {
-
 
1836
        if (!(this_present_delivery_time && that_present_delivery_time))
-
 
1837
          return false;
-
 
1838
        if (this.delivery_time != that.delivery_time)
-
 
1839
          return false;
-
 
1840
      }
-
 
1841
 
-
 
1842
      return true;
-
 
1843
    }
-
 
1844
 
-
 
1845
    @Override
-
 
1846
    public int hashCode() {
-
 
1847
      return 0;
-
 
1848
    }
-
 
1849
 
-
 
1850
    public int compareTo(addDeliveryEstimate_args other) {
-
 
1851
      if (!getClass().equals(other.getClass())) {
-
 
1852
        return getClass().getName().compareTo(other.getClass().getName());
-
 
1853
      }
-
 
1854
 
-
 
1855
      int lastComparison = 0;
-
 
1856
      addDeliveryEstimate_args typedOther = (addDeliveryEstimate_args)other;
-
 
1857
 
-
 
1858
      lastComparison = Boolean.valueOf(isSetWarahouse_id()).compareTo(isSetWarahouse_id());
-
 
1859
      if (lastComparison != 0) {
-
 
1860
        return lastComparison;
-
 
1861
      }
-
 
1862
      lastComparison = TBaseHelper.compareTo(warahouse_id, typedOther.warahouse_id);
-
 
1863
      if (lastComparison != 0) {
-
 
1864
        return lastComparison;
-
 
1865
      }
-
 
1866
      lastComparison = Boolean.valueOf(isSetDestination_pin()).compareTo(isSetDestination_pin());
-
 
1867
      if (lastComparison != 0) {
-
 
1868
        return lastComparison;
-
 
1869
      }
-
 
1870
      lastComparison = TBaseHelper.compareTo(destination_pin, typedOther.destination_pin);
-
 
1871
      if (lastComparison != 0) {
-
 
1872
        return lastComparison;
-
 
1873
      }
-
 
1874
      lastComparison = Boolean.valueOf(isSetProvider_id()).compareTo(isSetProvider_id());
-
 
1875
      if (lastComparison != 0) {
-
 
1876
        return lastComparison;
-
 
1877
      }
-
 
1878
      lastComparison = TBaseHelper.compareTo(provider_id, typedOther.provider_id);
-
 
1879
      if (lastComparison != 0) {
-
 
1880
        return lastComparison;
-
 
1881
      }
-
 
1882
      lastComparison = Boolean.valueOf(isSetDelivery_time()).compareTo(isSetDelivery_time());
-
 
1883
      if (lastComparison != 0) {
-
 
1884
        return lastComparison;
-
 
1885
      }
-
 
1886
      lastComparison = TBaseHelper.compareTo(delivery_time, typedOther.delivery_time);
-
 
1887
      if (lastComparison != 0) {
-
 
1888
        return lastComparison;
-
 
1889
      }
-
 
1890
      return 0;
-
 
1891
    }
-
 
1892
 
-
 
1893
    public void read(TProtocol iprot) throws TException {
-
 
1894
      TField field;
-
 
1895
      iprot.readStructBegin();
-
 
1896
      while (true)
-
 
1897
      {
-
 
1898
        field = iprot.readFieldBegin();
-
 
1899
        if (field.type == TType.STOP) { 
-
 
1900
          break;
-
 
1901
        }
-
 
1902
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
1903
        if (fieldId == null) {
-
 
1904
          TProtocolUtil.skip(iprot, field.type);
-
 
1905
        } else {
-
 
1906
          switch (fieldId) {
-
 
1907
            case WARAHOUSE_ID:
-
 
1908
              if (field.type == TType.I64) {
-
 
1909
                this.warahouse_id = iprot.readI64();
-
 
1910
                setWarahouse_idIsSet(true);
-
 
1911
              } else { 
-
 
1912
                TProtocolUtil.skip(iprot, field.type);
-
 
1913
              }
-
 
1914
              break;
-
 
1915
            case DESTINATION_PIN:
-
 
1916
              if (field.type == TType.STRING) {
-
 
1917
                this.destination_pin = iprot.readString();
-
 
1918
              } else { 
-
 
1919
                TProtocolUtil.skip(iprot, field.type);
-
 
1920
              }
-
 
1921
              break;
-
 
1922
            case PROVIDER_ID:
-
 
1923
              if (field.type == TType.I64) {
-
 
1924
                this.provider_id = iprot.readI64();
-
 
1925
                setProvider_idIsSet(true);
-
 
1926
              } else { 
-
 
1927
                TProtocolUtil.skip(iprot, field.type);
-
 
1928
              }
-
 
1929
              break;
-
 
1930
            case DELIVERY_TIME:
-
 
1931
              if (field.type == TType.I64) {
-
 
1932
                this.delivery_time = iprot.readI64();
-
 
1933
                setDelivery_timeIsSet(true);
-
 
1934
              } else { 
-
 
1935
                TProtocolUtil.skip(iprot, field.type);
-
 
1936
              }
-
 
1937
              break;
-
 
1938
          }
-
 
1939
          iprot.readFieldEnd();
-
 
1940
        }
-
 
1941
      }
-
 
1942
      iprot.readStructEnd();
-
 
1943
      validate();
-
 
1944
    }
-
 
1945
 
-
 
1946
    public void write(TProtocol oprot) throws TException {
-
 
1947
      validate();
-
 
1948
 
-
 
1949
      oprot.writeStructBegin(STRUCT_DESC);
-
 
1950
      oprot.writeFieldBegin(WARAHOUSE_ID_FIELD_DESC);
-
 
1951
      oprot.writeI64(this.warahouse_id);
-
 
1952
      oprot.writeFieldEnd();
-
 
1953
      if (this.destination_pin != null) {
-
 
1954
        oprot.writeFieldBegin(DESTINATION_PIN_FIELD_DESC);
-
 
1955
        oprot.writeString(this.destination_pin);
-
 
1956
        oprot.writeFieldEnd();
-
 
1957
      }
-
 
1958
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
-
 
1959
      oprot.writeI64(this.provider_id);
-
 
1960
      oprot.writeFieldEnd();
-
 
1961
      oprot.writeFieldBegin(DELIVERY_TIME_FIELD_DESC);
-
 
1962
      oprot.writeI64(this.delivery_time);
-
 
1963
      oprot.writeFieldEnd();
-
 
1964
      oprot.writeFieldStop();
-
 
1965
      oprot.writeStructEnd();
-
 
1966
    }
-
 
1967
 
-
 
1968
    @Override
-
 
1969
    public String toString() {
-
 
1970
      StringBuilder sb = new StringBuilder("addDeliveryEstimate_args(");
-
 
1971
      boolean first = true;
-
 
1972
 
-
 
1973
      sb.append("warahouse_id:");
-
 
1974
      sb.append(this.warahouse_id);
-
 
1975
      first = false;
-
 
1976
      if (!first) sb.append(", ");
-
 
1977
      sb.append("destination_pin:");
-
 
1978
      if (this.destination_pin == null) {
-
 
1979
        sb.append("null");
-
 
1980
      } else {
-
 
1981
        sb.append(this.destination_pin);
-
 
1982
      }
-
 
1983
      first = false;
-
 
1984
      if (!first) sb.append(", ");
-
 
1985
      sb.append("provider_id:");
-
 
1986
      sb.append(this.provider_id);
-
 
1987
      first = false;
-
 
1988
      if (!first) sb.append(", ");
-
 
1989
      sb.append("delivery_time:");
-
 
1990
      sb.append(this.delivery_time);
-
 
1991
      first = false;
-
 
1992
      sb.append(")");
-
 
1993
      return sb.toString();
-
 
1994
    }
-
 
1995
 
-
 
1996
    public void validate() throws TException {
-
 
1997
      // check for required fields
-
 
1998
    }
-
 
1999
 
-
 
2000
  }
-
 
2001
 
-
 
2002
  public static class addDeliveryEstimate_result implements TBase<addDeliveryEstimate_result._Fields>, java.io.Serializable, Cloneable, Comparable<addDeliveryEstimate_result>   {
-
 
2003
    private static final TStruct STRUCT_DESC = new TStruct("addDeliveryEstimate_result");
-
 
2004
 
-
 
2005
 
-
 
2006
 
-
 
2007
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
2008
    public enum _Fields implements TFieldIdEnum {
-
 
2009
;
-
 
2010
 
-
 
2011
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
2012
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
2013
 
-
 
2014
      static {
-
 
2015
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
2016
          byId.put((int)field._thriftId, field);
-
 
2017
          byName.put(field.getFieldName(), field);
-
 
2018
        }
-
 
2019
      }
-
 
2020
 
-
 
2021
      /**
-
 
2022
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
2023
       */
-
 
2024
      public static _Fields findByThriftId(int fieldId) {
-
 
2025
        return byId.get(fieldId);
-
 
2026
      }
-
 
2027
 
-
 
2028
      /**
-
 
2029
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
2030
       * if it is not found.
-
 
2031
       */
-
 
2032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
2033
        _Fields fields = findByThriftId(fieldId);
-
 
2034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
2035
        return fields;
-
 
2036
      }
-
 
2037
 
-
 
2038
      /**
-
 
2039
       * Find the _Fields constant that matches name, or null if its not found.
-
 
2040
       */
-
 
2041
      public static _Fields findByName(String name) {
-
 
2042
        return byName.get(name);
-
 
2043
      }
-
 
2044
 
-
 
2045
      private final short _thriftId;
-
 
2046
      private final String _fieldName;
-
 
2047
 
-
 
2048
      _Fields(short thriftId, String fieldName) {
-
 
2049
        _thriftId = thriftId;
-
 
2050
        _fieldName = fieldName;
-
 
2051
      }
-
 
2052
 
-
 
2053
      public short getThriftFieldId() {
-
 
2054
        return _thriftId;
-
 
2055
      }
-
 
2056
 
-
 
2057
      public String getFieldName() {
-
 
2058
        return _fieldName;
-
 
2059
      }
-
 
2060
    }
-
 
2061
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
2062
    }});
-
 
2063
 
-
 
2064
    static {
-
 
2065
      FieldMetaData.addStructMetaDataMap(addDeliveryEstimate_result.class, metaDataMap);
-
 
2066
    }
-
 
2067
 
-
 
2068
    public addDeliveryEstimate_result() {
-
 
2069
    }
-
 
2070
 
-
 
2071
    /**
-
 
2072
     * Performs a deep copy on <i>other</i>.
-
 
2073
     */
-
 
2074
    public addDeliveryEstimate_result(addDeliveryEstimate_result other) {
-
 
2075
    }
-
 
2076
 
-
 
2077
    public addDeliveryEstimate_result deepCopy() {
-
 
2078
      return new addDeliveryEstimate_result(this);
-
 
2079
    }
-
 
2080
 
-
 
2081
    @Deprecated
-
 
2082
    public addDeliveryEstimate_result clone() {
-
 
2083
      return new addDeliveryEstimate_result(this);
-
 
2084
    }
-
 
2085
 
-
 
2086
    public void setFieldValue(_Fields field, Object value) {
-
 
2087
      switch (field) {
-
 
2088
      }
-
 
2089
    }
-
 
2090
 
-
 
2091
    public void setFieldValue(int fieldID, Object value) {
-
 
2092
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
2093
    }
-
 
2094
 
-
 
2095
    public Object getFieldValue(_Fields field) {
-
 
2096
      switch (field) {
-
 
2097
      }
-
 
2098
      throw new IllegalStateException();
-
 
2099
    }
-
 
2100
 
-
 
2101
    public Object getFieldValue(int fieldId) {
-
 
2102
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
2103
    }
-
 
2104
 
-
 
2105
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
2106
    public boolean isSet(_Fields field) {
-
 
2107
      switch (field) {
-
 
2108
      }
-
 
2109
      throw new IllegalStateException();
-
 
2110
    }
-
 
2111
 
-
 
2112
    public boolean isSet(int fieldID) {
-
 
2113
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
2114
    }
-
 
2115
 
-
 
2116
    @Override
-
 
2117
    public boolean equals(Object that) {
-
 
2118
      if (that == null)
-
 
2119
        return false;
-
 
2120
      if (that instanceof addDeliveryEstimate_result)
-
 
2121
        return this.equals((addDeliveryEstimate_result)that);
-
 
2122
      return false;
-
 
2123
    }
-
 
2124
 
-
 
2125
    public boolean equals(addDeliveryEstimate_result that) {
-
 
2126
      if (that == null)
-
 
2127
        return false;
-
 
2128
 
-
 
2129
      return true;
-
 
2130
    }
-
 
2131
 
-
 
2132
    @Override
-
 
2133
    public int hashCode() {
-
 
2134
      return 0;
-
 
2135
    }
-
 
2136
 
-
 
2137
    public int compareTo(addDeliveryEstimate_result other) {
-
 
2138
      if (!getClass().equals(other.getClass())) {
-
 
2139
        return getClass().getName().compareTo(other.getClass().getName());
-
 
2140
      }
-
 
2141
 
-
 
2142
      int lastComparison = 0;
-
 
2143
      addDeliveryEstimate_result typedOther = (addDeliveryEstimate_result)other;
-
 
2144
 
-
 
2145
      return 0;
-
 
2146
    }
-
 
2147
 
-
 
2148
    public void read(TProtocol iprot) throws TException {
-
 
2149
      TField field;
-
 
2150
      iprot.readStructBegin();
-
 
2151
      while (true)
-
 
2152
      {
-
 
2153
        field = iprot.readFieldBegin();
-
 
2154
        if (field.type == TType.STOP) { 
-
 
2155
          break;
-
 
2156
        }
-
 
2157
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
2158
        if (fieldId == null) {
-
 
2159
          TProtocolUtil.skip(iprot, field.type);
-
 
2160
        } else {
-
 
2161
          switch (fieldId) {
-
 
2162
          }
-
 
2163
          iprot.readFieldEnd();
-
 
2164
        }
-
 
2165
      }
-
 
2166
      iprot.readStructEnd();
-
 
2167
      validate();
-
 
2168
    }
-
 
2169
 
-
 
2170
    public void write(TProtocol oprot) throws TException {
-
 
2171
      oprot.writeStructBegin(STRUCT_DESC);
-
 
2172
 
-
 
2173
      oprot.writeFieldStop();
-
 
2174
      oprot.writeStructEnd();
-
 
2175
    }
-
 
2176
 
-
 
2177
    @Override
-
 
2178
    public String toString() {
-
 
2179
      StringBuilder sb = new StringBuilder("addDeliveryEstimate_result(");
-
 
2180
      boolean first = true;
-
 
2181
 
-
 
2182
      sb.append(")");
-
 
2183
      return sb.toString();
-
 
2184
    }
-
 
2185
 
-
 
2186
    public void validate() throws TException {
-
 
2187
      // check for required fields
-
 
2188
    }
-
 
2189
 
-
 
2190
  }
-
 
2191
 
558
  public static class addEmptyAWBs_args implements TBase<addEmptyAWBs_args._Fields>, java.io.Serializable, Cloneable, Comparable<addEmptyAWBs_args>   {
2192
  public static class addEmptyAWBs_args implements TBase<addEmptyAWBs_args._Fields>, java.io.Serializable, Cloneable, Comparable<addEmptyAWBs_args>   {
559
    private static final TStruct STRUCT_DESC = new TStruct("addEmptyAWBs_args");
2193
    private static final TStruct STRUCT_DESC = new TStruct("addEmptyAWBs_args");
560
 
2194
 
561
    private static final TField NUMBERS_FIELD_DESC = new TField("numbers", TType.LIST, (short)1);
2195
    private static final TField NUMBERS_FIELD_DESC = new TField("numbers", TType.LIST, (short)1);
562
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)2);
2196
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("provider_id", TType.I64, (short)2);