Subversion Repositories SmartDukaan

Rev

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

Rev 6736 Rev 7092
Line 53... Line 53...
53
 
53
 
54
    public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException;
54
    public List<Coupon> getActiveCodes(long promotionId) throws PromotionException, org.apache.thrift.TException;
55
 
55
 
56
    public void deleteCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
56
    public void deleteCoupon(String couponCode) throws PromotionException, org.apache.thrift.TException;
57
 
57
 
-
 
58
    public List<Coupon> getAllCouponsByPromotionId(long promotionId) throws PromotionException, org.apache.thrift.TException;
-
 
59
 
58
    /**
60
    /**
59
     * Returns a list of active coupons
61
     * Returns a list of active coupons
60
     */
62
     */
61
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
63
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException;
62
 
64
 
Line 125... Line 127...
125
 
127
 
126
    public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCodes_call> resultHandler) throws org.apache.thrift.TException;
128
    public void getActiveCodes(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCodes_call> resultHandler) throws org.apache.thrift.TException;
127
 
129
 
128
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
130
    public void deleteCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteCoupon_call> resultHandler) throws org.apache.thrift.TException;
129
 
131
 
-
 
132
    public void getAllCouponsByPromotionId(long promotionId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllCouponsByPromotionId_call> resultHandler) throws org.apache.thrift.TException;
-
 
133
 
130
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
134
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException;
131
 
135
 
132
    public void createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
136
    public void createCoupon(long promotionId, String couponCode, String arguments, boolean isCod, String prefix, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createCoupon_call> resultHandler) throws org.apache.thrift.TException;
133
 
137
 
134
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
138
    public void getSuccessfulPaymentCountForCoupon(String couponCode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentCountForCoupon_call> resultHandler) throws org.apache.thrift.TException;
Line 526... Line 530...
526
        throw result.pex;
530
        throw result.pex;
527
      }
531
      }
528
      return;
532
      return;
529
    }
533
    }
530
 
534
 
-
 
535
    public List<Coupon> getAllCouponsByPromotionId(long promotionId) throws PromotionException, org.apache.thrift.TException
-
 
536
    {
-
 
537
      send_getAllCouponsByPromotionId(promotionId);
-
 
538
      return recv_getAllCouponsByPromotionId();
-
 
539
    }
-
 
540
 
-
 
541
    public void send_getAllCouponsByPromotionId(long promotionId) throws org.apache.thrift.TException
-
 
542
    {
-
 
543
      getAllCouponsByPromotionId_args args = new getAllCouponsByPromotionId_args();
-
 
544
      args.setPromotionId(promotionId);
-
 
545
      sendBase("getAllCouponsByPromotionId", args);
-
 
546
    }
-
 
547
 
-
 
548
    public List<Coupon> recv_getAllCouponsByPromotionId() throws PromotionException, org.apache.thrift.TException
-
 
549
    {
-
 
550
      getAllCouponsByPromotionId_result result = new getAllCouponsByPromotionId_result();
-
 
551
      receiveBase(result, "getAllCouponsByPromotionId");
-
 
552
      if (result.isSetSuccess()) {
-
 
553
        return result.success;
-
 
554
      }
-
 
555
      if (result.pex != null) {
-
 
556
        throw result.pex;
-
 
557
      }
-
 
558
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllCouponsByPromotionId failed: unknown result");
-
 
559
    }
-
 
560
 
531
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException
561
    public List<Coupon> getActiveCoupons() throws PromotionException, org.apache.thrift.TException
532
    {
562
    {
533
      send_getActiveCoupons();
563
      send_getActiveCoupons();
534
      return recv_getActiveCoupons();
564
      return recv_getActiveCoupons();
535
    }
565
    }
Line 1242... Line 1272...
1242
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1272
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1243
        (new Client(prot)).recv_deleteCoupon();
1273
        (new Client(prot)).recv_deleteCoupon();
1244
      }
1274
      }
1245
    }
1275
    }
1246
 
1276
 
-
 
1277
    public void getAllCouponsByPromotionId(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getAllCouponsByPromotionId_call> resultHandler) throws org.apache.thrift.TException {
-
 
1278
      checkReady();
-
 
1279
      getAllCouponsByPromotionId_call method_call = new getAllCouponsByPromotionId_call(promotionId, resultHandler, this, ___protocolFactory, ___transport);
-
 
1280
      this.___currentMethod = method_call;
-
 
1281
      ___manager.call(method_call);
-
 
1282
    }
-
 
1283
 
-
 
1284
    public static class getAllCouponsByPromotionId_call extends org.apache.thrift.async.TAsyncMethodCall {
-
 
1285
      private long promotionId;
-
 
1286
      public getAllCouponsByPromotionId_call(long promotionId, org.apache.thrift.async.AsyncMethodCallback<getAllCouponsByPromotionId_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 {
-
 
1287
        super(client, protocolFactory, transport, resultHandler, false);
-
 
1288
        this.promotionId = promotionId;
-
 
1289
      }
-
 
1290
 
-
 
1291
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
-
 
1292
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllCouponsByPromotionId", org.apache.thrift.protocol.TMessageType.CALL, 0));
-
 
1293
        getAllCouponsByPromotionId_args args = new getAllCouponsByPromotionId_args();
-
 
1294
        args.setPromotionId(promotionId);
-
 
1295
        args.write(prot);
-
 
1296
        prot.writeMessageEnd();
-
 
1297
      }
-
 
1298
 
-
 
1299
      public List<Coupon> getResult() throws PromotionException, org.apache.thrift.TException {
-
 
1300
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-
 
1301
          throw new IllegalStateException("Method call not finished!");
-
 
1302
        }
-
 
1303
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
-
 
1304
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
-
 
1305
        return (new Client(prot)).recv_getAllCouponsByPromotionId();
-
 
1306
      }
-
 
1307
    }
-
 
1308
 
1247
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException {
1309
    public void getActiveCoupons(org.apache.thrift.async.AsyncMethodCallback<getActiveCoupons_call> resultHandler) throws org.apache.thrift.TException {
1248
      checkReady();
1310
      checkReady();
1249
      getActiveCoupons_call method_call = new getActiveCoupons_call(resultHandler, this, ___protocolFactory, ___transport);
1311
      getActiveCoupons_call method_call = new getActiveCoupons_call(resultHandler, this, ___protocolFactory, ___transport);
1250
      this.___currentMethod = method_call;
1312
      this.___currentMethod = method_call;
1251
      ___manager.call(method_call);
1313
      ___manager.call(method_call);
Line 1578... Line 1640...
1578
      processMap.put("applyRechargeCoupon", new applyRechargeCoupon());
1640
      processMap.put("applyRechargeCoupon", new applyRechargeCoupon());
1579
      processMap.put("trackCouponUsage", new trackCouponUsage());
1641
      processMap.put("trackCouponUsage", new trackCouponUsage());
1580
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
1642
      processMap.put("getCouponUsageCountByUser", new getCouponUsageCountByUser());
1581
      processMap.put("getActiveCodes", new getActiveCodes());
1643
      processMap.put("getActiveCodes", new getActiveCodes());
1582
      processMap.put("deleteCoupon", new deleteCoupon());
1644
      processMap.put("deleteCoupon", new deleteCoupon());
-
 
1645
      processMap.put("getAllCouponsByPromotionId", new getAllCouponsByPromotionId());
1583
      processMap.put("getActiveCoupons", new getActiveCoupons());
1646
      processMap.put("getActiveCoupons", new getActiveCoupons());
1584
      processMap.put("createCoupon", new createCoupon());
1647
      processMap.put("createCoupon", new createCoupon());
1585
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
1648
      processMap.put("getSuccessfulPaymentCountForCoupon", new getSuccessfulPaymentCountForCoupon());
1586
      processMap.put("getRuleDocString", new getRuleDocString());
1649
      processMap.put("getRuleDocString", new getRuleDocString());
1587
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
1650
      processMap.put("getItemDiscountMap", new getItemDiscountMap());
Line 1873... Line 1936...
1873
        }
1936
        }
1874
        return result;
1937
        return result;
1875
      }
1938
      }
1876
    }
1939
    }
1877
 
1940
 
-
 
1941
    private static class getAllCouponsByPromotionId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllCouponsByPromotionId_args> {
-
 
1942
      public getAllCouponsByPromotionId() {
-
 
1943
        super("getAllCouponsByPromotionId");
-
 
1944
      }
-
 
1945
 
-
 
1946
      protected getAllCouponsByPromotionId_args getEmptyArgsInstance() {
-
 
1947
        return new getAllCouponsByPromotionId_args();
-
 
1948
      }
-
 
1949
 
-
 
1950
      protected getAllCouponsByPromotionId_result getResult(I iface, getAllCouponsByPromotionId_args args) throws org.apache.thrift.TException {
-
 
1951
        getAllCouponsByPromotionId_result result = new getAllCouponsByPromotionId_result();
-
 
1952
        try {
-
 
1953
          result.success = iface.getAllCouponsByPromotionId(args.promotionId);
-
 
1954
        } catch (PromotionException pex) {
-
 
1955
          result.pex = pex;
-
 
1956
        }
-
 
1957
        return result;
-
 
1958
      }
-
 
1959
    }
-
 
1960
 
1878
    private static class getActiveCoupons<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCoupons_args> {
1961
    private static class getActiveCoupons<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActiveCoupons_args> {
1879
      public getActiveCoupons() {
1962
      public getActiveCoupons() {
1880
        super("getActiveCoupons");
1963
        super("getActiveCoupons");
1881
      }
1964
      }
1882
 
1965
 
Line 12079... Line 12162...
12079
      }
12162
      }
12080
    }
12163
    }
12081
 
12164
 
12082
  }
12165
  }
12083
 
12166
 
-
 
12167
  public static class getAllCouponsByPromotionId_args implements org.apache.thrift.TBase<getAllCouponsByPromotionId_args, getAllCouponsByPromotionId_args._Fields>, java.io.Serializable, Cloneable   {
-
 
12168
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCouponsByPromotionId_args");
-
 
12169
 
-
 
12170
    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);
-
 
12171
 
-
 
12172
    private long promotionId; // required
-
 
12173
 
-
 
12174
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12175
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
12176
      PROMOTION_ID((short)1, "promotionId");
-
 
12177
 
-
 
12178
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12179
 
-
 
12180
      static {
-
 
12181
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12182
          byName.put(field.getFieldName(), field);
-
 
12183
        }
-
 
12184
      }
-
 
12185
 
-
 
12186
      /**
-
 
12187
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12188
       */
-
 
12189
      public static _Fields findByThriftId(int fieldId) {
-
 
12190
        switch(fieldId) {
-
 
12191
          case 1: // PROMOTION_ID
-
 
12192
            return PROMOTION_ID;
-
 
12193
          default:
-
 
12194
            return null;
-
 
12195
        }
-
 
12196
      }
-
 
12197
 
-
 
12198
      /**
-
 
12199
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12200
       * if it is not found.
-
 
12201
       */
-
 
12202
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12203
        _Fields fields = findByThriftId(fieldId);
-
 
12204
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12205
        return fields;
-
 
12206
      }
-
 
12207
 
-
 
12208
      /**
-
 
12209
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12210
       */
-
 
12211
      public static _Fields findByName(String name) {
-
 
12212
        return byName.get(name);
-
 
12213
      }
-
 
12214
 
-
 
12215
      private final short _thriftId;
-
 
12216
      private final String _fieldName;
-
 
12217
 
-
 
12218
      _Fields(short thriftId, String fieldName) {
-
 
12219
        _thriftId = thriftId;
-
 
12220
        _fieldName = fieldName;
-
 
12221
      }
-
 
12222
 
-
 
12223
      public short getThriftFieldId() {
-
 
12224
        return _thriftId;
-
 
12225
      }
-
 
12226
 
-
 
12227
      public String getFieldName() {
-
 
12228
        return _fieldName;
-
 
12229
      }
-
 
12230
    }
-
 
12231
 
-
 
12232
    // isset id assignments
-
 
12233
    private static final int __PROMOTIONID_ISSET_ID = 0;
-
 
12234
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
12235
 
-
 
12236
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
12237
    static {
-
 
12238
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
12239
      tmpMap.put(_Fields.PROMOTION_ID, new org.apache.thrift.meta_data.FieldMetaData("promotionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12240
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
-
 
12241
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
12242
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCouponsByPromotionId_args.class, metaDataMap);
-
 
12243
    }
-
 
12244
 
-
 
12245
    public getAllCouponsByPromotionId_args() {
-
 
12246
    }
-
 
12247
 
-
 
12248
    public getAllCouponsByPromotionId_args(
-
 
12249
      long promotionId)
-
 
12250
    {
-
 
12251
      this();
-
 
12252
      this.promotionId = promotionId;
-
 
12253
      setPromotionIdIsSet(true);
-
 
12254
    }
-
 
12255
 
-
 
12256
    /**
-
 
12257
     * Performs a deep copy on <i>other</i>.
-
 
12258
     */
-
 
12259
    public getAllCouponsByPromotionId_args(getAllCouponsByPromotionId_args other) {
-
 
12260
      __isset_bit_vector.clear();
-
 
12261
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
12262
      this.promotionId = other.promotionId;
-
 
12263
    }
-
 
12264
 
-
 
12265
    public getAllCouponsByPromotionId_args deepCopy() {
-
 
12266
      return new getAllCouponsByPromotionId_args(this);
-
 
12267
    }
-
 
12268
 
-
 
12269
    @Override
-
 
12270
    public void clear() {
-
 
12271
      setPromotionIdIsSet(false);
-
 
12272
      this.promotionId = 0;
-
 
12273
    }
-
 
12274
 
-
 
12275
    public long getPromotionId() {
-
 
12276
      return this.promotionId;
-
 
12277
    }
-
 
12278
 
-
 
12279
    public void setPromotionId(long promotionId) {
-
 
12280
      this.promotionId = promotionId;
-
 
12281
      setPromotionIdIsSet(true);
-
 
12282
    }
-
 
12283
 
-
 
12284
    public void unsetPromotionId() {
-
 
12285
      __isset_bit_vector.clear(__PROMOTIONID_ISSET_ID);
-
 
12286
    }
-
 
12287
 
-
 
12288
    /** Returns true if field promotionId is set (has been assigned a value) and false otherwise */
-
 
12289
    public boolean isSetPromotionId() {
-
 
12290
      return __isset_bit_vector.get(__PROMOTIONID_ISSET_ID);
-
 
12291
    }
-
 
12292
 
-
 
12293
    public void setPromotionIdIsSet(boolean value) {
-
 
12294
      __isset_bit_vector.set(__PROMOTIONID_ISSET_ID, value);
-
 
12295
    }
-
 
12296
 
-
 
12297
    public void setFieldValue(_Fields field, Object value) {
-
 
12298
      switch (field) {
-
 
12299
      case PROMOTION_ID:
-
 
12300
        if (value == null) {
-
 
12301
          unsetPromotionId();
-
 
12302
        } else {
-
 
12303
          setPromotionId((Long)value);
-
 
12304
        }
-
 
12305
        break;
-
 
12306
 
-
 
12307
      }
-
 
12308
    }
-
 
12309
 
-
 
12310
    public Object getFieldValue(_Fields field) {
-
 
12311
      switch (field) {
-
 
12312
      case PROMOTION_ID:
-
 
12313
        return Long.valueOf(getPromotionId());
-
 
12314
 
-
 
12315
      }
-
 
12316
      throw new IllegalStateException();
-
 
12317
    }
-
 
12318
 
-
 
12319
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
12320
    public boolean isSet(_Fields field) {
-
 
12321
      if (field == null) {
-
 
12322
        throw new IllegalArgumentException();
-
 
12323
      }
-
 
12324
 
-
 
12325
      switch (field) {
-
 
12326
      case PROMOTION_ID:
-
 
12327
        return isSetPromotionId();
-
 
12328
      }
-
 
12329
      throw new IllegalStateException();
-
 
12330
    }
-
 
12331
 
-
 
12332
    @Override
-
 
12333
    public boolean equals(Object that) {
-
 
12334
      if (that == null)
-
 
12335
        return false;
-
 
12336
      if (that instanceof getAllCouponsByPromotionId_args)
-
 
12337
        return this.equals((getAllCouponsByPromotionId_args)that);
-
 
12338
      return false;
-
 
12339
    }
-
 
12340
 
-
 
12341
    public boolean equals(getAllCouponsByPromotionId_args that) {
-
 
12342
      if (that == null)
-
 
12343
        return false;
-
 
12344
 
-
 
12345
      boolean this_present_promotionId = true;
-
 
12346
      boolean that_present_promotionId = true;
-
 
12347
      if (this_present_promotionId || that_present_promotionId) {
-
 
12348
        if (!(this_present_promotionId && that_present_promotionId))
-
 
12349
          return false;
-
 
12350
        if (this.promotionId != that.promotionId)
-
 
12351
          return false;
-
 
12352
      }
-
 
12353
 
-
 
12354
      return true;
-
 
12355
    }
-
 
12356
 
-
 
12357
    @Override
-
 
12358
    public int hashCode() {
-
 
12359
      return 0;
-
 
12360
    }
-
 
12361
 
-
 
12362
    public int compareTo(getAllCouponsByPromotionId_args other) {
-
 
12363
      if (!getClass().equals(other.getClass())) {
-
 
12364
        return getClass().getName().compareTo(other.getClass().getName());
-
 
12365
      }
-
 
12366
 
-
 
12367
      int lastComparison = 0;
-
 
12368
      getAllCouponsByPromotionId_args typedOther = (getAllCouponsByPromotionId_args)other;
-
 
12369
 
-
 
12370
      lastComparison = Boolean.valueOf(isSetPromotionId()).compareTo(typedOther.isSetPromotionId());
-
 
12371
      if (lastComparison != 0) {
-
 
12372
        return lastComparison;
-
 
12373
      }
-
 
12374
      if (isSetPromotionId()) {
-
 
12375
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promotionId, typedOther.promotionId);
-
 
12376
        if (lastComparison != 0) {
-
 
12377
          return lastComparison;
-
 
12378
        }
-
 
12379
      }
-
 
12380
      return 0;
-
 
12381
    }
-
 
12382
 
-
 
12383
    public _Fields fieldForId(int fieldId) {
-
 
12384
      return _Fields.findByThriftId(fieldId);
-
 
12385
    }
-
 
12386
 
-
 
12387
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
12388
      org.apache.thrift.protocol.TField field;
-
 
12389
      iprot.readStructBegin();
-
 
12390
      while (true)
-
 
12391
      {
-
 
12392
        field = iprot.readFieldBegin();
-
 
12393
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
12394
          break;
-
 
12395
        }
-
 
12396
        switch (field.id) {
-
 
12397
          case 1: // PROMOTION_ID
-
 
12398
            if (field.type == org.apache.thrift.protocol.TType.I64) {
-
 
12399
              this.promotionId = iprot.readI64();
-
 
12400
              setPromotionIdIsSet(true);
-
 
12401
            } else { 
-
 
12402
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12403
            }
-
 
12404
            break;
-
 
12405
          default:
-
 
12406
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12407
        }
-
 
12408
        iprot.readFieldEnd();
-
 
12409
      }
-
 
12410
      iprot.readStructEnd();
-
 
12411
      validate();
-
 
12412
    }
-
 
12413
 
-
 
12414
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
12415
      validate();
-
 
12416
 
-
 
12417
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12418
      oprot.writeFieldBegin(PROMOTION_ID_FIELD_DESC);
-
 
12419
      oprot.writeI64(this.promotionId);
-
 
12420
      oprot.writeFieldEnd();
-
 
12421
      oprot.writeFieldStop();
-
 
12422
      oprot.writeStructEnd();
-
 
12423
    }
-
 
12424
 
-
 
12425
    @Override
-
 
12426
    public String toString() {
-
 
12427
      StringBuilder sb = new StringBuilder("getAllCouponsByPromotionId_args(");
-
 
12428
      boolean first = true;
-
 
12429
 
-
 
12430
      sb.append("promotionId:");
-
 
12431
      sb.append(this.promotionId);
-
 
12432
      first = false;
-
 
12433
      sb.append(")");
-
 
12434
      return sb.toString();
-
 
12435
    }
-
 
12436
 
-
 
12437
    public void validate() throws org.apache.thrift.TException {
-
 
12438
      // check for required fields
-
 
12439
    }
-
 
12440
 
-
 
12441
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
12442
      try {
-
 
12443
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
12444
      } catch (org.apache.thrift.TException te) {
-
 
12445
        throw new java.io.IOException(te);
-
 
12446
      }
-
 
12447
    }
-
 
12448
 
-
 
12449
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
12450
      try {
-
 
12451
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
-
 
12452
        __isset_bit_vector = new BitSet(1);
-
 
12453
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
12454
      } catch (org.apache.thrift.TException te) {
-
 
12455
        throw new java.io.IOException(te);
-
 
12456
      }
-
 
12457
    }
-
 
12458
 
-
 
12459
  }
-
 
12460
 
-
 
12461
  public static class getAllCouponsByPromotionId_result implements org.apache.thrift.TBase<getAllCouponsByPromotionId_result, getAllCouponsByPromotionId_result._Fields>, java.io.Serializable, Cloneable   {
-
 
12462
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllCouponsByPromotionId_result");
-
 
12463
 
-
 
12464
    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);
-
 
12465
    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);
-
 
12466
 
-
 
12467
    private List<Coupon> success; // required
-
 
12468
    private PromotionException pex; // required
-
 
12469
 
-
 
12470
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
12471
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-
 
12472
      SUCCESS((short)0, "success"),
-
 
12473
      PEX((short)1, "pex");
-
 
12474
 
-
 
12475
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
12476
 
-
 
12477
      static {
-
 
12478
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
12479
          byName.put(field.getFieldName(), field);
-
 
12480
        }
-
 
12481
      }
-
 
12482
 
-
 
12483
      /**
-
 
12484
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
12485
       */
-
 
12486
      public static _Fields findByThriftId(int fieldId) {
-
 
12487
        switch(fieldId) {
-
 
12488
          case 0: // SUCCESS
-
 
12489
            return SUCCESS;
-
 
12490
          case 1: // PEX
-
 
12491
            return PEX;
-
 
12492
          default:
-
 
12493
            return null;
-
 
12494
        }
-
 
12495
      }
-
 
12496
 
-
 
12497
      /**
-
 
12498
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
12499
       * if it is not found.
-
 
12500
       */
-
 
12501
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
12502
        _Fields fields = findByThriftId(fieldId);
-
 
12503
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
12504
        return fields;
-
 
12505
      }
-
 
12506
 
-
 
12507
      /**
-
 
12508
       * Find the _Fields constant that matches name, or null if its not found.
-
 
12509
       */
-
 
12510
      public static _Fields findByName(String name) {
-
 
12511
        return byName.get(name);
-
 
12512
      }
-
 
12513
 
-
 
12514
      private final short _thriftId;
-
 
12515
      private final String _fieldName;
-
 
12516
 
-
 
12517
      _Fields(short thriftId, String fieldName) {
-
 
12518
        _thriftId = thriftId;
-
 
12519
        _fieldName = fieldName;
-
 
12520
      }
-
 
12521
 
-
 
12522
      public short getThriftFieldId() {
-
 
12523
        return _thriftId;
-
 
12524
      }
-
 
12525
 
-
 
12526
      public String getFieldName() {
-
 
12527
        return _fieldName;
-
 
12528
      }
-
 
12529
    }
-
 
12530
 
-
 
12531
    // isset id assignments
-
 
12532
 
-
 
12533
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
 
12534
    static {
-
 
12535
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-
 
12536
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12537
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
-
 
12538
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Coupon.class))));
-
 
12539
      tmpMap.put(_Fields.PEX, new org.apache.thrift.meta_data.FieldMetaData("pex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-
 
12540
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
-
 
12541
      metaDataMap = Collections.unmodifiableMap(tmpMap);
-
 
12542
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllCouponsByPromotionId_result.class, metaDataMap);
-
 
12543
    }
-
 
12544
 
-
 
12545
    public getAllCouponsByPromotionId_result() {
-
 
12546
    }
-
 
12547
 
-
 
12548
    public getAllCouponsByPromotionId_result(
-
 
12549
      List<Coupon> success,
-
 
12550
      PromotionException pex)
-
 
12551
    {
-
 
12552
      this();
-
 
12553
      this.success = success;
-
 
12554
      this.pex = pex;
-
 
12555
    }
-
 
12556
 
-
 
12557
    /**
-
 
12558
     * Performs a deep copy on <i>other</i>.
-
 
12559
     */
-
 
12560
    public getAllCouponsByPromotionId_result(getAllCouponsByPromotionId_result other) {
-
 
12561
      if (other.isSetSuccess()) {
-
 
12562
        List<Coupon> __this__success = new ArrayList<Coupon>();
-
 
12563
        for (Coupon other_element : other.success) {
-
 
12564
          __this__success.add(new Coupon(other_element));
-
 
12565
        }
-
 
12566
        this.success = __this__success;
-
 
12567
      }
-
 
12568
      if (other.isSetPex()) {
-
 
12569
        this.pex = new PromotionException(other.pex);
-
 
12570
      }
-
 
12571
    }
-
 
12572
 
-
 
12573
    public getAllCouponsByPromotionId_result deepCopy() {
-
 
12574
      return new getAllCouponsByPromotionId_result(this);
-
 
12575
    }
-
 
12576
 
-
 
12577
    @Override
-
 
12578
    public void clear() {
-
 
12579
      this.success = null;
-
 
12580
      this.pex = null;
-
 
12581
    }
-
 
12582
 
-
 
12583
    public int getSuccessSize() {
-
 
12584
      return (this.success == null) ? 0 : this.success.size();
-
 
12585
    }
-
 
12586
 
-
 
12587
    public java.util.Iterator<Coupon> getSuccessIterator() {
-
 
12588
      return (this.success == null) ? null : this.success.iterator();
-
 
12589
    }
-
 
12590
 
-
 
12591
    public void addToSuccess(Coupon elem) {
-
 
12592
      if (this.success == null) {
-
 
12593
        this.success = new ArrayList<Coupon>();
-
 
12594
      }
-
 
12595
      this.success.add(elem);
-
 
12596
    }
-
 
12597
 
-
 
12598
    public List<Coupon> getSuccess() {
-
 
12599
      return this.success;
-
 
12600
    }
-
 
12601
 
-
 
12602
    public void setSuccess(List<Coupon> success) {
-
 
12603
      this.success = success;
-
 
12604
    }
-
 
12605
 
-
 
12606
    public void unsetSuccess() {
-
 
12607
      this.success = null;
-
 
12608
    }
-
 
12609
 
-
 
12610
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
-
 
12611
    public boolean isSetSuccess() {
-
 
12612
      return this.success != null;
-
 
12613
    }
-
 
12614
 
-
 
12615
    public void setSuccessIsSet(boolean value) {
-
 
12616
      if (!value) {
-
 
12617
        this.success = null;
-
 
12618
      }
-
 
12619
    }
-
 
12620
 
-
 
12621
    public PromotionException getPex() {
-
 
12622
      return this.pex;
-
 
12623
    }
-
 
12624
 
-
 
12625
    public void setPex(PromotionException pex) {
-
 
12626
      this.pex = pex;
-
 
12627
    }
-
 
12628
 
-
 
12629
    public void unsetPex() {
-
 
12630
      this.pex = null;
-
 
12631
    }
-
 
12632
 
-
 
12633
    /** Returns true if field pex is set (has been assigned a value) and false otherwise */
-
 
12634
    public boolean isSetPex() {
-
 
12635
      return this.pex != null;
-
 
12636
    }
-
 
12637
 
-
 
12638
    public void setPexIsSet(boolean value) {
-
 
12639
      if (!value) {
-
 
12640
        this.pex = null;
-
 
12641
      }
-
 
12642
    }
-
 
12643
 
-
 
12644
    public void setFieldValue(_Fields field, Object value) {
-
 
12645
      switch (field) {
-
 
12646
      case SUCCESS:
-
 
12647
        if (value == null) {
-
 
12648
          unsetSuccess();
-
 
12649
        } else {
-
 
12650
          setSuccess((List<Coupon>)value);
-
 
12651
        }
-
 
12652
        break;
-
 
12653
 
-
 
12654
      case PEX:
-
 
12655
        if (value == null) {
-
 
12656
          unsetPex();
-
 
12657
        } else {
-
 
12658
          setPex((PromotionException)value);
-
 
12659
        }
-
 
12660
        break;
-
 
12661
 
-
 
12662
      }
-
 
12663
    }
-
 
12664
 
-
 
12665
    public Object getFieldValue(_Fields field) {
-
 
12666
      switch (field) {
-
 
12667
      case SUCCESS:
-
 
12668
        return getSuccess();
-
 
12669
 
-
 
12670
      case PEX:
-
 
12671
        return getPex();
-
 
12672
 
-
 
12673
      }
-
 
12674
      throw new IllegalStateException();
-
 
12675
    }
-
 
12676
 
-
 
12677
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
-
 
12678
    public boolean isSet(_Fields field) {
-
 
12679
      if (field == null) {
-
 
12680
        throw new IllegalArgumentException();
-
 
12681
      }
-
 
12682
 
-
 
12683
      switch (field) {
-
 
12684
      case SUCCESS:
-
 
12685
        return isSetSuccess();
-
 
12686
      case PEX:
-
 
12687
        return isSetPex();
-
 
12688
      }
-
 
12689
      throw new IllegalStateException();
-
 
12690
    }
-
 
12691
 
-
 
12692
    @Override
-
 
12693
    public boolean equals(Object that) {
-
 
12694
      if (that == null)
-
 
12695
        return false;
-
 
12696
      if (that instanceof getAllCouponsByPromotionId_result)
-
 
12697
        return this.equals((getAllCouponsByPromotionId_result)that);
-
 
12698
      return false;
-
 
12699
    }
-
 
12700
 
-
 
12701
    public boolean equals(getAllCouponsByPromotionId_result that) {
-
 
12702
      if (that == null)
-
 
12703
        return false;
-
 
12704
 
-
 
12705
      boolean this_present_success = true && this.isSetSuccess();
-
 
12706
      boolean that_present_success = true && that.isSetSuccess();
-
 
12707
      if (this_present_success || that_present_success) {
-
 
12708
        if (!(this_present_success && that_present_success))
-
 
12709
          return false;
-
 
12710
        if (!this.success.equals(that.success))
-
 
12711
          return false;
-
 
12712
      }
-
 
12713
 
-
 
12714
      boolean this_present_pex = true && this.isSetPex();
-
 
12715
      boolean that_present_pex = true && that.isSetPex();
-
 
12716
      if (this_present_pex || that_present_pex) {
-
 
12717
        if (!(this_present_pex && that_present_pex))
-
 
12718
          return false;
-
 
12719
        if (!this.pex.equals(that.pex))
-
 
12720
          return false;
-
 
12721
      }
-
 
12722
 
-
 
12723
      return true;
-
 
12724
    }
-
 
12725
 
-
 
12726
    @Override
-
 
12727
    public int hashCode() {
-
 
12728
      return 0;
-
 
12729
    }
-
 
12730
 
-
 
12731
    public int compareTo(getAllCouponsByPromotionId_result other) {
-
 
12732
      if (!getClass().equals(other.getClass())) {
-
 
12733
        return getClass().getName().compareTo(other.getClass().getName());
-
 
12734
      }
-
 
12735
 
-
 
12736
      int lastComparison = 0;
-
 
12737
      getAllCouponsByPromotionId_result typedOther = (getAllCouponsByPromotionId_result)other;
-
 
12738
 
-
 
12739
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
-
 
12740
      if (lastComparison != 0) {
-
 
12741
        return lastComparison;
-
 
12742
      }
-
 
12743
      if (isSetSuccess()) {
-
 
12744
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
-
 
12745
        if (lastComparison != 0) {
-
 
12746
          return lastComparison;
-
 
12747
        }
-
 
12748
      }
-
 
12749
      lastComparison = Boolean.valueOf(isSetPex()).compareTo(typedOther.isSetPex());
-
 
12750
      if (lastComparison != 0) {
-
 
12751
        return lastComparison;
-
 
12752
      }
-
 
12753
      if (isSetPex()) {
-
 
12754
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pex, typedOther.pex);
-
 
12755
        if (lastComparison != 0) {
-
 
12756
          return lastComparison;
-
 
12757
        }
-
 
12758
      }
-
 
12759
      return 0;
-
 
12760
    }
-
 
12761
 
-
 
12762
    public _Fields fieldForId(int fieldId) {
-
 
12763
      return _Fields.findByThriftId(fieldId);
-
 
12764
    }
-
 
12765
 
-
 
12766
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
-
 
12767
      org.apache.thrift.protocol.TField field;
-
 
12768
      iprot.readStructBegin();
-
 
12769
      while (true)
-
 
12770
      {
-
 
12771
        field = iprot.readFieldBegin();
-
 
12772
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
-
 
12773
          break;
-
 
12774
        }
-
 
12775
        switch (field.id) {
-
 
12776
          case 0: // SUCCESS
-
 
12777
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
-
 
12778
              {
-
 
12779
                org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
-
 
12780
                this.success = new ArrayList<Coupon>(_list30.size);
-
 
12781
                for (int _i31 = 0; _i31 < _list30.size; ++_i31)
-
 
12782
                {
-
 
12783
                  Coupon _elem32; // required
-
 
12784
                  _elem32 = new Coupon();
-
 
12785
                  _elem32.read(iprot);
-
 
12786
                  this.success.add(_elem32);
-
 
12787
                }
-
 
12788
                iprot.readListEnd();
-
 
12789
              }
-
 
12790
            } else { 
-
 
12791
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12792
            }
-
 
12793
            break;
-
 
12794
          case 1: // PEX
-
 
12795
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
-
 
12796
              this.pex = new PromotionException();
-
 
12797
              this.pex.read(iprot);
-
 
12798
            } else { 
-
 
12799
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12800
            }
-
 
12801
            break;
-
 
12802
          default:
-
 
12803
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
-
 
12804
        }
-
 
12805
        iprot.readFieldEnd();
-
 
12806
      }
-
 
12807
      iprot.readStructEnd();
-
 
12808
      validate();
-
 
12809
    }
-
 
12810
 
-
 
12811
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
-
 
12812
      oprot.writeStructBegin(STRUCT_DESC);
-
 
12813
 
-
 
12814
      if (this.isSetSuccess()) {
-
 
12815
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
12816
        {
-
 
12817
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
-
 
12818
          for (Coupon _iter33 : this.success)
-
 
12819
          {
-
 
12820
            _iter33.write(oprot);
-
 
12821
          }
-
 
12822
          oprot.writeListEnd();
-
 
12823
        }
-
 
12824
        oprot.writeFieldEnd();
-
 
12825
      } else if (this.isSetPex()) {
-
 
12826
        oprot.writeFieldBegin(PEX_FIELD_DESC);
-
 
12827
        this.pex.write(oprot);
-
 
12828
        oprot.writeFieldEnd();
-
 
12829
      }
-
 
12830
      oprot.writeFieldStop();
-
 
12831
      oprot.writeStructEnd();
-
 
12832
    }
-
 
12833
 
-
 
12834
    @Override
-
 
12835
    public String toString() {
-
 
12836
      StringBuilder sb = new StringBuilder("getAllCouponsByPromotionId_result(");
-
 
12837
      boolean first = true;
-
 
12838
 
-
 
12839
      sb.append("success:");
-
 
12840
      if (this.success == null) {
-
 
12841
        sb.append("null");
-
 
12842
      } else {
-
 
12843
        sb.append(this.success);
-
 
12844
      }
-
 
12845
      first = false;
-
 
12846
      if (!first) sb.append(", ");
-
 
12847
      sb.append("pex:");
-
 
12848
      if (this.pex == null) {
-
 
12849
        sb.append("null");
-
 
12850
      } else {
-
 
12851
        sb.append(this.pex);
-
 
12852
      }
-
 
12853
      first = false;
-
 
12854
      sb.append(")");
-
 
12855
      return sb.toString();
-
 
12856
    }
-
 
12857
 
-
 
12858
    public void validate() throws org.apache.thrift.TException {
-
 
12859
      // check for required fields
-
 
12860
    }
-
 
12861
 
-
 
12862
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
-
 
12863
      try {
-
 
12864
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
-
 
12865
      } catch (org.apache.thrift.TException te) {
-
 
12866
        throw new java.io.IOException(te);
-
 
12867
      }
-
 
12868
    }
-
 
12869
 
-
 
12870
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
-
 
12871
      try {
-
 
12872
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
-
 
12873
      } catch (org.apache.thrift.TException te) {
-
 
12874
        throw new java.io.IOException(te);
-
 
12875
      }
-
 
12876
    }
-
 
12877
 
-
 
12878
  }
-
 
12879
 
12084
  public static class getActiveCoupons_args implements org.apache.thrift.TBase<getActiveCoupons_args, getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable   {
12880
  public static class getActiveCoupons_args implements org.apache.thrift.TBase<getActiveCoupons_args, getActiveCoupons_args._Fields>, java.io.Serializable, Cloneable   {
12085
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_args");
12881
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActiveCoupons_args");
12086
 
12882
 
12087
 
12883
 
12088
 
12884
 
Line 12597... Line 13393...
12597
        }
13393
        }
12598
        switch (field.id) {
13394
        switch (field.id) {
12599
          case 0: // SUCCESS
13395
          case 0: // SUCCESS
12600
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13396
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12601
              {
13397
              {
12602
                org.apache.thrift.protocol.TList _list30 = iprot.readListBegin();
13398
                org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
12603
                this.success = new ArrayList<Coupon>(_list30.size);
13399
                this.success = new ArrayList<Coupon>(_list34.size);
12604
                for (int _i31 = 0; _i31 < _list30.size; ++_i31)
13400
                for (int _i35 = 0; _i35 < _list34.size; ++_i35)
12605
                {
13401
                {
12606
                  Coupon _elem32; // required
13402
                  Coupon _elem36; // required
12607
                  _elem32 = new Coupon();
13403
                  _elem36 = new Coupon();
12608
                  _elem32.read(iprot);
13404
                  _elem36.read(iprot);
12609
                  this.success.add(_elem32);
13405
                  this.success.add(_elem36);
12610
                }
13406
                }
12611
                iprot.readListEnd();
13407
                iprot.readListEnd();
12612
              }
13408
              }
12613
            } else { 
13409
            } else { 
12614
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13410
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 12636... Line 13432...
12636
 
13432
 
12637
      if (this.isSetSuccess()) {
13433
      if (this.isSetSuccess()) {
12638
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13434
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12639
        {
13435
        {
12640
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13436
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12641
          for (Coupon _iter33 : this.success)
13437
          for (Coupon _iter37 : this.success)
12642
          {
13438
          {
12643
            _iter33.write(oprot);
13439
            _iter37.write(oprot);
12644
          }
13440
          }
12645
          oprot.writeListEnd();
13441
          oprot.writeListEnd();
12646
        }
13442
        }
12647
        oprot.writeFieldEnd();
13443
        oprot.writeFieldEnd();
12648
      } else if (this.isSetPex()) {
13444
      } else if (this.isSetPex()) {
Line 15232... Line 16028...
15232
        }
16028
        }
15233
        switch (field.id) {
16029
        switch (field.id) {
15234
          case 1: // ITEM_IDS
16030
          case 1: // ITEM_IDS
15235
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16031
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15236
              {
16032
              {
15237
                org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
16033
                org.apache.thrift.protocol.TList _list38 = iprot.readListBegin();
15238
                this.itemIds = new ArrayList<Long>(_list34.size);
16034
                this.itemIds = new ArrayList<Long>(_list38.size);
15239
                for (int _i35 = 0; _i35 < _list34.size; ++_i35)
16035
                for (int _i39 = 0; _i39 < _list38.size; ++_i39)
15240
                {
16036
                {
15241
                  long _elem36; // required
16037
                  long _elem40; // required
15242
                  _elem36 = iprot.readI64();
16038
                  _elem40 = iprot.readI64();
15243
                  this.itemIds.add(_elem36);
16039
                  this.itemIds.add(_elem40);
15244
                }
16040
                }
15245
                iprot.readListEnd();
16041
                iprot.readListEnd();
15246
              }
16042
              }
15247
            } else { 
16043
            } else { 
15248
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16044
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 15263... Line 16059...
15263
      oprot.writeStructBegin(STRUCT_DESC);
16059
      oprot.writeStructBegin(STRUCT_DESC);
15264
      if (this.itemIds != null) {
16060
      if (this.itemIds != null) {
15265
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
16061
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
15266
        {
16062
        {
15267
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
16063
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
15268
          for (long _iter37 : this.itemIds)
16064
          for (long _iter41 : this.itemIds)
15269
          {
16065
          {
15270
            oprot.writeI64(_iter37);
16066
            oprot.writeI64(_iter41);
15271
          }
16067
          }
15272
          oprot.writeListEnd();
16068
          oprot.writeListEnd();
15273
        }
16069
        }
15274
        oprot.writeFieldEnd();
16070
        oprot.writeFieldEnd();
15275
      }
16071
      }
Line 15631... Line 16427...
15631
        }
16427
        }
15632
        switch (field.id) {
16428
        switch (field.id) {
15633
          case 0: // SUCCESS
16429
          case 0: // SUCCESS
15634
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16430
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15635
              {
16431
              {
15636
                org.apache.thrift.protocol.TList _list38 = iprot.readListBegin();
16432
                org.apache.thrift.protocol.TList _list42 = iprot.readListBegin();
15637
                this.success = new ArrayList<ItemCouponDiscount>(_list38.size);
16433
                this.success = new ArrayList<ItemCouponDiscount>(_list42.size);
15638
                for (int _i39 = 0; _i39 < _list38.size; ++_i39)
16434
                for (int _i43 = 0; _i43 < _list42.size; ++_i43)
15639
                {
16435
                {
15640
                  ItemCouponDiscount _elem40; // required
16436
                  ItemCouponDiscount _elem44; // required
15641
                  _elem40 = new ItemCouponDiscount();
16437
                  _elem44 = new ItemCouponDiscount();
15642
                  _elem40.read(iprot);
16438
                  _elem44.read(iprot);
15643
                  this.success.add(_elem40);
16439
                  this.success.add(_elem44);
15644
                }
16440
                }
15645
                iprot.readListEnd();
16441
                iprot.readListEnd();
15646
              }
16442
              }
15647
            } else { 
16443
            } else { 
15648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16444
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 15670... Line 16466...
15670
 
16466
 
15671
      if (this.isSetSuccess()) {
16467
      if (this.isSetSuccess()) {
15672
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16468
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15673
        {
16469
        {
15674
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
16470
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
15675
          for (ItemCouponDiscount _iter41 : this.success)
16471
          for (ItemCouponDiscount _iter45 : this.success)
15676
          {
16472
          {
15677
            _iter41.write(oprot);
16473
            _iter45.write(oprot);
15678
          }
16474
          }
15679
          oprot.writeListEnd();
16475
          oprot.writeListEnd();
15680
        }
16476
        }
15681
        oprot.writeFieldEnd();
16477
        oprot.writeFieldEnd();
15682
      } else if (this.isSetPex()) {
16478
      } else if (this.isSetPex()) {
Line 16281... Line 17077...
16281
        }
17077
        }
16282
        switch (field.id) {
17078
        switch (field.id) {
16283
          case 0: // SUCCESS
17079
          case 0: // SUCCESS
16284
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
17080
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
16285
              {
17081
              {
16286
                org.apache.thrift.protocol.TMap _map42 = iprot.readMapBegin();
17082
                org.apache.thrift.protocol.TMap _map46 = iprot.readMapBegin();
16287
                this.success = new HashMap<String,Double>(2*_map42.size);
17083
                this.success = new HashMap<String,Double>(2*_map46.size);
16288
                for (int _i43 = 0; _i43 < _map42.size; ++_i43)
17084
                for (int _i47 = 0; _i47 < _map46.size; ++_i47)
16289
                {
17085
                {
16290
                  String _key44; // required
17086
                  String _key48; // required
16291
                  double _val45; // required
17087
                  double _val49; // required
16292
                  _key44 = iprot.readString();
17088
                  _key48 = iprot.readString();
16293
                  _val45 = iprot.readDouble();
17089
                  _val49 = iprot.readDouble();
16294
                  this.success.put(_key44, _val45);
17090
                  this.success.put(_key48, _val49);
16295
                }
17091
                }
16296
                iprot.readMapEnd();
17092
                iprot.readMapEnd();
16297
              }
17093
              }
16298
            } else { 
17094
            } else { 
16299
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17095
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
Line 16313... Line 17109...
16313
 
17109
 
16314
      if (this.isSetSuccess()) {
17110
      if (this.isSetSuccess()) {
16315
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17111
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16316
        {
17112
        {
16317
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
17113
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
16318
          for (Map.Entry<String, Double> _iter46 : this.success.entrySet())
17114
          for (Map.Entry<String, Double> _iter50 : this.success.entrySet())
16319
          {
17115
          {
16320
            oprot.writeString(_iter46.getKey());
17116
            oprot.writeString(_iter50.getKey());
16321
            oprot.writeDouble(_iter46.getValue());
17117
            oprot.writeDouble(_iter50.getValue());
16322
          }
17118
          }
16323
          oprot.writeMapEnd();
17119
          oprot.writeMapEnd();
16324
        }
17120
        }
16325
        oprot.writeFieldEnd();
17121
        oprot.writeFieldEnd();
16326
      }
17122
      }