Subversion Repositories SmartDukaan

Rev

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

Rev 6433 Rev 6497
Line 47... Line 47...
47
 
47
 
48
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException;
48
    public void trackCouponUsage(String couponCode, long transactionId, long userId) throws PromotionException, org.apache.thrift.TException;
49
 
49
 
50
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
50
    public long getCouponUsageCountByUser(String couponCode, long userId) throws PromotionException, org.apache.thrift.TException;
51
 
51
 
-
 
52
    public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException;
-
 
53
 
-
 
54
    public void deleteCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
-
 
55
 
52
    /**
56
    /**
53
     * Returns a list of active coupons
57
     * Returns a list of active coupons
54
     */
58
     */
55
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
59
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
56
 
60
 
Line 114... Line 118...
114
 
118
 
115
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
119
    public void trackCouponUsage(String couponCode, long transactionId, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.trackCouponUsage_call> resultHandler) throws org.apache.thrift.TException;
116
 
120
 
117
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
121
    public void getCouponUsageCountByUser(String couponCode, long userId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCouponUsageCountByUser_call> resultHandler) throws org.apache.thrift.TException;
118
 
122
 
-
 
123
    public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCodes_call> resultHandler) throws org.apache.thrift.TException;
-
 
124
 
-
 
125
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
-
 
126
 
119
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
127
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
120
 
128
 
121
    public void createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
129
    public void createCoupon(long promotionId, long endOn, String email, long amount, boolean isCod, long usage, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
122
 
130
 
123
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
131
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
Line 440... Line 448...
440
        throw result.pex;
448
        throw result.pex;
441
      }
449
      }
442
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
450
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCouponUsageCountByUser failed: unknown result");
443
    }
451
    }
444
 
452
 
-
 
453
    public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException
-
 
454
    {
-
 
455
      send_getActiveCodes(promotionId);
-
 
456
      return recv_getActiveCodes();
-
 
457
    }
-
 
458
 
-
 
459
    public void send_getActiveCodes(long promotionId) throws org.apache.thrift.TException
-
 
460
    {
-
 
461
      getActiveCodes_args args = new getActiveCodes_args();
-
 
462
      args.setPromotionId(promotionId);
-
 
463
      sendBase("getActiveCodes", args);
-
 
464
    }
-
 
465
 
-
 
466
    public List<Coupon> recv_getActiveCodes() throws PromotionException, org.apache.thrift.TException
-
 
467
    {
-
 
468
      getActiveCodes_result result = new getActiveCodes_result();
-
 
469
      receiveBase(result, "getActiveCodes");
-
 
470
      if (result.isSetSuccess()) {
-
 
471
        return result.success;
-
 
472
      }
-
 
473
      if (result.pex != null) {
-
 
474
        throw result.pex;
-
 
475
      }
-
 
476
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActiveCodes failed: unknown result");
-
 
477
    }
-
 
478
 
-
 
479
    public void deleteCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException
-
 
480
    {
-
 
481
      send_deleteCoupon(couponCode);
-
 
482
      recv_deleteCoupon();
-
 
483
    }
-
 
484
 
-
 
485
    public void send_deleteCoupon(String couponCode) throws org.apache.thrift.TException
-
 
486
    {
-
 
487
      deleteCoupon_args args = new deleteCoupon_args();
-
 
488
      args.setCouponCode(couponCode);
-
 
489
      sendBase("deleteCoupon", args);
-
 
490
    }
-
 
491
 
-
 
492
    public void recv_deleteCoupon() throws PromotionException, org.apache.thrift.TException
-
 
493
    {
-
 
494
      deleteCoupon_result result = new deleteCoupon_result();
-
 
495
      receiveBase(result, "deleteCoupon");
-
 
496
      if (result.pex != null) {
-
 
497
        throw result.pex;
-
 
498
      }
-
 
499
      return;
-
 
500
    }
-
 
501
 
445
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException
502
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException
446
    {
503
    {
447
      send_getActiveCoupons();
504
      send_getActiveCoupons();
448
      return recv_getActiveCoupons();
505
      return recv_getActiveCoupons();
449
    }
506
    }
Line 1061... Line 1118...
1061
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1118
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1062
        return (new Client(prot)).recv_getCouponUsageCountByUser();
1119
        return (new Client(prot)).recv_getCouponUsageCountByUser();
1063
      }
1120
      }
1064
    }
1121
    }
1065
 
1122
 
-
 
1123
    public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getActiveCodes_call> resultHandler) throws org.apache.thrift.TException {
-
 
1124
      checkReady();
-
 
1125
      getActiveCodes_call method_call = new getActiveCodes_call(promotionId, resultHandler, this, ___protocolFactory, ___transport);
-
 
1126
      this.___currentMethod = method_call;
-
 
1127
      ___manager.call(method_call);
-
 
1128
    }
-
 
1129
 
-
 
1130
    public static class getActiveCodes_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1131
      private long promotionId;
-
 
1132
      public getActiveCodes_call(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getActiveCodes_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 {
-
 
1133
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1134
        this.promotionId = promotionId;
-
 
1135
      }
-
 
1136
 
-
 
1137
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1138
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActiveCodes", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1139
        getActiveCodes_args args = new getActiveCodes_args();
-
 
1140
        args.setPromotionId(promotionId);
-
 
1141
        args.write(prot);
-
 
1142
        prot.writeMessageEnd();
-
 
1143
      }
-
 
1144
 
-
 
1145
      public List<Coupon> getResult() throws PromotionException, org.apache.thrift.TException {
-
 
1146
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1147
          throw new IllegalStateException("Method call not finished!");
-
 
1148
        }
-
 
1149
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1150
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1151
        return (new Client(prot)).recv_getActiveCodes();
-
 
1152
      }
-
 
1153
    }
-
 
1154
 
-
 
1155
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<deleteCoupon_call> resultHandler) throws org.apache.thrift.TException {
-
 
1156
      checkReady();
-
 
1157
      deleteCoupon_call method_call = new deleteCoupon_call(couponCode, resultHandler, this, ___protocolFactory, ___transport);
-
 
1158
      this.___currentMethod = method_call;
-
 
1159
      ___manager.call(method_call);
-
 
1160
    }
-
 
1161
 
-
 
1162
    public static class deleteCoupon_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1163
      private String couponCode;
-
 
1164
      public deleteCoupon_call(String couponCode, org.apache.thrift.async.AsyncMethodCallback<deleteCoupon_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 {
-
 
1165
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1166
        this.couponCode = couponCode;
-
 
1167
      }
-
 
1168
 
-
 
1169
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1170
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteCoupon", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1171
        deleteCoupon_args args = new deleteCoupon_args();
-
 
1172
        args.setCouponCode(couponCode);
-
 
1173
        args.write(prot);
-
 
1174
        prot.writeMessageEnd();
-
 
1175
      }
-
 
1176
 
-
 
1177
      public void getResult() throws PromotionException, org.apache.thrift.TException {
-
 
1178
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1179
          throw new IllegalStateException("Method call not finished!");
-
 
1180
        }
-
 
1181
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1182
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1183
        (new Client(prot)).recv_deleteCoupon();
-
 
1184
      }
-
 
1185
    }
-
 
1186
 
1066
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException {
1187
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException {
1067
      checkReady();
1188
      checkReady();
1068
      getActiveCoupons_call method_call = new getActiveCoupons_call(resultHandler, this, ___protocolFactory, ___transport);
1189
      getActiveCoupons_call method_call = new getActiveCoupons_call(resultHandler, this, ___protocolFactory, ___transport);
1069
      this.___currentMethod = method_call;
1190
      this.___currentMethod = method_call;
1070
      ___manager.call(method_call);
1191
      ___manager.call(method_call);
Line 1397... Line 1518...
1397
      processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
1518
      processMap.put("generateCouponsForPromotion", new generateCouponsForPromotion());
1398
      processMap.put("applyCoupon", new applyCoupon());
1519
      processMap.put("applyCoupon", new applyCoupon());
1399
      processMap.put("applyRechargeCoupon", new applyRechargeCoupon());
1520
      processMap.put("applyRechargeCoupon", new applyRechargeCoupon());
1400
      processMap.put("trackCouponUsage", new trackCouponUsage());
1521
      processMap.put("trackCouponUsage", new trackCouponUsage());
1401
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
1522
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
-
 
1523
      processMap.put("getActiveCodes", new getActiveCodes());
-
 
1524
      processMap.put("deleteCoupon", new deleteCoupon());
1402
      processMap.put("getActiveCoupons", new getActiveCoupons());
1525
      processMap.put("getActiveCoupons", new getActiveCoupons());
1403
      processMap.put("createCoupon", new createCoupon());
1526
      processMap.put("createCoupon", new createCoupon());
1404
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
1527
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
1405
      processMap.put("getRuleDocString", new getRuleDocString());
1528
      processMap.put("getRuleDocString", new getRuleDocString());
1406
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
1529
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
Line 1632... Line 1755...
1632
        }
1755
        }
1633
        return result;
1756
        return result;
1634
      }
1757
      }
1635
    }
1758
    }
1636
 
1759
 
-
 
1760
    private static class getActiveCodes<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCodes_args> {
-
 
1761
      public getActiveCodes() {
-
 
1762
        super("getActiveCodes");
-
 
1763
      }
-
 
1764
 
-
 
1765
      protected getActiveCodes_args getEmptyArgsInstance() {
-
 
1766
        return new getActiveCodes_args();
-
 
1767
      }
-
 
1768
 
-
 
1769
      protected getActiveCodes_result getResult(I iface, getActiveCodes_args args) throws org.apache.thrift.TException {
-
 
1770
        getActiveCodes_result result = new getActiveCodes_result();
-
 
1771
        try {
-
 
1772
          result.success = iface.getActiveCodes(args.promotionId);
-
 
1773
        } catch (PromotionException pex) {
-
 
1774
          result.pex = pex;
-
 
1775
        }
-
 
1776
        return result;
-
 
1777
      }
-
 
1778
    }
-
 
1779
 
-
 
1780
    private static class deleteCoupon<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteCoupon_args> {
-
 
1781
      public deleteCoupon() {
-
 
1782
        super("deleteCoupon");
-
 
1783
      }
-
 
1784
 
-
 
1785
      protected deleteCoupon_args getEmptyArgsInstance() {
-
 
1786
        return new deleteCoupon_args();
-
 
1787
      }
-
 
1788
 
-
 
1789
      protected deleteCoupon_result getResult(I iface, deleteCoupon_args args) throws org.apache.thrift.TException {
-
 
1790
        deleteCoupon_result result = new deleteCoupon_result();
-
 
1791
        try {
-
 
1792
          iface.deleteCoupon(args.couponCode);
-
 
1793
        } catch (PromotionException pex) {
-
 
1794
          result.pex = pex;
-
 
1795
        }
-
 
1796
        return result;
-
 
1797
      }
-
 
1798
    }
-
 
1799
 
1637
    private static class getActiveCoupons<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCoupons_args> {
1800
    private static class getActiveCoupons<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCoupons_args> {
1638
      public getActiveCoupons() {
1801
      public getActiveCoupons() {
1639
        super("getActiveCoupons");
1802
        super("getActiveCoupons");
1640
      }
1803
      }
1641
 
1804
 
Line 9817... Line 9980...
9817
      }
9980
      }
9818
    }
9981
    }
9819
 
9982
 
9820
  }
9983
  }
9821
 
9984
 
-
 
9985
  public static class getActiveCodes_args implements org.apache.thrift.TBase<getActiveCodes_args, getActiveCodes_args._Fields>, java.io.Serializable, Cloneable   {
-
 
9986
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCodes_args");
-
 
9987
 
-
 
9988
    private static final org.apache.thrift.protocol.TField PROMOTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("promotionId", org.apache.thrift.protocol.TType.I64, (short)1);
-
 
9989
 
-
 
9990
    private long promotionId; // required
-
 
9991
 
-
 
9992
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
9993
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
9994
      PROMOTION_ID((short)1, "promotionId");
-
 
9995
 
-
 
9996
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
9997
 
-
 
9998
      static {
-
 
9999
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10000
          byName.put(field.getFieldName(), field);
-
 
10001
        }
-
 
10002
      }
-
 
10003
 
-
 
10004
      /**
-
 
10005
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10006
       */
-
 
10007
      public static _Fields findByThriftId(int fieldId) {
-
 
10008
        switch(fieldId) {
-
 
10009
          case 1: // PROMOTION_ID
-
 
10010
            return PROMOTION_ID;
-
 
10011
          default:
-
 
10012
            return null;
-
 
10013
        }
-
 
10014
      }
-
 
10015
 
-
 
10016
      /**
-
 
10017
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10018
       * if it is not found.
-
 
10019
       */
-
 
10020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10021
        _Fields fields = findByThriftId(fieldId);
-
 
10022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10023
        return fields;
-
 
10024
      }
-
 
10025
 
-
 
10026
      /**
-
 
10027
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10028
       */
-
 
10029
      public static _Fields findByName(String name) {
-
 
10030
        return byName.get(name);
-
 
10031
      }
-
 
10032
 
-
 
10033
      private final short _thriftId;
-
 
10034
      private final String _fieldName;
-
 
10035
 
-
 
10036
      _Fields(short thriftId, String fieldName) {
-
 
10037
        _thriftId = thriftId;
-
 
10038
        _fieldName = fieldName;
-
 
10039
      }
-
 
10040
 
-
 
10041
      public short getThriftFieldId() {
-
 
10042
        return _thriftId;
-
 
10043
      }
-
 
10044
 
-
 
10045
      public String getFieldName() {
-
 
10046
        return _fieldName;
-
 
10047
      }
-
 
10048
    }
-
 
10049
 
-
 
10050
    // isset id assignments
-
 
10051
    private static final int __PROMOTIONID_ISSET_ID = 0;
-
 
10052
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
10053
 
-
 
10054
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10055
    static {
-
 
10056
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10057
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10058
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
10059
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10060
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCodes_args.class, metaDataMap);
-
 
10061
    }
-
 
10062
 
-
 
10063
    public getActiveCodes_args() {
-
 
10064
    }
-
 
10065
 
-
 
10066
    public getActiveCodes_args(
-
 
10067
      long promotionId)
-
 
10068
    {
-
 
10069
      this();
-
 
10070
      this.promotionId = promotionId;
-
 
10071
      setPromotionIdIsSet(true);
-
 
10072
    }
-
 
10073
 
-
 
10074
    /**
-
 
10075
     * Performs a deep copy on <i>other</i>.
-
 
10076
     */
-
 
10077
    public getActiveCodes_args(getActiveCodes_args other) {
-
 
10078
      __isset_bit_vector.clear();
-
 
10079
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
10080
      this.promotionId = other.promotionId;
-
 
10081
    }
-
 
10082
 
-
 
10083
    public getActiveCodes_args deepCopy() {
-
 
10084
      return new getActiveCodes_args(this);
-
 
10085
    }
-
 
10086
 
-
 
10087
    @Override
-
 
10088
    public void clear() {
-
 
10089
      setPromotionIdIsSet(false);
-
 
10090
      this.promotionId = 0;
-
 
10091
    }
-
 
10092
 
-
 
10093
    public long getPromotionId() {
-
 
10094
      return this.promotionId;
-
 
10095
    }
-
 
10096
 
-
 
10097
    public void setPromotionId(long promotionId) {
-
 
10098
      this.promotionId = promotionId;
-
 
10099
      setPromotionIdIsSet(true);
-
 
10100
    }
-
 
10101
 
-
 
10102
    public void unsetPromotionId() {
-
 
10103
      __isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
-
 
10104
    }
-
 
10105
 
-
 
10106
    /** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
-
 
10107
    public boolean isSetPromotionId() {
-
 
10108
      return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
-
 
10109
    }
-
 
10110
 
-
 
10111
    public void setPromotionIdIsSet(boolean value) {
-
 
10112
      __isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
-
 
10113
    }
-
 
10114
 
-
 
10115
    public void setFieldValue(_Fields field, Object value) {
-
 
10116
      switch (field) {
-
 
10117
      case PROMOTION_ID:
-
 
10118
        if (value == null) {
-
 
10119
          unsetPromotionId();
-
 
10120
        } else {
-
 
10121
          setPromotionId((Long)value);
-
 
10122
        }
-
 
10123
        break;
-
 
10124
 
-
 
10125
      }
-
 
10126
    }
-
 
10127
 
-
 
10128
    public Object getFieldValue(_Fields field) {
-
 
10129
      switch (field) {
-
 
10130
      case PROMOTION_ID:
-
 
10131
        return Long.valueOf(getPromotionId());
-
 
10132
 
-
 
10133
      }
-
 
10134
      throw new IllegalStateException();
-
 
10135
    }
-
 
10136
 
-
 
10137
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10138
    public boolean isSet(_Fields field) {
-
 
10139
      if (field == null) {
-
 
10140
        throw new IllegalArgumentException();
-
 
10141
      }
-
 
10142
 
-
 
10143
      switch (field) {
-
 
10144
      case PROMOTION_ID:
-
 
10145
        return isSetPromotionId();
-
 
10146
      }
-
 
10147
      throw new IllegalStateException();
-
 
10148
    }
-
 
10149
 
-
 
10150
    @Override
-
 
10151
    public boolean equals(Object that) {
-
 
10152
      if (that == null)
-
 
10153
        return false;
-
 
10154
      if (that instanceof getActiveCodes_args)
-
 
10155
        return this.equals((getActiveCodes_args)that);
-
 
10156
      return false;
-
 
10157
    }
-
 
10158
 
-
 
10159
    public boolean equals(getActiveCodes_args that) {
-
 
10160
      if (that == null)
-
 
10161
        return false;
-
 
10162
 
-
 
10163
      boolean this_present_promotionId = true;
-
 
10164
      boolean that_present_promotionId = true;
-
 
10165
      if (this_present_promotionId || that_present_promotionId) {
-
 
10166
        if (!(this_present_promotionId && that_present_promotionId))
-
 
10167
          return false;
-
 
10168
        if (this.promotionId != that.promotionId)
-
 
10169
          return false;
-
 
10170
      }
-
 
10171
 
-
 
10172
      return true;
-
 
10173
    }
-
 
10174
 
-
 
10175
    @Override
-
 
10176
    public int hashCode() {
-
 
10177
      return 0;
-
 
10178
    }
-
 
10179
 
-
 
10180
    public int compareTo(getActiveCodes_args other) {
-
 
10181
      if (!getClass().equals(other.getClass())) {
-
 
10182
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10183
      }
-
 
10184
 
-
 
10185
      int lastComparison = 0;
-
 
10186
      getActiveCodes_args typedOther = (getActiveCodes_args)other;
-
 
10187
 
-
 
10188
      lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
-
 
10189
      if (lastComparison != 0) {
-
 
10190
        return lastComparison;
-
 
10191
      }
-
 
10192
      if (isSetPromotionId()) {
-
 
10193
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
-
 
10194
        if (lastComparison != 0) {
-
 
10195
          return lastComparison;
-
 
10196
        }
-
 
10197
      }
-
 
10198
      return 0;
-
 
10199
    }
-
 
10200
 
-
 
10201
    public _Fields fieldForId(int fieldId) {
-
 
10202
      return _Fields.findByThriftId(fieldId);
-
 
10203
    }
-
 
10204
 
-
 
10205
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10206
      org.apache.thrift.protocol.TField field;
-
 
10207
      iprot.readStructBegin();
-
 
10208
      while (true)
-
 
10209
      {
-
 
10210
        field = iprot.readFieldBegin();
-
 
10211
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10212
          break;
-
 
10213
        }
-
 
10214
        switch (field.id) {
-
 
10215
          case 1: // PROMOTION_ID
-
 
10216
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
10217
              this.promotionId = iprot.readI64();
-
 
10218
              setPromotionIdIsSet(true);
-
 
10219
            } else { 
-
 
10220
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10221
            }
-
 
10222
            break;
-
 
10223
          default:
-
 
10224
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10225
        }
-
 
10226
        iprot.readFieldEnd();
-
 
10227
      }
-
 
10228
      iprot.readStructEnd();
-
 
10229
      validate();
-
 
10230
    }
-
 
10231
 
-
 
10232
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10233
      validate();
-
 
10234
 
-
 
10235
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10236
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
-
 
10237
      oprot.writeI64(this.promotionId);
-
 
10238
      oprot.writeFieldEnd();
-
 
10239
      oprot.writeFieldStop();
-
 
10240
      oprot.writeStructEnd();
-
 
10241
    }
-
 
10242
 
-
 
10243
    @Override
-
 
10244
    public String toString() {
-
 
10245
      StringBuilder sb = new StringBuilder("getActiveCodes_args(");
-
 
10246
      boolean first = true;
-
 
10247
 
-
 
10248
      sb.append("promotionId:");
-
 
10249
      sb.append(this.promotionId);
-
 
10250
      first = false;
-
 
10251
      sb.append(")");
-
 
10252
      return sb.toString();
-
 
10253
    }
-
 
10254
 
-
 
10255
    public void validate() throws org.apache.thrift.TException {
-
 
10256
      // check for required fields
-
 
10257
    }
-
 
10258
 
-
 
10259
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10260
      try {
-
 
10261
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10262
      } catch (org.apache.thrift.TException te) {
-
 
10263
        throw new java.io.IOException(te);
-
 
10264
      }
-
 
10265
    }
-
 
10266
 
-
 
10267
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10268
      try {
-
 
10269
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
10270
        __isset_bit_vector = new BitSet(1);
-
 
10271
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10272
      } catch (org.apache.thrift.TException te) {
-
 
10273
        throw new java.io.IOException(te);
-
 
10274
      }
-
 
10275
    }
-
 
10276
 
-
 
10277
  }
-
 
10278
 
-
 
10279
  public static class getActiveCodes_result implements org.apache.thrift.TBase<getActiveCodes_result, getActiveCodes_result._Fields>, java.io.Serializable, Cloneable   {
-
 
10280
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCodes_result");
-
 
10281
 
-
 
10282
    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
-
 
10283
    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);
-
 
10284
 
-
 
10285
    private List<Coupon> success; // required
-
 
10286
    private PromotionException pex; // required
-
 
10287
 
-
 
10288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10289
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10290
      SUCCESS((short)0, "success"),
-
 
10291
      PEX((short)1, "pex");
-
 
10292
 
-
 
10293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10294
 
-
 
10295
      static {
-
 
10296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10297
          byName.put(field.getFieldName(), field);
-
 
10298
        }
-
 
10299
      }
-
 
10300
 
-
 
10301
      /**
-
 
10302
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10303
       */
-
 
10304
      public static _Fields findByThriftId(int fieldId) {
-
 
10305
        switch(fieldId) {
-
 
10306
          case 0: // SUCCESS
-
 
10307
            return SUCCESS;
-
 
10308
          case 1: // PEX
-
 
10309
            return PEX;
-
 
10310
          default:
-
 
10311
            return null;
-
 
10312
        }
-
 
10313
      }
-
 
10314
 
-
 
10315
      /**
-
 
10316
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10317
       * if it is not found.
-
 
10318
       */
-
 
10319
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10320
        _Fields fields = findByThriftId(fieldId);
-
 
10321
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10322
        return fields;
-
 
10323
      }
-
 
10324
 
-
 
10325
      /**
-
 
10326
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10327
       */
-
 
10328
      public static _Fields findByName(String name) {
-
 
10329
        return byName.get(name);
-
 
10330
      }
-
 
10331
 
-
 
10332
      private final short _thriftId;
-
 
10333
      private final String _fieldName;
-
 
10334
 
-
 
10335
      _Fields(short thriftId, String fieldName) {
-
 
10336
        _thriftId = thriftId;
-
 
10337
        _fieldName = fieldName;
-
 
10338
      }
-
 
10339
 
-
 
10340
      public short getThriftFieldId() {
-
 
10341
        return _thriftId;
-
 
10342
      }
-
 
10343
 
-
 
10344
      public String getFieldName() {
-
 
10345
        return _fieldName;
-
 
10346
      }
-
 
10347
    }
-
 
10348
 
-
 
10349
    // isset id assignments
-
 
10350
 
-
 
10351
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10352
    static {
-
 
10353
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10354
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10355
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
10356
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Coupon.class))));
-
 
10357
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10358
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
10359
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10360
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActiveCodes_result.class, metaDataMap);
-
 
10361
    }
-
 
10362
 
-
 
10363
    public getActiveCodes_result() {
-
 
10364
    }
-
 
10365
 
-
 
10366
    public getActiveCodes_result(
-
 
10367
      List<Coupon> success,
-
 
10368
      PromotionException pex)
-
 
10369
    {
-
 
10370
      this();
-
 
10371
      this.success = success;
-
 
10372
      this.pex = pex;
-
 
10373
    }
-
 
10374
 
-
 
10375
    /**
-
 
10376
     * Performs a deep copy on <i>other</i>.
-
 
10377
     */
-
 
10378
    public getActiveCodes_result(getActiveCodes_result other) {
-
 
10379
      if (other.isSetSuccess()) {
-
 
10380
        List<Coupon> __this__success = new ArrayList<Coupon>();
-
 
10381
        for (Coupon other_element : other.success) {
-
 
10382
          __this__success.add(new Coupon(other_element));
-
 
10383
        }
-
 
10384
        this.success = __this__success;
-
 
10385
      }
-
 
10386
      if (other.isSetPex()) {
-
 
10387
        this.pex = new PromotionException(other.pex);
-
 
10388
      }
-
 
10389
    }
-
 
10390
 
-
 
10391
    public getActiveCodes_result deepCopy() {
-
 
10392
      return new getActiveCodes_result(this);
-
 
10393
    }
-
 
10394
 
-
 
10395
    @Override
-
 
10396
    public void clear() {
-
 
10397
      this.success = null;
-
 
10398
      this.pex = null;
-
 
10399
    }
-
 
10400
 
-
 
10401
    public int getSuccessSize() {
-
 
10402
      return (this.success == null) ? 0 : this.success.size();
-
 
10403
    }
-
 
10404
 
-
 
10405
    public java.util.Iterator<Coupon> getSuccessIterator() {
-
 
10406
      return (this.success == null) ? null : this.success.iterator();
-
 
10407
    }
-
 
10408
 
-
 
10409
    public void addToSuccess(Coupon elem) {
-
 
10410
      if (this.success == null) {
-
 
10411
        this.success = new ArrayList<Coupon>();
-
 
10412
      }
-
 
10413
      this.success.add(elem);
-
 
10414
    }
-
 
10415
 
-
 
10416
    public List<Coupon> getSuccess() {
-
 
10417
      return this.success;
-
 
10418
    }
-
 
10419
 
-
 
10420
    public void setSuccess(List<Coupon> success) {
-
 
10421
      this.success = success;
-
 
10422
    }
-
 
10423
 
-
 
10424
    public void unsetSuccess() {
-
 
10425
      this.success = null;
-
 
10426
    }
-
 
10427
 
-
 
10428
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
10429
    public boolean isSetSuccess() {
-
 
10430
      return this.success != null;
-
 
10431
    }
-
 
10432
 
-
 
10433
    public void setSuccessIsSet(boolean value) {
-
 
10434
      if (!value) {
-
 
10435
        this.success = null;
-
 
10436
      }
-
 
10437
    }
-
 
10438
 
-
 
10439
    public PromotionException getPex() {
-
 
10440
      return this.pex;
-
 
10441
    }
-
 
10442
 
-
 
10443
    public void setPex(PromotionException pex) {
-
 
10444
      this.pex = pex;
-
 
10445
    }
-
 
10446
 
-
 
10447
    public void unsetPex() {
-
 
10448
      this.pex = null;
-
 
10449
    }
-
 
10450
 
-
 
10451
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
-
 
10452
    public boolean isSetPex() {
-
 
10453
      return this.pex != null;
-
 
10454
    }
-
 
10455
 
-
 
10456
    public void setPexIsSet(boolean value) {
-
 
10457
      if (!value) {
-
 
10458
        this.pex = null;
-
 
10459
      }
-
 
10460
    }
-
 
10461
 
-
 
10462
    public void setFieldValue(_Fields field, Object value) {
-
 
10463
      switch (field) {
-
 
10464
      case SUCCESS:
-
 
10465
        if (value == null) {
-
 
10466
          unsetSuccess();
-
 
10467
        } else {
-
 
10468
          setSuccess((List<Coupon>)value);
-
 
10469
        }
-
 
10470
        break;
-
 
10471
 
-
 
10472
      case PEX:
-
 
10473
        if (value == null) {
-
 
10474
          unsetPex();
-
 
10475
        } else {
-
 
10476
          setPex((PromotionException)value);
-
 
10477
        }
-
 
10478
        break;
-
 
10479
 
-
 
10480
      }
-
 
10481
    }
-
 
10482
 
-
 
10483
    public Object getFieldValue(_Fields field) {
-
 
10484
      switch (field) {
-
 
10485
      case SUCCESS:
-
 
10486
        return getSuccess();
-
 
10487
 
-
 
10488
      case PEX:
-
 
10489
        return getPex();
-
 
10490
 
-
 
10491
      }
-
 
10492
      throw new IllegalStateException();
-
 
10493
    }
-
 
10494
 
-
 
10495
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10496
    public boolean isSet(_Fields field) {
-
 
10497
      if (field == null) {
-
 
10498
        throw new IllegalArgumentException();
-
 
10499
      }
-
 
10500
 
-
 
10501
      switch (field) {
-
 
10502
      case SUCCESS:
-
 
10503
        return isSetSuccess();
-
 
10504
      case PEX:
-
 
10505
        return isSetPex();
-
 
10506
      }
-
 
10507
      throw new IllegalStateException();
-
 
10508
    }
-
 
10509
 
-
 
10510
    @Override
-
 
10511
    public boolean equals(Object that) {
-
 
10512
      if (that == null)
-
 
10513
        return false;
-
 
10514
      if (that instanceof getActiveCodes_result)
-
 
10515
        return this.equals((getActiveCodes_result)that);
-
 
10516
      return false;
-
 
10517
    }
-
 
10518
 
-
 
10519
    public boolean equals(getActiveCodes_result that) {
-
 
10520
      if (that == null)
-
 
10521
        return false;
-
 
10522
 
-
 
10523
      boolean this_present_success = true && this.isSetSuccess();
-
 
10524
      boolean that_present_success = true && that.isSetSuccess();
-
 
10525
      if (this_present_success || that_present_success) {
-
 
10526
        if (!(this_present_success && that_present_success))
-
 
10527
          return false;
-
 
10528
        if (!this.success.equals(that.success))
-
 
10529
          return false;
-
 
10530
      }
-
 
10531
 
-
 
10532
      boolean this_present_pex = true && this.isSetPex();
-
 
10533
      boolean that_present_pex = true && that.isSetPex();
-
 
10534
      if (this_present_pex || that_present_pex) {
-
 
10535
        if (!(this_present_pex && that_present_pex))
-
 
10536
          return false;
-
 
10537
        if (!this.pex.equals(that.pex))
-
 
10538
          return false;
-
 
10539
      }
-
 
10540
 
-
 
10541
      return true;
-
 
10542
    }
-
 
10543
 
-
 
10544
    @Override
-
 
10545
    public int hashCode() {
-
 
10546
      return 0;
-
 
10547
    }
-
 
10548
 
-
 
10549
    public int compareTo(getActiveCodes_result other) {
-
 
10550
      if (!getClass().equals(other.getClass())) {
-
 
10551
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10552
      }
-
 
10553
 
-
 
10554
      int lastComparison = 0;
-
 
10555
      getActiveCodes_result typedOther = (getActiveCodes_result)other;
-
 
10556
 
-
 
10557
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
10558
      if (lastComparison != 0) {
-
 
10559
        return lastComparison;
-
 
10560
      }
-
 
10561
      if (isSetSuccess()) {
-
 
10562
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
10563
        if (lastComparison != 0) {
-
 
10564
          return lastComparison;
-
 
10565
        }
-
 
10566
      }
-
 
10567
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
-
 
10568
      if (lastComparison != 0) {
-
 
10569
        return lastComparison;
-
 
10570
      }
-
 
10571
      if (isSetPex()) {
-
 
10572
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
-
 
10573
        if (lastComparison != 0) {
-
 
10574
          return lastComparison;
-
 
10575
        }
-
 
10576
      }
-
 
10577
      return 0;
-
 
10578
    }
-
 
10579
 
-
 
10580
    public _Fields fieldForId(int fieldId) {
-
 
10581
      return _Fields.findByThriftId(fieldId);
-
 
10582
    }
-
 
10583
 
-
 
10584
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10585
      org.apache.thrift.protocol.TField field;
-
 
10586
      iprot.readStructBegin();
-
 
10587
      while (true)
-
 
10588
      {
-
 
10589
        field = iprot.readFieldBegin();
-
 
10590
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10591
          break;
-
 
10592
        }
-
 
10593
        switch (field.id) {
-
 
10594
          case 0: // SUCCESS
-
 
10595
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
10596
              {
-
 
10597
                org.apache.thrift.protocol.TList _list21 = iprot.readListBegin();
-
 
10598
                this.success = new ArrayList<Coupon>(_list21.size);
-
 
10599
                for (int _i22 = 0; _i22 < _list21.size; ++_i22)
-
 
10600
                {
-
 
10601
                  Coupon _elem23; // required
-
 
10602
                  _elem23 = new Coupon();
-
 
10603
                  _elem23.read(iprot);
-
 
10604
                  this.success.add(_elem23);
-
 
10605
                }
-
 
10606
                iprot.readListEnd();
-
 
10607
              }
-
 
10608
            } else { 
-
 
10609
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10610
            }
-
 
10611
            break;
-
 
10612
          case 1: // PEX
-
 
10613
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
10614
              this.pex = new PromotionException();
-
 
10615
              this.pex.read(iprot);
-
 
10616
            } else { 
-
 
10617
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10618
            }
-
 
10619
            break;
-
 
10620
          default:
-
 
10621
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10622
        }
-
 
10623
        iprot.readFieldEnd();
-
 
10624
      }
-
 
10625
      iprot.readStructEnd();
-
 
10626
      validate();
-
 
10627
    }
-
 
10628
 
-
 
10629
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10630
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10631
 
-
 
10632
      if (this.isSetSuccess()) {
-
 
10633
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
10634
        {
-
 
10635
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
10636
          for (Coupon _iter24 : this.success)
-
 
10637
          {
-
 
10638
            _iter24.write(oprot);
-
 
10639
          }
-
 
10640
          oprot.writeListEnd();
-
 
10641
        }
-
 
10642
        oprot.writeFieldEnd();
-
 
10643
      } else if (this.isSetPex()) {
-
 
10644
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
10645
        this.pex.write(oprot);
-
 
10646
        oprot.writeFieldEnd();
-
 
10647
      }
-
 
10648
      oprot.writeFieldStop();
-
 
10649
      oprot.writeStructEnd();
-
 
10650
    }
-
 
10651
 
-
 
10652
    @Override
-
 
10653
    public String toString() {
-
 
10654
      StringBuilder sb = new StringBuilder("getActiveCodes_result(");
-
 
10655
      boolean first = true;
-
 
10656
 
-
 
10657
      sb.append("success:");
-
 
10658
      if (this.success == null) {
-
 
10659
        sb.append("null");
-
 
10660
      } else {
-
 
10661
        sb.append(this.success);
-
 
10662
      }
-
 
10663
      first = false;
-
 
10664
      if (!first) sb.append(", ");
-
 
10665
      sb.append("pex:");
-
 
10666
      if (this.pex == null) {
-
 
10667
        sb.append("null");
-
 
10668
      } else {
-
 
10669
        sb.append(this.pex);
-
 
10670
      }
-
 
10671
      first = false;
-
 
10672
      sb.append(")");
-
 
10673
      return sb.toString();
-
 
10674
    }
-
 
10675
 
-
 
10676
    public void validate() throws org.apache.thrift.TException {
-
 
10677
      // check for required fields
-
 
10678
    }
-
 
10679
 
-
 
10680
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10681
      try {
-
 
10682
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10683
      } catch (org.apache.thrift.TException te) {
-
 
10684
        throw new java.io.IOException(te);
-
 
10685
      }
-
 
10686
    }
-
 
10687
 
-
 
10688
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10689
      try {
-
 
10690
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10691
      } catch (org.apache.thrift.TException te) {
-
 
10692
        throw new java.io.IOException(te);
-
 
10693
      }
-
 
10694
    }
-
 
10695
 
-
 
10696
  }
-
 
10697
 
-
 
10698
  public static class deleteCoupon_args implements org.apache.thrift.TBase<deleteCoupon_args, deleteCoupon_args._Fields>, java.io.Serializable, Cloneable   {
-
 
10699
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteCoupon_args");
-
 
10700
 
-
 
10701
    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);
-
 
10702
 
-
 
10703
    private String couponCode; // required
-
 
10704
 
-
 
10705
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
10706
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
10707
      COUPON_CODE((short)1, "couponCode");
-
 
10708
 
-
 
10709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
10710
 
-
 
10711
      static {
-
 
10712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
10713
          byName.put(field.getFieldName(), field);
-
 
10714
        }
-
 
10715
      }
-
 
10716
 
-
 
10717
      /**
-
 
10718
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
10719
       */
-
 
10720
      public static _Fields findByThriftId(int fieldId) {
-
 
10721
        switch(fieldId) {
-
 
10722
          case 1: // COUPON_CODE
-
 
10723
            return COUPON_CODE;
-
 
10724
          default:
-
 
10725
            return null;
-
 
10726
        }
-
 
10727
      }
-
 
10728
 
-
 
10729
      /**
-
 
10730
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
10731
       * if it is not found.
-
 
10732
       */
-
 
10733
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
10734
        _Fields fields = findByThriftId(fieldId);
-
 
10735
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
10736
        return fields;
-
 
10737
      }
-
 
10738
 
-
 
10739
      /**
-
 
10740
       * Find the _Fields constant that matches name, or null if its not found.
-
 
10741
       */
-
 
10742
      public static _Fields findByName(String name) {
-
 
10743
        return byName.get(name);
-
 
10744
      }
-
 
10745
 
-
 
10746
      private final short _thriftId;
-
 
10747
      private final String _fieldName;
-
 
10748
 
-
 
10749
      _Fields(short thriftId, String fieldName) {
-
 
10750
        _thriftId = thriftId;
-
 
10751
        _fieldName = fieldName;
-
 
10752
      }
-
 
10753
 
-
 
10754
      public short getThriftFieldId() {
-
 
10755
        return _thriftId;
-
 
10756
      }
-
 
10757
 
-
 
10758
      public String getFieldName() {
-
 
10759
        return _fieldName;
-
 
10760
      }
-
 
10761
    }
-
 
10762
 
-
 
10763
    // isset id assignments
-
 
10764
 
-
 
10765
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
10766
    static {
-
 
10767
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
10768
      tmpMap.put(_Fields.COUPON_CODE, new org.apache.thrift.meta_data.FieldMetaData("couponCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
10769
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-
 
10770
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
10771
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteCoupon_args.class, metaDataMap);
-
 
10772
    }
-
 
10773
 
-
 
10774
    public deleteCoupon_args() {
-
 
10775
    }
-
 
10776
 
-
 
10777
    public deleteCoupon_args(
-
 
10778
      String couponCode)
-
 
10779
    {
-
 
10780
      this();
-
 
10781
      this.couponCode = couponCode;
-
 
10782
    }
-
 
10783
 
-
 
10784
    /**
-
 
10785
     * Performs a deep copy on <i>other</i>.
-
 
10786
     */
-
 
10787
    public deleteCoupon_args(deleteCoupon_args other) {
-
 
10788
      if (other.isSetCouponCode()) {
-
 
10789
        this.couponCode = other.couponCode;
-
 
10790
      }
-
 
10791
    }
-
 
10792
 
-
 
10793
    public deleteCoupon_args deepCopy() {
-
 
10794
      return new deleteCoupon_args(this);
-
 
10795
    }
-
 
10796
 
-
 
10797
    @Override
-
 
10798
    public void clear() {
-
 
10799
      this.couponCode = null;
-
 
10800
    }
-
 
10801
 
-
 
10802
    public String getCouponCode() {
-
 
10803
      return this.couponCode;
-
 
10804
    }
-
 
10805
 
-
 
10806
    public void setCouponCode(String couponCode) {
-
 
10807
      this.couponCode = couponCode;
-
 
10808
    }
-
 
10809
 
-
 
10810
    public void unsetCouponCode() {
-
 
10811
      this.couponCode = null;
-
 
10812
    }
-
 
10813
 
-
 
10814
    /** Returns true if field couponCode is set (has been assigned a value) and false otherwise */
-
 
10815
    public boolean isSetCouponCode() {
-
 
10816
      return this.couponCode != null;
-
 
10817
    }
-
 
10818
 
-
 
10819
    public void setCouponCodeIsSet(boolean value) {
-
 
10820
      if (!value) {
-
 
10821
        this.couponCode = null;
-
 
10822
      }
-
 
10823
    }
-
 
10824
 
-
 
10825
    public void setFieldValue(_Fields field, Object value) {
-
 
10826
      switch (field) {
-
 
10827
      case COUPON_CODE:
-
 
10828
        if (value == null) {
-
 
10829
          unsetCouponCode();
-
 
10830
        } else {
-
 
10831
          setCouponCode((String)value);
-
 
10832
        }
-
 
10833
        break;
-
 
10834
 
-
 
10835
      }
-
 
10836
    }
-
 
10837
 
-
 
10838
    public Object getFieldValue(_Fields field) {
-
 
10839
      switch (field) {
-
 
10840
      case COUPON_CODE:
-
 
10841
        return getCouponCode();
-
 
10842
 
-
 
10843
      }
-
 
10844
      throw new IllegalStateException();
-
 
10845
    }
-
 
10846
 
-
 
10847
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
10848
    public boolean isSet(_Fields field) {
-
 
10849
      if (field == null) {
-
 
10850
        throw new IllegalArgumentException();
-
 
10851
      }
-
 
10852
 
-
 
10853
      switch (field) {
-
 
10854
      case COUPON_CODE:
-
 
10855
        return isSetCouponCode();
-
 
10856
      }
-
 
10857
      throw new IllegalStateException();
-
 
10858
    }
-
 
10859
 
-
 
10860
    @Override
-
 
10861
    public boolean equals(Object that) {
-
 
10862
      if (that == null)
-
 
10863
        return false;
-
 
10864
      if (that instanceof deleteCoupon_args)
-
 
10865
        return this.equals((deleteCoupon_args)that);
-
 
10866
      return false;
-
 
10867
    }
-
 
10868
 
-
 
10869
    public boolean equals(deleteCoupon_args that) {
-
 
10870
      if (that == null)
-
 
10871
        return false;
-
 
10872
 
-
 
10873
      boolean this_present_couponCode = true && this.isSetCouponCode();
-
 
10874
      boolean that_present_couponCode = true && that.isSetCouponCode();
-
 
10875
      if (this_present_couponCode || that_present_couponCode) {
-
 
10876
        if (!(this_present_couponCode && that_present_couponCode))
-
 
10877
          return false;
-
 
10878
        if (!this.couponCode.equals(that.couponCode))
-
 
10879
          return false;
-
 
10880
      }
-
 
10881
 
-
 
10882
      return true;
-
 
10883
    }
-
 
10884
 
-
 
10885
    @Override
-
 
10886
    public int hashCode() {
-
 
10887
      return 0;
-
 
10888
    }
-
 
10889
 
-
 
10890
    public int compareTo(deleteCoupon_args other) {
-
 
10891
      if (!getClass().equals(other.getClass())) {
-
 
10892
        return getClass().getName().compareTo(other.getClass().getName());
-
 
10893
      }
-
 
10894
 
-
 
10895
      int lastComparison = 0;
-
 
10896
      deleteCoupon_args typedOther = (deleteCoupon_args)other;
-
 
10897
 
-
 
10898
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(typedOther.isSetCouponCode());
-
 
10899
      if (lastComparison != 0) {
-
 
10900
        return lastComparison;
-
 
10901
      }
-
 
10902
      if (isSetCouponCode()) {
-
 
10903
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.couponCode, typedOther.couponCode);
-
 
10904
        if (lastComparison != 0) {
-
 
10905
          return lastComparison;
-
 
10906
        }
-
 
10907
      }
-
 
10908
      return 0;
-
 
10909
    }
-
 
10910
 
-
 
10911
    public _Fields fieldForId(int fieldId) {
-
 
10912
      return _Fields.findByThriftId(fieldId);
-
 
10913
    }
-
 
10914
 
-
 
10915
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
10916
      org.apache.thrift.protocol.TField field;
-
 
10917
      iprot.readStructBegin();
-
 
10918
      while (true)
-
 
10919
      {
-
 
10920
        field = iprot.readFieldBegin();
-
 
10921
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
10922
          break;
-
 
10923
        }
-
 
10924
        switch (field.id) {
-
 
10925
          case 1: // COUPON_CODE
-
 
10926
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
-
 
10927
              this.couponCode = iprot.readString();
-
 
10928
            } else { 
-
 
10929
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10930
            }
-
 
10931
            break;
-
 
10932
          default:
-
 
10933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
10934
        }
-
 
10935
        iprot.readFieldEnd();
-
 
10936
      }
-
 
10937
      iprot.readStructEnd();
-
 
10938
      validate();
-
 
10939
    }
-
 
10940
 
-
 
10941
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
10942
      validate();
-
 
10943
 
-
 
10944
      oprot.writeStructBegin(STRUCT_DESC);
-
 
10945
      if (this.couponCode != null) {
-
 
10946
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
-
 
10947
        oprot.writeString(this.couponCode);
-
 
10948
        oprot.writeFieldEnd();
-
 
10949
      }
-
 
10950
      oprot.writeFieldStop();
-
 
10951
      oprot.writeStructEnd();
-
 
10952
    }
-
 
10953
 
-
 
10954
    @Override
-
 
10955
    public String toString() {
-
 
10956
      StringBuilder sb = new StringBuilder("deleteCoupon_args(");
-
 
10957
      boolean first = true;
-
 
10958
 
-
 
10959
      sb.append("couponCode:");
-
 
10960
      if (this.couponCode == null) {
-
 
10961
        sb.append("null");
-
 
10962
      } else {
-
 
10963
        sb.append(this.couponCode);
-
 
10964
      }
-
 
10965
      first = false;
-
 
10966
      sb.append(")");
-
 
10967
      return sb.toString();
-
 
10968
    }
-
 
10969
 
-
 
10970
    public void validate() throws org.apache.thrift.TException {
-
 
10971
      // check for required fields
-
 
10972
    }
-
 
10973
 
-
 
10974
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
10975
      try {
-
 
10976
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
10977
      } catch (org.apache.thrift.TException te) {
-
 
10978
        throw new java.io.IOException(te);
-
 
10979
      }
-
 
10980
    }
-
 
10981
 
-
 
10982
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
10983
      try {
-
 
10984
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
10985
      } catch (org.apache.thrift.TException te) {
-
 
10986
        throw new java.io.IOException(te);
-
 
10987
      }
-
 
10988
    }
-
 
10989
 
-
 
10990
  }
-
 
10991
 
-
 
10992
  public static class deleteCoupon_result implements org.apache.thrift.TBase<deleteCoupon_result, deleteCoupon_result._Fields>, java.io.Serializable, Cloneable   {
-
 
10993
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteCoupon_result");
-
 
10994
 
-
 
10995
    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);
-
 
10996
 
-
 
10997
    private PromotionException pex; // required
-
 
10998
 
-
 
10999
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
11000
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
11001
      PEX((short)1, "pex");
-
 
11002
 
-
 
11003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
11004
 
-
 
11005
      static {
-
 
11006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
11007
          byName.put(field.getFieldName(), field);
-
 
11008
        }
-
 
11009
      }
-
 
11010
 
-
 
11011
      /**
-
 
11012
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
11013
       */
-
 
11014
      public static _Fields findByThriftId(int fieldId) {
-
 
11015
        switch(fieldId) {
-
 
11016
          case 1: // PEX
-
 
11017
            return PEX;
-
 
11018
          default:
-
 
11019
            return null;
-
 
11020
        }
-
 
11021
      }
-
 
11022
 
-
 
11023
      /**
-
 
11024
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
11025
       * if it is not found.
-
 
11026
       */
-
 
11027
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
11028
        _Fields fields = findByThriftId(fieldId);
-
 
11029
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
11030
        return fields;
-
 
11031
      }
-
 
11032
 
-
 
11033
      /**
-
 
11034
       * Find the _Fields constant that matches name, or null if its not found.
-
 
11035
       */
-
 
11036
      public static _Fields findByName(String name) {
-
 
11037
        return byName.get(name);
-
 
11038
      }
-
 
11039
 
-
 
11040
      private final short _thriftId;
-
 
11041
      private final String _fieldName;
-
 
11042
 
-
 
11043
      _Fields(short thriftId, String fieldName) {
-
 
11044
        _thriftId = thriftId;
-
 
11045
        _fieldName = fieldName;
-
 
11046
      }
-
 
11047
 
-
 
11048
      public short getThriftFieldId() {
-
 
11049
        return _thriftId;
-
 
11050
      }
-
 
11051
 
-
 
11052
      public String getFieldName() {
-
 
11053
        return _fieldName;
-
 
11054
      }
-
 
11055
    }
-
 
11056
 
-
 
11057
    // isset id assignments
-
 
11058
 
-
 
11059
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
11060
    static {
-
 
11061
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
11062
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
11063
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
11064
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
11065
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteCoupon_result.class, metaDataMap);
-
 
11066
    }
-
 
11067
 
-
 
11068
    public deleteCoupon_result() {
-
 
11069
    }
-
 
11070
 
-
 
11071
    public deleteCoupon_result(
-
 
11072
      PromotionException pex)
-
 
11073
    {
-
 
11074
      this();
-
 
11075
      this.pex = pex;
-
 
11076
    }
-
 
11077
 
-
 
11078
    /**
-
 
11079
     * Performs a deep copy on <i>other</i>.
-
 
11080
     */
-
 
11081
    public deleteCoupon_result(deleteCoupon_result other) {
-
 
11082
      if (other.isSetPex()) {
-
 
11083
        this.pex = new PromotionException(other.pex);
-
 
11084
      }
-
 
11085
    }
-
 
11086
 
-
 
11087
    public deleteCoupon_result deepCopy() {
-
 
11088
      return new deleteCoupon_result(this);
-
 
11089
    }
-
 
11090
 
-
 
11091
    @Override
-
 
11092
    public void clear() {
-
 
11093
      this.pex = null;
-
 
11094
    }
-
 
11095
 
-
 
11096
    public PromotionException getPex() {
-
 
11097
      return this.pex;
-
 
11098
    }
-
 
11099
 
-
 
11100
    public void setPex(PromotionException pex) {
-
 
11101
      this.pex = pex;
-
 
11102
    }
-
 
11103
 
-
 
11104
    public void unsetPex() {
-
 
11105
      this.pex = null;
-
 
11106
    }
-
 
11107
 
-
 
11108
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
-
 
11109
    public boolean isSetPex() {
-
 
11110
      return this.pex != null;
-
 
11111
    }
-
 
11112
 
-
 
11113
    public void setPexIsSet(boolean value) {
-
 
11114
      if (!value) {
-
 
11115
        this.pex = null;
-
 
11116
      }
-
 
11117
    }
-
 
11118
 
-
 
11119
    public void setFieldValue(_Fields field, Object value) {
-
 
11120
      switch (field) {
-
 
11121
      case PEX:
-
 
11122
        if (value == null) {
-
 
11123
          unsetPex();
-
 
11124
        } else {
-
 
11125
          setPex((PromotionException)value);
-
 
11126
        }
-
 
11127
        break;
-
 
11128
 
-
 
11129
      }
-
 
11130
    }
-
 
11131
 
-
 
11132
    public Object getFieldValue(_Fields field) {
-
 
11133
      switch (field) {
-
 
11134
      case PEX:
-
 
11135
        return getPex();
-
 
11136
 
-
 
11137
      }
-
 
11138
      throw new IllegalStateException();
-
 
11139
    }
-
 
11140
 
-
 
11141
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
11142
    public boolean isSet(_Fields field) {
-
 
11143
      if (field == null) {
-
 
11144
        throw new IllegalArgumentException();
-
 
11145
      }
-
 
11146
 
-
 
11147
      switch (field) {
-
 
11148
      case PEX:
-
 
11149
        return isSetPex();
-
 
11150
      }
-
 
11151
      throw new IllegalStateException();
-
 
11152
    }
-
 
11153
 
-
 
11154
    @Override
-
 
11155
    public boolean equals(Object that) {
-
 
11156
      if (that == null)
-
 
11157
        return false;
-
 
11158
      if (that instanceof deleteCoupon_result)
-
 
11159
        return this.equals((deleteCoupon_result)that);
-
 
11160
      return false;
-
 
11161
    }
-
 
11162
 
-
 
11163
    public boolean equals(deleteCoupon_result that) {
-
 
11164
      if (that == null)
-
 
11165
        return false;
-
 
11166
 
-
 
11167
      boolean this_present_pex = true && this.isSetPex();
-
 
11168
      boolean that_present_pex = true && that.isSetPex();
-
 
11169
      if (this_present_pex || that_present_pex) {
-
 
11170
        if (!(this_present_pex && that_present_pex))
-
 
11171
          return false;
-
 
11172
        if (!this.pex.equals(that.pex))
-
 
11173
          return false;
-
 
11174
      }
-
 
11175
 
-
 
11176
      return true;
-
 
11177
    }
-
 
11178
 
-
 
11179
    @Override
-
 
11180
    public int hashCode() {
-
 
11181
      return 0;
-
 
11182
    }
-
 
11183
 
-
 
11184
    public int compareTo(deleteCoupon_result other) {
-
 
11185
      if (!getClass().equals(other.getClass())) {
-
 
11186
        return getClass().getName().compareTo(other.getClass().getName());
-
 
11187
      }
-
 
11188
 
-
 
11189
      int lastComparison = 0;
-
 
11190
      deleteCoupon_result typedOther = (deleteCoupon_result)other;
-
 
11191
 
-
 
11192
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
-
 
11193
      if (lastComparison != 0) {
-
 
11194
        return lastComparison;
-
 
11195
      }
-
 
11196
      if (isSetPex()) {
-
 
11197
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
-
 
11198
        if (lastComparison != 0) {
-
 
11199
          return lastComparison;
-
 
11200
        }
-
 
11201
      }
-
 
11202
      return 0;
-
 
11203
    }
-
 
11204
 
-
 
11205
    public _Fields fieldForId(int fieldId) {
-
 
11206
      return _Fields.findByThriftId(fieldId);
-
 
11207
    }
-
 
11208
 
-
 
11209
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
11210
      org.apache.thrift.protocol.TField field;
-
 
11211
      iprot.readStructBegin();
-
 
11212
      while (true)
-
 
11213
      {
-
 
11214
        field = iprot.readFieldBegin();
-
 
11215
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
11216
          break;
-
 
11217
        }
-
 
11218
        switch (field.id) {
-
 
11219
          case 1: // PEX
-
 
11220
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
11221
              this.pex = new PromotionException();
-
 
11222
              this.pex.read(iprot);
-
 
11223
            } else { 
-
 
11224
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11225
            }
-
 
11226
            break;
-
 
11227
          default:
-
 
11228
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
11229
        }
-
 
11230
        iprot.readFieldEnd();
-
 
11231
      }
-
 
11232
      iprot.readStructEnd();
-
 
11233
      validate();
-
 
11234
    }
-
 
11235
 
-
 
11236
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
11237
      oprot.writeStructBegin(STRUCT_DESC);
-
 
11238
 
-
 
11239
      if (this.isSetPex()) {
-
 
11240
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
11241
        this.pex.write(oprot);
-
 
11242
        oprot.writeFieldEnd();
-
 
11243
      }
-
 
11244
      oprot.writeFieldStop();
-
 
11245
      oprot.writeStructEnd();
-
 
11246
    }
-
 
11247
 
-
 
11248
    @Override
-
 
11249
    public String toString() {
-
 
11250
      StringBuilder sb = new StringBuilder("deleteCoupon_result(");
-
 
11251
      boolean first = true;
-
 
11252
 
-
 
11253
      sb.append("pex:");
-
 
11254
      if (this.pex == null) {
-
 
11255
        sb.append("null");
-
 
11256
      } else {
-
 
11257
        sb.append(this.pex);
-
 
11258
      }
-
 
11259
      first = false;
-
 
11260
      sb.append(")");
-
 
11261
      return sb.toString();
-
 
11262
    }
-
 
11263
 
-
 
11264
    public void validate() throws org.apache.thrift.TException {
-
 
11265
      // check for required fields
-
 
11266
    }
-
 
11267
 
-
 
11268
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
11269
      try {
-
 
11270
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
11271
      } catch (org.apache.thrift.TException te) {
-
 
11272
        throw new java.io.IOException(te);
-
 
11273
      }
-
 
11274
    }
-
 
11275
 
-
 
11276
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
11277
      try {
-
 
11278
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
11279
      } catch (org.apache.thrift.TException te) {
-
 
11280
        throw new java.io.IOException(te);
-
 
11281
      }
-
 
11282
    }
-
 
11283
 
-
 
11284
  }
-
 
11285
 
9822
  public static class getActiveCoupons_args implements org.apache.thrift.TBase<getActiveCoupons_args, getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable   {
11286
  public static class getActiveCoupons_args implements org.apache.thrift.TBase<getActiveCoupons_args, getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable   {
9823
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_args");
11287
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_args");
9824
 
11288
 
9825
 
11289
 
9826
 
11290
 
Line 10335... Line 11799...
10335
        }
11799
        }
10336
        switch (field.id) {
11800
        switch (field.id) {
10337
          case 0: // SUCCESS
11801
          case 0: // SUCCESS
10338
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11802
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10339
              {
11803
              {
10340
                org.apache.thrift.protocol.TList _list21 = iprot.readListBegin();
11804
                org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
10341
                this.success = new ArrayList<Coupon>(_list21.size);
11805
                this.success = new ArrayList<Coupon>(_list25.size);
10342
                for (int _i22 = 0; _i22 < _list21.size; ++_i22)
11806
                for (int _i26 = 0; _i26 < _list25.size; ++_i26)
10343
                {
11807
                {
10344
                  Coupon _elem23; // required
11808
                  Coupon _elem27; // required
10345
                  _elem23 = new Coupon();
11809
                  _elem27 = new Coupon();
10346
                  _elem23.read(iprot);
11810
                  _elem27.read(iprot);
10347
                  this.success.add(_elem23);
11811
                  this.success.add(_elem27);
10348
                }
11812
                }
10349
                iprot.readListEnd();
11813
                iprot.readListEnd();
10350
              }
11814
              }
10351
            } else { 
11815
            } else { 
10352
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11816
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 10374... Line 11838...
10374
 
11838
 
10375
      if (this.isSetSuccess()) {
11839
      if (this.isSetSuccess()) {
10376
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11840
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10377
        {
11841
        {
10378
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11842
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10379
          for (Coupon _iter24 : this.success)
11843
          for (Coupon _iter28 : this.success)
10380
          {
11844
          {
10381
            _iter24.write(oprot);
11845
            _iter28.write(oprot);
10382
          }
11846
          }
10383
          oprot.writeListEnd();
11847
          oprot.writeListEnd();
10384
        }
11848
        }
10385
        oprot.writeFieldEnd();
11849
        oprot.writeFieldEnd();
10386
      } else if (this.isSetPex()) {
11850
      } else if (this.isSetPex()) {
Line 13041... Line 14505...
13041
        }
14505
        }
13042
        switch (field.id) {
14506
        switch (field.id) {
13043
          case 1: // ITEM_IDS
14507
          case 1: // ITEM_IDS
13044
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14508
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13045
              {
14509
              {
13046
                org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
14510
                org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
13047
                this.itemIds = new ArrayList<Long>(_list25.size);
14511
                this.itemIds = new ArrayList<Long>(_list29.size);
13048
                for (int _i26 = 0; _i26 < _list25.size; ++_i26)
14512
                for (int _i30 = 0; _i30 < _list29.size; ++_i30)
13049
                {
14513
                {
13050
                  long _elem27; // required
14514
                  long _elem31; // required
13051
                  _elem27 = iprot.readI64();
14515
                  _elem31 = iprot.readI64();
13052
                  this.itemIds.add(_elem27);
14516
                  this.itemIds.add(_elem31);
13053
                }
14517
                }
13054
                iprot.readListEnd();
14518
                iprot.readListEnd();
13055
              }
14519
              }
13056
            } else { 
14520
            } else { 
13057
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14521
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 13072... Line 14536...
13072
      oprot.writeStructBegin(STRUCT_DESC);
14536
      oprot.writeStructBegin(STRUCT_DESC);
13073
      if (this.itemIds != null) {
14537
      if (this.itemIds != null) {
13074
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
14538
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
13075
        {
14539
        {
13076
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
14540
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
13077
          for (long _iter28 : this.itemIds)
14541
          for (long _iter32 : this.itemIds)
13078
          {
14542
          {
13079
            oprot.writeI64(_iter28);
14543
            oprot.writeI64(_iter32);
13080
          }
14544
          }
13081
          oprot.writeListEnd();
14545
          oprot.writeListEnd();
13082
        }
14546
        }
13083
        oprot.writeFieldEnd();
14547
        oprot.writeFieldEnd();
13084
      }
14548
      }
Line 13440... Line 14904...
13440
        }
14904
        }
13441
        switch (field.id) {
14905
        switch (field.id) {
13442
          case 0: // SUCCESS
14906
          case 0: // SUCCESS
13443
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14907
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13444
              {
14908
              {
13445
                org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
14909
                org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
13446
                this.success = new ArrayList<ItemCouponDiscount>(_list29.size);
14910
                this.success = new ArrayList<ItemCouponDiscount>(_list33.size);
13447
                for (int _i30 = 0; _i30 < _list29.size; ++_i30)
14911
                for (int _i34 = 0; _i34 < _list33.size; ++_i34)
13448
                {
14912
                {
13449
                  ItemCouponDiscount _elem31; // required
14913
                  ItemCouponDiscount _elem35; // required
13450
                  _elem31 = new ItemCouponDiscount();
14914
                  _elem35 = new ItemCouponDiscount();
13451
                  _elem31.read(iprot);
14915
                  _elem35.read(iprot);
13452
                  this.success.add(_elem31);
14916
                  this.success.add(_elem35);
13453
                }
14917
                }
13454
                iprot.readListEnd();
14918
                iprot.readListEnd();
13455
              }
14919
              }
13456
            } else { 
14920
            } else { 
13457
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14921
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 13479... Line 14943...
13479
 
14943
 
13480
      if (this.isSetSuccess()) {
14944
      if (this.isSetSuccess()) {
13481
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14945
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13482
        {
14946
        {
13483
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
14947
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13484
          for (ItemCouponDiscount _iter32 : this.success)
14948
          for (ItemCouponDiscount _iter36 : this.success)
13485
          {
14949
          {
13486
            _iter32.write(oprot);
14950
            _iter36.write(oprot);
13487
          }
14951
          }
13488
          oprot.writeListEnd();
14952
          oprot.writeListEnd();
13489
        }
14953
        }
13490
        oprot.writeFieldEnd();
14954
        oprot.writeFieldEnd();
13491
      } else if (this.isSetPex()) {
14955
      } else if (this.isSetPex()) {
Line 14090... Line 15554...
14090
        }
15554
        }
14091
        switch (field.id) {
15555
        switch (field.id) {
14092
          case 0: // SUCCESS
15556
          case 0: // SUCCESS
14093
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
15557
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
14094
              {
15558
              {
14095
                org.apache.thrift.protocol.TMap _map33 = iprot.readMapBegin();
15559
                org.apache.thrift.protocol.TMap _map37 = iprot.readMapBegin();
14096
                this.success = new HashMap<String,Double>(2*_map33.size);
15560
                this.success = new HashMap<String,Double>(2*_map37.size);
14097
                for (int _i34 = 0; _i34 < _map33.size; ++_i34)
15561
                for (int _i38 = 0; _i38 < _map37.size; ++_i38)
14098
                {
15562
                {
14099
                  String _key35; // required
15563
                  String _key39; // required
14100
                  double _val36; // required
15564
                  double _val40; // required
14101
                  _key35 = iprot.readString();
15565
                  _key39 = iprot.readString();
14102
                  _val36 = iprot.readDouble();
15566
                  _val40 = iprot.readDouble();
14103
                  this.success.put(_key35, _val36);
15567
                  this.success.put(_key39, _val40);
14104
                }
15568
                }
14105
                iprot.readMapEnd();
15569
                iprot.readMapEnd();
14106
              }
15570
              }
14107
            } else { 
15571
            } else { 
14108
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15572
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 14122... Line 15586...
14122
 
15586
 
14123
      if (this.isSetSuccess()) {
15587
      if (this.isSetSuccess()) {
14124
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15588
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14125
        {
15589
        {
14126
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
15590
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
14127
          for (Map.Entry<String, Double> _iter37 : this.success.entrySet())
15591
          for (Map.Entry<String, Double> _iter41 : this.success.entrySet())
14128
          {
15592
          {
14129
            oprot.writeString(_iter37.getKey());
15593
            oprot.writeString(_iter41.getKey());
14130
            oprot.writeDouble(_iter37.getValue());
15594
            oprot.writeDouble(_iter41.getValue());
14131
          }
15595
          }
14132
          oprot.writeMapEnd();
15596
          oprot.writeMapEnd();
14133
        }
15597
        }
14134
        oprot.writeFieldEnd();
15598
        oprot.writeFieldEnd();
14135
      }
15599
      }