Subversion Repositories SmartDukaan

Rev

Rev 6730 | Rev 7092 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6730 Rev 6736
Line 41... Line 41...
41
 
41
 
42
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
42
    public void generateCouponsForPromotion(long promotionId, String couponCode) throws PromotionException, org.apache.thrift.TException;
43
 
43
 
44
    public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, org.apache.thrift.TException;
44
    public Cart applyCoupon(String couponCode, long cartId) throws PromotionException, org.apache.thrift.TException;
45
 
45
 
-
 
46
    public Map<Long,Double> getEmiDiscount(long cartId) throws PromotionException, org.apache.thrift.TException;
-
 
47
 
46
    public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException;
48
    public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException;
47
 
49
 
48
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException;
50
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException;
49
 
51
 
50
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
52
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
Line 111... Line 113...
111
 
113
 
112
    public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
114
    public void generateCouponsForPromotion(long promotionId, String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.generateCouponsForPromotion_call> resultHandler) throws org.apache.thrift.TException;
113
 
115
 
114
    public void applyCoupon(String couponCode, long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyCoupon_call> resultHandler) throws org.apache.thrift.TException;
116
    public void applyCoupon(String couponCode, long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyCoupon_call> resultHandler) throws org.apache.thrift.TException;
115
 
117
 
-
 
118
    public void getEmiDiscount(long cartId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getEmiDiscount_call> resultHandler) throws org.apache.thrift.TException;
-
 
119
 
116
    public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException;
120
    public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException;
117
 
121
 
118
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
122
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
119
 
123
 
120
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
124
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
Line 367... Line 371...
367
        throw result.pex;
371
        throw result.pex;
368
      }
372
      }
369
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
373
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "applyCoupon failed: unknown result");
370
    }
374
    }
371
 
375
 
-
 
376
    public Map<Long,Double> getEmiDiscount(long cartId) throws PromotionException, org.apache.thrift.TException
-
 
377
    {
-
 
378
      send_getEmiDiscount(cartId);
-
 
379
      return recv_getEmiDiscount();
-
 
380
    }
-
 
381
 
-
 
382
    public void send_getEmiDiscount(long cartId) throws org.apache.thrift.TException
-
 
383
    {
-
 
384
      getEmiDiscount_args args = new getEmiDiscount_args();
-
 
385
      args.setCartId(cartId);
-
 
386
      sendBase("getEmiDiscount", args);
-
 
387
    }
-
 
388
 
-
 
389
    public Map<Long,Double> recv_getEmiDiscount() throws PromotionException, org.apache.thrift.TException
-
 
390
    {
-
 
391
      getEmiDiscount_result result = new getEmiDiscount_result();
-
 
392
      receiveBase(result, "getEmiDiscount");
-
 
393
      if (result.isSetSuccess()) {
-
 
394
        return result.success;
-
 
395
      }
-
 
396
      if (result.pex != null) {
-
 
397
        throw result.pex;
-
 
398
      }
-
 
399
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getEmiDiscount failed: unknown result");
-
 
400
    }
-
 
401
 
372
    public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException
402
    public Map<Long,String> applyRechargeCoupon(String couponCode, long totalAmount, long userId) throws PromotionException, org.apache.thrift.TException
373
    {
403
    {
374
      send_applyRechargeCoupon(couponCode, totalAmount, userId);
404
      send_applyRechargeCoupon(couponCode, totalAmount, userId);
375
      return recv_applyRechargeCoupon();
405
      return recv_applyRechargeCoupon();
376
    }
406
    }
Line 1005... Line 1035...
1005
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1035
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1006
        return (new Client(prot)).recv_applyCoupon();
1036
        return (new Client(prot)).recv_applyCoupon();
1007
      }
1037
      }
1008
    }
1038
    }
1009
 
1039
 
-
 
1040
    public void getEmiDiscount(long cartId, org.apache.thrift.async.AsyncMethodCallback<getEmiDiscount_call> resultHandler) throws org.apache.thrift.TException {
-
 
1041
      checkReady();
-
 
1042
      getEmiDiscount_call method_call = new getEmiDiscount_call(cartId, resultHandler, this, ___protocolFactory, ___transport);
-
 
1043
      this.___currentMethod = method_call;
-
 
1044
      ___manager.call(method_call);
-
 
1045
    }
-
 
1046
 
-
 
1047
    public static class getEmiDiscount_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1048
      private long cartId;
-
 
1049
      public getEmiDiscount_call(long cartId, org.apache.thrift.async.AsyncMethodCallback<getEmiDiscount_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
-
 
1050
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1051
        this.cartId = cartId;
-
 
1052
      }
-
 
1053
 
-
 
1054
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1055
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getEmiDiscount", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1056
        getEmiDiscount_args args = new getEmiDiscount_args();
-
 
1057
        args.setCartId(cartId);
-
 
1058
        args.write(prot);
-
 
1059
        prot.writeMessageEnd();
-
 
1060
      }
-
 
1061
 
-
 
1062
      public Map<Long,Double> getResult() throws PromotionException, org.apache.thrift.TException {
-
 
1063
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1064
          throw new IllegalStateException("Method call not finished!");
-
 
1065
        }
-
 
1066
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1067
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1068
        return (new Client(prot)).recv_getEmiDiscount();
-
 
1069
      }
-
 
1070
    }
-
 
1071
 
1010
    public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException {
1072
    public void applyRechargeCoupon(String couponCode, long totalAmount, long userId, org.apache.thrift.async.AsyncMethodCallback<applyRechargeCoupon_call> resultHandler) throws org.apache.thrift.TException {
1011
      checkReady();
1073
      checkReady();
1012
      applyRechargeCoupon_call method_call = new applyRechargeCoupon_call(couponCode, totalAmount, userId, resultHandler, this, ___protocolFactory, ___transport);
1074
      applyRechargeCoupon_call method_call = new applyRechargeCoupon_call(couponCode, totalAmount, userId, resultHandler, this, ___protocolFactory, ___transport);
1013
      this.___currentMethod = method_call;
1075
      this.___currentMethod = method_call;
1014
      ___manager.call(method_call);
1076
      ___manager.call(method_call);
Line 1510... Line 1572...
1510
      processMap.put("isCodApplicable", new isCodApplicable());
1572
      processMap.put("isCodApplicable", new isCodApplicable());
1511
      processMap.put("getAllPromotions", new getAllPromotions());
1573
      processMap.put("getAllPromotions", new getAllPromotions());
1512
      processMap.put("getPromotionById", new getPromotionById());
1574
      processMap.put("getPromotionById", new getPromotionById());
1513
      processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
1575
      processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
1514
      processMap.put("applyCoupon", new applyCoupon());
1576
      processMap.put("applyCoupon", new applyCoupon());
-
 
1577
      processMap.put("getEmiDiscount", new getEmiDiscount());
1515
      processMap.put("applyRechargeCoupon", new applyRechargeCoupon());
1578
      processMap.put("applyRechargeCoupon", new applyRechargeCoupon());
1516
      processMap.put("trackCouponUsage", new trackCouponUsage());
1579
      processMap.put("trackCouponUsage", new trackCouponUsage());
1517
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
1580
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
1518
      processMap.put("getActiveCodes", new getActiveCodes());
1581
      processMap.put("getActiveCodes", new getActiveCodes());
1519
      processMap.put("deleteCoupon", new deleteCoupon());
1582
      processMap.put("deleteCoupon", new deleteCoupon());
Line 1689... Line 1752...
1689
        }
1752
        }
1690
        return result;
1753
        return result;
1691
      }
1754
      }
1692
    }
1755
    }
1693
 
1756
 
-
 
1757
    private static class getEmiDiscount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getEmiDiscount_args> {
-
 
1758
      public getEmiDiscount() {
-
 
1759
        super("getEmiDiscount");
-
 
1760
      }
-
 
1761
 
-
 
1762
      protected getEmiDiscount_args getEmptyArgsInstance() {
-
 
1763
        return new getEmiDiscount_args();
-
 
1764
      }
-
 
1765
 
-
 
1766
      protected getEmiDiscount_result getResult(I iface, getEmiDiscount_args args) throws org.apache.thrift.TException {
-
 
1767
        getEmiDiscount_result result = new getEmiDiscount_result();
-
 
1768
        try {
-
 
1769
          result.success = iface.getEmiDiscount(args.cartId);
-
 
1770
        } catch (PromotionException pex) {
-
 
1771
          result.pex = pex;
-
 
1772
        }
-
 
1773
        return result;
-
 
1774
      }
-
 
1775
    }
-
 
1776
 
1694
    private static class applyRechargeCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyRechargeCoupon_args> {
1777
    private static class applyRechargeCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, applyRechargeCoupon_args> {
1695
      public applyRechargeCoupon() {
1778
      public applyRechargeCoupon() {
1696
        super("applyRechargeCoupon");
1779
        super("applyRechargeCoupon");
1697
      }
1780
      }
1698
 
1781
 
Line 7562... Line 7645...
7562
      }
7645
      }
7563
    }
7646
    }
7564
 
7647
 
7565
  }
7648
  }
7566
 
7649
 
-
 
7650
  public static class getEmiDiscount_args implements org.apache.thrift.TBase<getEmiDiscount_args, getEmiDiscount_args._Fields>, java.io.Serializable, Cloneable   {
-
 
7651
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEmiDiscount_args");
-
 
7652
 
-
 
7653
    private static final org.apache.thrift.protocol.TField CART_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("cartId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
7654
 
-
 
7655
    private long cartId; // required
-
 
7656
 
-
 
7657
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7658
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
7659
      CART_ID((short)1, "cartId");
-
 
7660
 
-
 
7661
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7662
 
-
 
7663
      static {
-
 
7664
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7665
          byName.put(field.getFieldName(), field);
-
 
7666
        }
-
 
7667
      }
-
 
7668
 
-
 
7669
      /**
-
 
7670
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7671
       */
-
 
7672
      public static _Fields findByThriftId(int fieldId) {
-
 
7673
        switch(fieldId) {
-
 
7674
          case 1: // CART_ID
-
 
7675
            return CART_ID;
-
 
7676
          default:
-
 
7677
            return null;
-
 
7678
        }
-
 
7679
      }
-
 
7680
 
-
 
7681
      /**
-
 
7682
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7683
       * if it is not found.
-
 
7684
       */
-
 
7685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7686
        _Fields fields = findByThriftId(fieldId);
-
 
7687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7688
        return fields;
-
 
7689
      }
-
 
7690
 
-
 
7691
      /**
-
 
7692
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7693
       */
-
 
7694
      public static _Fields findByName(String name) {
-
 
7695
        return byName.get(name);
-
 
7696
      }
-
 
7697
 
-
 
7698
      private final short _thriftId;
-
 
7699
      private final String _fieldName;
-
 
7700
 
-
 
7701
      _Fields(short thriftId, String fieldName) {
-
 
7702
        _thriftId = thriftId;
-
 
7703
        _fieldName = fieldName;
-
 
7704
      }
-
 
7705
 
-
 
7706
      public short getThriftFieldId() {
-
 
7707
        return _thriftId;
-
 
7708
      }
-
 
7709
 
-
 
7710
      public String getFieldName() {
-
 
7711
        return _fieldName;
-
 
7712
      }
-
 
7713
    }
-
 
7714
 
-
 
7715
    // isset id assignments
-
 
7716
    private static final int __CARTID_ISSET_ID = 0;
-
 
7717
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
7718
 
-
 
7719
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
7720
    static {
-
 
7721
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
7722
      tmpMap.put(_Fields.CART_ID, new org.apache.thrift.meta_data.FieldMetaData("cartId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
7723
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
7724
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
7725
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getEmiDiscount_args.class, metaDataMap);
-
 
7726
    }
-
 
7727
 
-
 
7728
    public getEmiDiscount_args() {
-
 
7729
    }
-
 
7730
 
-
 
7731
    public getEmiDiscount_args(
-
 
7732
      long cartId)
-
 
7733
    {
-
 
7734
      this();
-
 
7735
      this.cartId = cartId;
-
 
7736
      setCartIdIsSet(true);
-
 
7737
    }
-
 
7738
 
-
 
7739
    /**
-
 
7740
     * Performs a deep copy on <i>other</i>.
-
 
7741
     */
-
 
7742
    public getEmiDiscount_args(getEmiDiscount_args other) {
-
 
7743
      __isset_bit_vector.clear();
-
 
7744
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
7745
      this.cartId = other.cartId;
-
 
7746
    }
-
 
7747
 
-
 
7748
    public getEmiDiscount_args deepCopy() {
-
 
7749
      return new getEmiDiscount_args(this);
-
 
7750
    }
-
 
7751
 
-
 
7752
    @Override
-
 
7753
    public void clear() {
-
 
7754
      setCartIdIsSet(false);
-
 
7755
      this.cartId = 0;
-
 
7756
    }
-
 
7757
 
-
 
7758
    public long getCartId() {
-
 
7759
      return this.cartId;
-
 
7760
    }
-
 
7761
 
-
 
7762
    public void setCartId(long cartId) {
-
 
7763
      this.cartId = cartId;
-
 
7764
      setCartIdIsSet(true);
-
 
7765
    }
-
 
7766
 
-
 
7767
    public void unsetCartId() {
-
 
7768
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
-
 
7769
    }
-
 
7770
 
-
 
7771
    /** Returns true if field cartId is set (has been assigned a value) and false otherwise */
-
 
7772
    public boolean isSetCartId() {
-
 
7773
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
-
 
7774
    }
-
 
7775
 
-
 
7776
    public void setCartIdIsSet(boolean value) {
-
 
7777
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
-
 
7778
    }
-
 
7779
 
-
 
7780
    public void setFieldValue(_Fields field, Object value) {
-
 
7781
      switch (field) {
-
 
7782
      case CART_ID:
-
 
7783
        if (value == null) {
-
 
7784
          unsetCartId();
-
 
7785
        } else {
-
 
7786
          setCartId((Long)value);
-
 
7787
        }
-
 
7788
        break;
-
 
7789
 
-
 
7790
      }
-
 
7791
    }
-
 
7792
 
-
 
7793
    public Object getFieldValue(_Fields field) {
-
 
7794
      switch (field) {
-
 
7795
      case CART_ID:
-
 
7796
        return Long.valueOf(getCartId());
-
 
7797
 
-
 
7798
      }
-
 
7799
      throw new IllegalStateException();
-
 
7800
    }
-
 
7801
 
-
 
7802
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
7803
    public boolean isSet(_Fields field) {
-
 
7804
      if (field == null) {
-
 
7805
        throw new IllegalArgumentException();
-
 
7806
      }
-
 
7807
 
-
 
7808
      switch (field) {
-
 
7809
      case CART_ID:
-
 
7810
        return isSetCartId();
-
 
7811
      }
-
 
7812
      throw new IllegalStateException();
-
 
7813
    }
-
 
7814
 
-
 
7815
    @Override
-
 
7816
    public boolean equals(Object that) {
-
 
7817
      if (that == null)
-
 
7818
        return false;
-
 
7819
      if (that instanceof getEmiDiscount_args)
-
 
7820
        return this.equals((getEmiDiscount_args)that);
-
 
7821
      return false;
-
 
7822
    }
-
 
7823
 
-
 
7824
    public boolean equals(getEmiDiscount_args that) {
-
 
7825
      if (that == null)
-
 
7826
        return false;
-
 
7827
 
-
 
7828
      boolean this_present_cartId = true;
-
 
7829
      boolean that_present_cartId = true;
-
 
7830
      if (this_present_cartId || that_present_cartId) {
-
 
7831
        if (!(this_present_cartId && that_present_cartId))
-
 
7832
          return false;
-
 
7833
        if (this.cartId != that.cartId)
-
 
7834
          return false;
-
 
7835
      }
-
 
7836
 
-
 
7837
      return true;
-
 
7838
    }
-
 
7839
 
-
 
7840
    @Override
-
 
7841
    public int hashCode() {
-
 
7842
      return 0;
-
 
7843
    }
-
 
7844
 
-
 
7845
    public int compareTo(getEmiDiscount_args other) {
-
 
7846
      if (!getClass().equals(other.getClass())) {
-
 
7847
        return getClass().getName().compareTo(other.getClass().getName());
-
 
7848
      }
-
 
7849
 
-
 
7850
      int lastComparison = 0;
-
 
7851
      getEmiDiscount_args typedOther = (getEmiDiscount_args)other;
-
 
7852
 
-
 
7853
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(typedOther.isSetCartId());
-
 
7854
      if (lastComparison != 0) {
-
 
7855
        return lastComparison;
-
 
7856
      }
-
 
7857
      if (isSetCartId()) {
-
 
7858
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cartId, typedOther.cartId);
-
 
7859
        if (lastComparison != 0) {
-
 
7860
          return lastComparison;
-
 
7861
        }
-
 
7862
      }
-
 
7863
      return 0;
-
 
7864
    }
-
 
7865
 
-
 
7866
    public _Fields fieldForId(int fieldId) {
-
 
7867
      return _Fields.findByThriftId(fieldId);
-
 
7868
    }
-
 
7869
 
-
 
7870
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
7871
      org.apache.thrift.protocol.TField field;
-
 
7872
      iprot.readStructBegin();
-
 
7873
      while (true)
-
 
7874
      {
-
 
7875
        field = iprot.readFieldBegin();
-
 
7876
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
7877
          break;
-
 
7878
        }
-
 
7879
        switch (field.id) {
-
 
7880
          case 1: // CART_ID
-
 
7881
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
7882
              this.cartId = iprot.readI64();
-
 
7883
              setCartIdIsSet(true);
-
 
7884
            } else { 
-
 
7885
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
7886
            }
-
 
7887
            break;
-
 
7888
          default:
-
 
7889
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
7890
        }
-
 
7891
        iprot.readFieldEnd();
-
 
7892
      }
-
 
7893
      iprot.readStructEnd();
-
 
7894
      validate();
-
 
7895
    }
-
 
7896
 
-
 
7897
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
7898
      validate();
-
 
7899
 
-
 
7900
      oprot.writeStructBegin(STRUCT_DESC);
-
 
7901
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
-
 
7902
      oprot.writeI64(this.cartId);
-
 
7903
      oprot.writeFieldEnd();
-
 
7904
      oprot.writeFieldStop();
-
 
7905
      oprot.writeStructEnd();
-
 
7906
    }
-
 
7907
 
-
 
7908
    @Override
-
 
7909
    public String toString() {
-
 
7910
      StringBuilder sb = new StringBuilder("getEmiDiscount_args(");
-
 
7911
      boolean first = true;
-
 
7912
 
-
 
7913
      sb.append("cartId:");
-
 
7914
      sb.append(this.cartId);
-
 
7915
      first = false;
-
 
7916
      sb.append(")");
-
 
7917
      return sb.toString();
-
 
7918
    }
-
 
7919
 
-
 
7920
    public void validate() throws org.apache.thrift.TException {
-
 
7921
      // check for required fields
-
 
7922
    }
-
 
7923
 
-
 
7924
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
7925
      try {
-
 
7926
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
7927
      } catch (org.apache.thrift.TException te) {
-
 
7928
        throw new java.io.IOException(te);
-
 
7929
      }
-
 
7930
    }
-
 
7931
 
-
 
7932
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
7933
      try {
-
 
7934
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
7935
        __isset_bit_vector = new BitSet(1);
-
 
7936
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
7937
      } catch (org.apache.thrift.TException te) {
-
 
7938
        throw new java.io.IOException(te);
-
 
7939
      }
-
 
7940
    }
-
 
7941
 
-
 
7942
  }
-
 
7943
 
-
 
7944
  public static class getEmiDiscount_result implements org.apache.thrift.TBase<getEmiDiscount_result, getEmiDiscount_result._Fields>, java.io.Serializable, Cloneable   {
-
 
7945
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getEmiDiscount_result");
-
 
7946
 
-
 
7947
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);
-
 
7948
    private static final org.apache.thrift.protocol.TField PEX_FIELD_DESC = new org.apache.thrift.protocol.TField("pex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
-
 
7949
 
-
 
7950
    private Map<Long,Double> success; // required
-
 
7951
    private PromotionException pex; // required
-
 
7952
 
-
 
7953
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
7954
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
7955
      SUCCESS((short)0, "success"),
-
 
7956
      PEX((short)1, "pex");
-
 
7957
 
-
 
7958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
7959
 
-
 
7960
      static {
-
 
7961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
7962
          byName.put(field.getFieldName(), field);
-
 
7963
        }
-
 
7964
      }
-
 
7965
 
-
 
7966
      /**
-
 
7967
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
7968
       */
-
 
7969
      public static _Fields findByThriftId(int fieldId) {
-
 
7970
        switch(fieldId) {
-
 
7971
          case 0: // SUCCESS
-
 
7972
            return SUCCESS;
-
 
7973
          case 1: // PEX
-
 
7974
            return PEX;
-
 
7975
          default:
-
 
7976
            return null;
-
 
7977
        }
-
 
7978
      }
-
 
7979
 
-
 
7980
      /**
-
 
7981
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
7982
       * if it is not found.
-
 
7983
       */
-
 
7984
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
7985
        _Fields fields = findByThriftId(fieldId);
-
 
7986
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
7987
        return fields;
-
 
7988
      }
-
 
7989
 
-
 
7990
      /**
-
 
7991
       * Find the _Fields constant that matches name, or null if its not found.
-
 
7992
       */
-
 
7993
      public static _Fields findByName(String name) {
-
 
7994
        return byName.get(name);
-
 
7995
      }
-
 
7996
 
-
 
7997
      private final short _thriftId;
-
 
7998
      private final String _fieldName;
-
 
7999
 
-
 
8000
      _Fields(short thriftId, String fieldName) {
-
 
8001
        _thriftId = thriftId;
-
 
8002
        _fieldName = fieldName;
-
 
8003
      }
-
 
8004
 
-
 
8005
      public short getThriftFieldId() {
-
 
8006
        return _thriftId;
-
 
8007
      }
-
 
8008
 
-
 
8009
      public String getFieldName() {
-
 
8010
        return _fieldName;
-
 
8011
      }
-
 
8012
    }
-
 
8013
 
-
 
8014
    // isset id assignments
-
 
8015
 
-
 
8016
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
8017
    static {
-
 
8018
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
8019
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
8020
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
-
 
8021
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
-
 
8022
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
-
 
8023
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
8024
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
8025
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
8026
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getEmiDiscount_result.class, metaDataMap);
-
 
8027
    }
-
 
8028
 
-
 
8029
    public getEmiDiscount_result() {
-
 
8030
    }
-
 
8031
 
-
 
8032
    public getEmiDiscount_result(
-
 
8033
      Map<Long,Double> success,
-
 
8034
      PromotionException pex)
-
 
8035
    {
-
 
8036
      this();
-
 
8037
      this.success = success;
-
 
8038
      this.pex = pex;
-
 
8039
    }
-
 
8040
 
-
 
8041
    /**
-
 
8042
     * Performs a deep copy on <i>other</i>.
-
 
8043
     */
-
 
8044
    public getEmiDiscount_result(getEmiDiscount_result other) {
-
 
8045
      if (other.isSetSuccess()) {
-
 
8046
        Map<Long,Double> __this__success = new HashMap<Long,Double>();
-
 
8047
        for (Map.Entry<Long, Double> other_element : other.success.entrySet()) {
-
 
8048
 
-
 
8049
          Long other_element_key = other_element.getKey();
-
 
8050
          Double other_element_value = other_element.getValue();
-
 
8051
 
-
 
8052
          Long __this__success_copy_key = other_element_key;
-
 
8053
 
-
 
8054
          Double __this__success_copy_value = other_element_value;
-
 
8055
 
-
 
8056
          __this__success.put(__this__success_copy_key, __this__success_copy_value);
-
 
8057
        }
-
 
8058
        this.success = __this__success;
-
 
8059
      }
-
 
8060
      if (other.isSetPex()) {
-
 
8061
        this.pex = new PromotionException(other.pex);
-
 
8062
      }
-
 
8063
    }
-
 
8064
 
-
 
8065
    public getEmiDiscount_result deepCopy() {
-
 
8066
      return new getEmiDiscount_result(this);
-
 
8067
    }
-
 
8068
 
-
 
8069
    @Override
-
 
8070
    public void clear() {
-
 
8071
      this.success = null;
-
 
8072
      this.pex = null;
-
 
8073
    }
-
 
8074
 
-
 
8075
    public int getSuccessSize() {
-
 
8076
      return (this.success == null) ? 0 : this.success.size();
-
 
8077
    }
-
 
8078
 
-
 
8079
    public void putToSuccess(long key, double val) {
-
 
8080
      if (this.success == null) {
-
 
8081
        this.success = new HashMap<Long,Double>();
-
 
8082
      }
-
 
8083
      this.success.put(key, val);
-
 
8084
    }
-
 
8085
 
-
 
8086
    public Map<Long,Double> getSuccess() {
-
 
8087
      return this.success;
-
 
8088
    }
-
 
8089
 
-
 
8090
    public void setSuccess(Map<Long,Double> success) {
-
 
8091
      this.success = success;
-
 
8092
    }
-
 
8093
 
-
 
8094
    public void unsetSuccess() {
-
 
8095
      this.success = null;
-
 
8096
    }
-
 
8097
 
-
 
8098
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
8099
    public boolean isSetSuccess() {
-
 
8100
      return this.success != null;
-
 
8101
    }
-
 
8102
 
-
 
8103
    public void setSuccessIsSet(boolean value) {
-
 
8104
      if (!value) {
-
 
8105
        this.success = null;
-
 
8106
      }
-
 
8107
    }
-
 
8108
 
-
 
8109
    public PromotionException getPex() {
-
 
8110
      return this.pex;
-
 
8111
    }
-
 
8112
 
-
 
8113
    public void setPex(PromotionException pex) {
-
 
8114
      this.pex = pex;
-
 
8115
    }
-
 
8116
 
-
 
8117
    public void unsetPex() {
-
 
8118
      this.pex = null;
-
 
8119
    }
-
 
8120
 
-
 
8121
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
-
 
8122
    public boolean isSetPex() {
-
 
8123
      return this.pex != null;
-
 
8124
    }
-
 
8125
 
-
 
8126
    public void setPexIsSet(boolean value) {
-
 
8127
      if (!value) {
-
 
8128
        this.pex = null;
-
 
8129
      }
-
 
8130
    }
-
 
8131
 
-
 
8132
    public void setFieldValue(_Fields field, Object value) {
-
 
8133
      switch (field) {
-
 
8134
      case SUCCESS:
-
 
8135
        if (value == null) {
-
 
8136
          unsetSuccess();
-
 
8137
        } else {
-
 
8138
          setSuccess((Map<Long,Double>)value);
-
 
8139
        }
-
 
8140
        break;
-
 
8141
 
-
 
8142
      case PEX:
-
 
8143
        if (value == null) {
-
 
8144
          unsetPex();
-
 
8145
        } else {
-
 
8146
          setPex((PromotionException)value);
-
 
8147
        }
-
 
8148
        break;
-
 
8149
 
-
 
8150
      }
-
 
8151
    }
-
 
8152
 
-
 
8153
    public Object getFieldValue(_Fields field) {
-
 
8154
      switch (field) {
-
 
8155
      case SUCCESS:
-
 
8156
        return getSuccess();
-
 
8157
 
-
 
8158
      case PEX:
-
 
8159
        return getPex();
-
 
8160
 
-
 
8161
      }
-
 
8162
      throw new IllegalStateException();
-
 
8163
    }
-
 
8164
 
-
 
8165
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
8166
    public boolean isSet(_Fields field) {
-
 
8167
      if (field == null) {
-
 
8168
        throw new IllegalArgumentException();
-
 
8169
      }
-
 
8170
 
-
 
8171
      switch (field) {
-
 
8172
      case SUCCESS:
-
 
8173
        return isSetSuccess();
-
 
8174
      case PEX:
-
 
8175
        return isSetPex();
-
 
8176
      }
-
 
8177
      throw new IllegalStateException();
-
 
8178
    }
-
 
8179
 
-
 
8180
    @Override
-
 
8181
    public boolean equals(Object that) {
-
 
8182
      if (that == null)
-
 
8183
        return false;
-
 
8184
      if (that instanceof getEmiDiscount_result)
-
 
8185
        return this.equals((getEmiDiscount_result)that);
-
 
8186
      return false;
-
 
8187
    }
-
 
8188
 
-
 
8189
    public boolean equals(getEmiDiscount_result that) {
-
 
8190
      if (that == null)
-
 
8191
        return false;
-
 
8192
 
-
 
8193
      boolean this_present_success = true && this.isSetSuccess();
-
 
8194
      boolean that_present_success = true && that.isSetSuccess();
-
 
8195
      if (this_present_success || that_present_success) {
-
 
8196
        if (!(this_present_success && that_present_success))
-
 
8197
          return false;
-
 
8198
        if (!this.success.equals(that.success))
-
 
8199
          return false;
-
 
8200
      }
-
 
8201
 
-
 
8202
      boolean this_present_pex = true && this.isSetPex();
-
 
8203
      boolean that_present_pex = true && that.isSetPex();
-
 
8204
      if (this_present_pex || that_present_pex) {
-
 
8205
        if (!(this_present_pex && that_present_pex))
-
 
8206
          return false;
-
 
8207
        if (!this.pex.equals(that.pex))
-
 
8208
          return false;
-
 
8209
      }
-
 
8210
 
-
 
8211
      return true;
-
 
8212
    }
-
 
8213
 
-
 
8214
    @Override
-
 
8215
    public int hashCode() {
-
 
8216
      return 0;
-
 
8217
    }
-
 
8218
 
-
 
8219
    public int compareTo(getEmiDiscount_result other) {
-
 
8220
      if (!getClass().equals(other.getClass())) {
-
 
8221
        return getClass().getName().compareTo(other.getClass().getName());
-
 
8222
      }
-
 
8223
 
-
 
8224
      int lastComparison = 0;
-
 
8225
      getEmiDiscount_result typedOther = (getEmiDiscount_result)other;
-
 
8226
 
-
 
8227
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
8228
      if (lastComparison != 0) {
-
 
8229
        return lastComparison;
-
 
8230
      }
-
 
8231
      if (isSetSuccess()) {
-
 
8232
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
8233
        if (lastComparison != 0) {
-
 
8234
          return lastComparison;
-
 
8235
        }
-
 
8236
      }
-
 
8237
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
-
 
8238
      if (lastComparison != 0) {
-
 
8239
        return lastComparison;
-
 
8240
      }
-
 
8241
      if (isSetPex()) {
-
 
8242
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
-
 
8243
        if (lastComparison != 0) {
-
 
8244
          return lastComparison;
-
 
8245
        }
-
 
8246
      }
-
 
8247
      return 0;
-
 
8248
    }
-
 
8249
 
-
 
8250
    public _Fields fieldForId(int fieldId) {
-
 
8251
      return _Fields.findByThriftId(fieldId);
-
 
8252
    }
-
 
8253
 
-
 
8254
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
8255
      org.apache.thrift.protocol.TField field;
-
 
8256
      iprot.readStructBegin();
-
 
8257
      while (true)
-
 
8258
      {
-
 
8259
        field = iprot.readFieldBegin();
-
 
8260
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
8261
          break;
-
 
8262
        }
-
 
8263
        switch (field.id) {
-
 
8264
          case 0: // SUCCESS
-
 
8265
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
-
 
8266
              {
-
 
8267
                org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
-
 
8268
                this.success = new HashMap<Long,Double>(2*_map16.size);
-
 
8269
                for (int _i17 = 0; _i17 < _map16.size; ++_i17)
-
 
8270
                {
-
 
8271
                  long _key18; // required
-
 
8272
                  double _val19; // required
-
 
8273
                  _key18 = iprot.readI64();
-
 
8274
                  _val19 = iprot.readDouble();
-
 
8275
                  this.success.put(_key18, _val19);
-
 
8276
                }
-
 
8277
                iprot.readMapEnd();
-
 
8278
              }
-
 
8279
            } else { 
-
 
8280
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
8281
            }
-
 
8282
            break;
-
 
8283
          case 1: // PEX
-
 
8284
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
8285
              this.pex = new PromotionException();
-
 
8286
              this.pex.read(iprot);
-
 
8287
            } else { 
-
 
8288
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
8289
            }
-
 
8290
            break;
-
 
8291
          default:
-
 
8292
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
8293
        }
-
 
8294
        iprot.readFieldEnd();
-
 
8295
      }
-
 
8296
      iprot.readStructEnd();
-
 
8297
      validate();
-
 
8298
    }
-
 
8299
 
-
 
8300
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
8301
      oprot.writeStructBegin(STRUCT_DESC);
-
 
8302
 
-
 
8303
      if (this.isSetSuccess()) {
-
 
8304
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
8305
        {
-
 
8306
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
-
 
8307
          for (Map.Entry<Long, Double> _iter20 : this.success.entrySet())
-
 
8308
          {
-
 
8309
            oprot.writeI64(_iter20.getKey());
-
 
8310
            oprot.writeDouble(_iter20.getValue());
-
 
8311
          }
-
 
8312
          oprot.writeMapEnd();
-
 
8313
        }
-
 
8314
        oprot.writeFieldEnd();
-
 
8315
      } else if (this.isSetPex()) {
-
 
8316
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
8317
        this.pex.write(oprot);
-
 
8318
        oprot.writeFieldEnd();
-
 
8319
      }
-
 
8320
      oprot.writeFieldStop();
-
 
8321
      oprot.writeStructEnd();
-
 
8322
    }
-
 
8323
 
-
 
8324
    @Override
-
 
8325
    public String toString() {
-
 
8326
      StringBuilder sb = new StringBuilder("getEmiDiscount_result(");
-
 
8327
      boolean first = true;
-
 
8328
 
-
 
8329
      sb.append("success:");
-
 
8330
      if (this.success == null) {
-
 
8331
        sb.append("null");
-
 
8332
      } else {
-
 
8333
        sb.append(this.success);
-
 
8334
      }
-
 
8335
      first = false;
-
 
8336
      if (!first) sb.append(", ");
-
 
8337
      sb.append("pex:");
-
 
8338
      if (this.pex == null) {
-
 
8339
        sb.append("null");
-
 
8340
      } else {
-
 
8341
        sb.append(this.pex);
-
 
8342
      }
-
 
8343
      first = false;
-
 
8344
      sb.append(")");
-
 
8345
      return sb.toString();
-
 
8346
    }
-
 
8347
 
-
 
8348
    public void validate() throws org.apache.thrift.TException {
-
 
8349
      // check for required fields
-
 
8350
    }
-
 
8351
 
-
 
8352
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
8353
      try {
-
 
8354
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
8355
      } catch (org.apache.thrift.TException te) {
-
 
8356
        throw new java.io.IOException(te);
-
 
8357
      }
-
 
8358
    }
-
 
8359
 
-
 
8360
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
8361
      try {
-
 
8362
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
8363
      } catch (org.apache.thrift.TException te) {
-
 
8364
        throw new java.io.IOException(te);
-
 
8365
      }
-
 
8366
    }
-
 
8367
 
-
 
8368
  }
-
 
8369
 
7567
  public static class applyRechargeCoupon_args implements org.apache.thrift.TBase<applyRechargeCoupon_args, applyRechargeCoupon_args._Fields>, java.io.Serializable, Cloneable   {
8370
  public static class applyRechargeCoupon_args implements org.apache.thrift.TBase<applyRechargeCoupon_args, applyRechargeCoupon_args._Fields>, java.io.Serializable, Cloneable   {
7568
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyRechargeCoupon_args");
8371
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("applyRechargeCoupon_args");
7569
 
8372
 
7570
    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
8373
    private static final org.apache.thrift.protocol.TField COUPON_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("couponCode", org.apache.thrift.protocol.TType.STRING, (short)1);
7571
    private static final org.apache.thrift.protocol.TField TOTAL_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalAmount", org.apache.thrift.protocol.TType.I64, (short)2);
8374
    private static final org.apache.thrift.protocol.TField TOTAL_AMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("totalAmount", org.apache.thrift.protocol.TType.I64, (short)2);
Line 8350... Line 9153...
8350
        }
9153
        }
8351
        switch (field.id) {
9154
        switch (field.id) {
8352
          case 0: // SUCCESS
9155
          case 0: // SUCCESS
8353
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
9156
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
8354
              {
9157
              {
8355
                org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
9158
                org.apache.thrift.protocol.TMap _map21 = iprot.readMapBegin();
8356
                this.success = new HashMap<Long,String>(2*_map16.size);
9159
                this.success = new HashMap<Long,String>(2*_map21.size);
8357
                for (int _i17 = 0; _i17 < _map16.size; ++_i17)
9160
                for (int _i22 = 0; _i22 < _map21.size; ++_i22)
8358
                {
9161
                {
8359
                  long _key18; // required
9162
                  long _key23; // required
8360
                  String _val19; // required
9163
                  String _val24; // required
8361
                  _key18 = iprot.readI64();
9164
                  _key23 = iprot.readI64();
8362
                  _val19 = iprot.readString();
9165
                  _val24 = iprot.readString();
8363
                  this.success.put(_key18, _val19);
9166
                  this.success.put(_key23, _val24);
8364
                }
9167
                }
8365
                iprot.readMapEnd();
9168
                iprot.readMapEnd();
8366
              }
9169
              }
8367
            } else { 
9170
            } else { 
8368
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9171
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 8390... Line 9193...
8390
 
9193
 
8391
      if (this.isSetSuccess()) {
9194
      if (this.isSetSuccess()) {
8392
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9195
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8393
        {
9196
        {
8394
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, this.success.size()));
9197
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRING, this.success.size()));
8395
          for (Map.Entry<Long, String> _iter20 : this.success.entrySet())
9198
          for (Map.Entry<Long, String> _iter25 : this.success.entrySet())
8396
          {
9199
          {
8397
            oprot.writeI64(_iter20.getKey());
9200
            oprot.writeI64(_iter25.getKey());
8398
            oprot.writeString(_iter20.getValue());
9201
            oprot.writeString(_iter25.getValue());
8399
          }
9202
          }
8400
          oprot.writeMapEnd();
9203
          oprot.writeMapEnd();
8401
        }
9204
        }
8402
        oprot.writeFieldEnd();
9205
        oprot.writeFieldEnd();
8403
      } else if (this.isSetPex()) {
9206
      } else if (this.isSetPex()) {
Line 10587... Line 11390...
10587
        }
11390
        }
10588
        switch (field.id) {
11391
        switch (field.id) {
10589
          case 0: // SUCCESS
11392
          case 0: // SUCCESS
10590
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11393
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10591
              {
11394
              {
10592
                org.apache.thrift.protocol.TList _list21 = iprot.readListBegin();
11395
                org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
10593
                this.success = new ArrayList<Coupon>(_list21.size);
11396
                this.success = new ArrayList<Coupon>(_list26.size);
10594
                for (int _i22 = 0; _i22 < _list21.size; ++_i22)
11397
                for (int _i27 = 0; _i27 < _list26.size; ++_i27)
10595
                {
11398
                {
10596
                  Coupon _elem23; // required
11399
                  Coupon _elem28; // required
10597
                  _elem23 = new Coupon();
11400
                  _elem28 = new Coupon();
10598
                  _elem23.read(iprot);
11401
                  _elem28.read(iprot);
10599
                  this.success.add(_elem23);
11402
                  this.success.add(_elem28);
10600
                }
11403
                }
10601
                iprot.readListEnd();
11404
                iprot.readListEnd();
10602
              }
11405
              }
10603
            } else { 
11406
            } else { 
10604
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11407
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 10626... Line 11429...
10626
 
11429
 
10627
      if (this.isSetSuccess()) {
11430
      if (this.isSetSuccess()) {
10628
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11431
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10629
        {
11432
        {
10630
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11433
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10631
          for (Coupon _iter24 : this.success)
11434
          for (Coupon _iter29 : this.success)
10632
          {
11435
          {
10633
            _iter24.write(oprot);
11436
            _iter29.write(oprot);
10634
          }
11437
          }
10635
          oprot.writeListEnd();
11438
          oprot.writeListEnd();
10636
        }
11439
        }
10637
        oprot.writeFieldEnd();
11440
        oprot.writeFieldEnd();
10638
      } else if (this.isSetPex()) {
11441
      } else if (this.isSetPex()) {
Line 11794... Line 12597...
11794
        }
12597
        }
11795
        switch (field.id) {
12598
        switch (field.id) {
11796
          case 0: // SUCCESS
12599
          case 0: // SUCCESS
11797
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12600
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11798
              {
12601
              {
11799
                org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
12602
                org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
11800
                this.success = new ArrayList<Coupon>(_list25.size);
12603
                this.success = new ArrayList<Coupon>(_list30.size);
11801
                for (int _i26 = 0; _i26 < _list25.size; ++_i26)
12604
                for (int _i31 = 0; _i31 < _list30.size; ++_i31)
11802
                {
12605
                {
11803
                  Coupon _elem27; // required
12606
                  Coupon _elem32; // required
11804
                  _elem27 = new Coupon();
12607
                  _elem32 = new Coupon();
11805
                  _elem27.read(iprot);
12608
                  _elem32.read(iprot);
11806
                  this.success.add(_elem27);
12609
                  this.success.add(_elem32);
11807
                }
12610
                }
11808
                iprot.readListEnd();
12611
                iprot.readListEnd();
11809
              }
12612
              }
11810
            } else { 
12613
            } else { 
11811
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12614
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 11833... Line 12636...
11833
 
12636
 
11834
      if (this.isSetSuccess()) {
12637
      if (this.isSetSuccess()) {
11835
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12638
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11836
        {
12639
        {
11837
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12640
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11838
          for (Coupon _iter28 : this.success)
12641
          for (Coupon _iter33 : this.success)
11839
          {
12642
          {
11840
            _iter28.write(oprot);
12643
            _iter33.write(oprot);
11841
          }
12644
          }
11842
          oprot.writeListEnd();
12645
          oprot.writeListEnd();
11843
        }
12646
        }
11844
        oprot.writeFieldEnd();
12647
        oprot.writeFieldEnd();
11845
      } else if (this.isSetPex()) {
12648
      } else if (this.isSetPex()) {
Line 14429... Line 15232...
14429
        }
15232
        }
14430
        switch (field.id) {
15233
        switch (field.id) {
14431
          case 1: // ITEM_IDS
15234
          case 1: // ITEM_IDS
14432
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15235
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14433
              {
15236
              {
14434
                org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
15237
                org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
14435
                this.itemIds = new ArrayList<Long>(_list29.size);
15238
                this.itemIds = new ArrayList<Long>(_list34.size);
14436
                for (int _i30 = 0; _i30 < _list29.size; ++_i30)
15239
                for (int _i35 = 0; _i35 < _list34.size; ++_i35)
14437
                {
15240
                {
14438
                  long _elem31; // required
15241
                  long _elem36; // required
14439
                  _elem31 = iprot.readI64();
15242
                  _elem36 = iprot.readI64();
14440
                  this.itemIds.add(_elem31);
15243
                  this.itemIds.add(_elem36);
14441
                }
15244
                }
14442
                iprot.readListEnd();
15245
                iprot.readListEnd();
14443
              }
15246
              }
14444
            } else { 
15247
            } else { 
14445
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15248
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 14460... Line 15263...
14460
      oprot.writeStructBegin(STRUCT_DESC);
15263
      oprot.writeStructBegin(STRUCT_DESC);
14461
      if (this.itemIds != null) {
15264
      if (this.itemIds != null) {
14462
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
15265
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
14463
        {
15266
        {
14464
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
15267
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
14465
          for (long _iter32 : this.itemIds)
15268
          for (long _iter37 : this.itemIds)
14466
          {
15269
          {
14467
            oprot.writeI64(_iter32);
15270
            oprot.writeI64(_iter37);
14468
          }
15271
          }
14469
          oprot.writeListEnd();
15272
          oprot.writeListEnd();
14470
        }
15273
        }
14471
        oprot.writeFieldEnd();
15274
        oprot.writeFieldEnd();
14472
      }
15275
      }
Line 14828... Line 15631...
14828
        }
15631
        }
14829
        switch (field.id) {
15632
        switch (field.id) {
14830
          case 0: // SUCCESS
15633
          case 0: // SUCCESS
14831
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15634
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14832
              {
15635
              {
14833
                org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
15636
                org.apache.thrift.protocol.TList _list38 = iprot.readListBegin();
14834
                this.success = new ArrayList<ItemCouponDiscount>(_list33.size);
15637
                this.success = new ArrayList<ItemCouponDiscount>(_list38.size);
14835
                for (int _i34 = 0; _i34 < _list33.size; ++_i34)
15638
                for (int _i39 = 0; _i39 < _list38.size; ++_i39)
14836
                {
15639
                {
14837
                  ItemCouponDiscount _elem35; // required
15640
                  ItemCouponDiscount _elem40; // required
14838
                  _elem35 = new ItemCouponDiscount();
15641
                  _elem40 = new ItemCouponDiscount();
14839
                  _elem35.read(iprot);
15642
                  _elem40.read(iprot);
14840
                  this.success.add(_elem35);
15643
                  this.success.add(_elem40);
14841
                }
15644
                }
14842
                iprot.readListEnd();
15645
                iprot.readListEnd();
14843
              }
15646
              }
14844
            } else { 
15647
            } else { 
14845
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 14867... Line 15670...
14867
 
15670
 
14868
      if (this.isSetSuccess()) {
15671
      if (this.isSetSuccess()) {
14869
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15672
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14870
        {
15673
        {
14871
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
15674
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
14872
          for (ItemCouponDiscount _iter36 : this.success)
15675
          for (ItemCouponDiscount _iter41 : this.success)
14873
          {
15676
          {
14874
            _iter36.write(oprot);
15677
            _iter41.write(oprot);
14875
          }
15678
          }
14876
          oprot.writeListEnd();
15679
          oprot.writeListEnd();
14877
        }
15680
        }
14878
        oprot.writeFieldEnd();
15681
        oprot.writeFieldEnd();
14879
      } else if (this.isSetPex()) {
15682
      } else if (this.isSetPex()) {
Line 15478... Line 16281...
15478
        }
16281
        }
15479
        switch (field.id) {
16282
        switch (field.id) {
15480
          case 0: // SUCCESS
16283
          case 0: // SUCCESS
15481
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
16284
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
15482
              {
16285
              {
15483
                org.apache.thrift.protocol.TMap _map37 = iprot.readMapBegin();
16286
                org.apache.thrift.protocol.TMap _map42 = iprot.readMapBegin();
15484
                this.success = new HashMap<String,Double>(2*_map37.size);
16287
                this.success = new HashMap<String,Double>(2*_map42.size);
15485
                for (int _i38 = 0; _i38 < _map37.size; ++_i38)
16288
                for (int _i43 = 0; _i43 < _map42.size; ++_i43)
15486
                {
16289
                {
15487
                  String _key39; // required
16290
                  String _key44; // required
15488
                  double _val40; // required
16291
                  double _val45; // required
15489
                  _key39 = iprot.readString();
16292
                  _key44 = iprot.readString();
15490
                  _val40 = iprot.readDouble();
16293
                  _val45 = iprot.readDouble();
15491
                  this.success.put(_key39, _val40);
16294
                  this.success.put(_key44, _val45);
15492
                }
16295
                }
15493
                iprot.readMapEnd();
16296
                iprot.readMapEnd();
15494
              }
16297
              }
15495
            } else { 
16298
            } else { 
15496
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16299
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 15510... Line 16313...
15510
 
16313
 
15511
      if (this.isSetSuccess()) {
16314
      if (this.isSetSuccess()) {
15512
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16315
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15513
        {
16316
        {
15514
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
16317
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
15515
          for (Map.Entry<String, Double> _iter41 : this.success.entrySet())
16318
          for (Map.Entry<String, Double> _iter46 : this.success.entrySet())
15516
          {
16319
          {
15517
            oprot.writeString(_iter41.getKey());
16320
            oprot.writeString(_iter46.getKey());
15518
            oprot.writeDouble(_iter41.getValue());
16321
            oprot.writeDouble(_iter46.getValue());
15519
          }
16322
          }
15520
          oprot.writeMapEnd();
16323
          oprot.writeMapEnd();
15521
        }
16324
        }
15522
        oprot.writeFieldEnd();
16325
        oprot.writeFieldEnd();
15523
      }
16326
      }