Subversion Repositories SmartDukaan

Rev

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

Rev 593 Rev 688
Line 86... Line 86...
86
 
86
 
87
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
87
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
88
 
88
 
89
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
89
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
90
 
90
 
-
 
91
    /**
-
 
92
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
-
 
93
     * 
-
 
94
     * @param cartId
-
 
95
     */
91
    public long commitCart(long cartId) throws ShoppingCartException, TException;
96
    public long createOrders(long cartId) throws ShoppingCartException, TException;
92
 
97
 
-
 
98
    /**
-
 
99
     * Validates that:
-
 
100
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
-
 
101
     * 2. None of the lines in the cart for an inactive item.
-
 
102
     * 3. The estimate for any of the lines in cart doesn't change.
-
 
103
     * Returns true only if all three hold.
-
 
104
     * 
-
 
105
     * @param cartId
-
 
106
     */
93
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
107
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
94
 
108
 
-
 
109
    /**
95
    public boolean refreshCart(long cartId) throws ShoppingCartException, TException;
110
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
96
 
111
     * 
-
 
112
     * @param fromCartId
-
 
113
     * @param toCartId
-
 
114
     */
97
    public void mergeCart(long fromCartId, long toCartId) throws TException;
115
    public void mergeCart(long fromCartId, long toCartId) throws TException;
98
 
116
 
-
 
117
    /**
-
 
118
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
-
 
119
     * 
-
 
120
     * @param cartId
-
 
121
     */
-
 
122
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
-
 
123
 
-
 
124
    /**
-
 
125
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
-
 
126
     * This methods removes the specified quantiry of the specified item from the cart.
-
 
127
     * 
-
 
128
     * @param cartId
-
 
129
     * @param items
-
 
130
     */
-
 
131
    public boolean resetCart(long cartId, Map<Long,Long> items) throws ShoppingCartException, TException;
-
 
132
 
99
    public void addWidget(Widget widget) throws WidgetException, TException;
133
    public void addWidget(Widget widget) throws WidgetException, TException;
100
 
134
 
101
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException;
135
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException;
102
 
136
 
103
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException;
137
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException;
Line 1196... Line 1230...
1196
        throw result.scx;
1230
        throw result.scx;
1197
      }
1231
      }
1198
      return;
1232
      return;
1199
    }
1233
    }
1200
 
1234
 
1201
    public long commitCart(long cartId) throws ShoppingCartException, TException
1235
    public long createOrders(long cartId) throws ShoppingCartException, TException
1202
    {
1236
    {
1203
      send_commitCart(cartId);
1237
      send_createOrders(cartId);
1204
      return recv_commitCart();
1238
      return recv_createOrders();
1205
    }
1239
    }
1206
 
1240
 
1207
    public void send_commitCart(long cartId) throws TException
1241
    public void send_createOrders(long cartId) throws TException
1208
    {
1242
    {
1209
      oprot_.writeMessageBegin(new TMessage("commitCart", TMessageType.CALL, seqid_));
1243
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1210
      commitCart_args args = new commitCart_args();
1244
      createOrders_args args = new createOrders_args();
1211
      args.cartId = cartId;
1245
      args.cartId = cartId;
1212
      args.write(oprot_);
1246
      args.write(oprot_);
1213
      oprot_.writeMessageEnd();
1247
      oprot_.writeMessageEnd();
1214
      oprot_.getTransport().flush();
1248
      oprot_.getTransport().flush();
1215
    }
1249
    }
1216
 
1250
 
1217
    public long recv_commitCart() throws ShoppingCartException, TException
1251
    public long recv_createOrders() throws ShoppingCartException, TException
1218
    {
1252
    {
1219
      TMessage msg = iprot_.readMessageBegin();
1253
      TMessage msg = iprot_.readMessageBegin();
1220
      if (msg.type == TMessageType.EXCEPTION) {
1254
      if (msg.type == TMessageType.EXCEPTION) {
1221
        TApplicationException x = TApplicationException.read(iprot_);
1255
        TApplicationException x = TApplicationException.read(iprot_);
1222
        iprot_.readMessageEnd();
1256
        iprot_.readMessageEnd();
1223
        throw x;
1257
        throw x;
1224
      }
1258
      }
1225
      commitCart_result result = new commitCart_result();
1259
      createOrders_result result = new createOrders_result();
1226
      result.read(iprot_);
1260
      result.read(iprot_);
1227
      iprot_.readMessageEnd();
1261
      iprot_.readMessageEnd();
1228
      if (result.isSetSuccess()) {
1262
      if (result.isSetSuccess()) {
1229
        return result.success;
1263
        return result.success;
1230
      }
1264
      }
1231
      if (result.scx != null) {
1265
      if (result.scx != null) {
1232
        throw result.scx;
1266
        throw result.scx;
1233
      }
1267
      }
1234
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "commitCart failed: unknown result");
1268
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
1235
    }
1269
    }
1236
 
1270
 
1237
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
1271
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
1238
    {
1272
    {
1239
      send_validateCart(cartId);
1273
      send_validateCart(cartId);
Line 1268... Line 1302...
1268
        throw result.scex;
1302
        throw result.scex;
1269
      }
1303
      }
1270
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1304
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1271
    }
1305
    }
1272
 
1306
 
1273
    public boolean refreshCart(long cartId) throws ShoppingCartException, TException
1307
    public void mergeCart(long fromCartId, long toCartId) throws TException
-
 
1308
    {
-
 
1309
      send_mergeCart(fromCartId, toCartId);
-
 
1310
      recv_mergeCart();
-
 
1311
    }
-
 
1312
 
-
 
1313
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
-
 
1314
    {
-
 
1315
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
-
 
1316
      mergeCart_args args = new mergeCart_args();
-
 
1317
      args.fromCartId = fromCartId;
-
 
1318
      args.toCartId = toCartId;
-
 
1319
      args.write(oprot_);
-
 
1320
      oprot_.writeMessageEnd();
-
 
1321
      oprot_.getTransport().flush();
-
 
1322
    }
-
 
1323
 
-
 
1324
    public void recv_mergeCart() throws TException
1274
    {
1325
    {
-
 
1326
      TMessage msg = iprot_.readMessageBegin();
-
 
1327
      if (msg.type == TMessageType.EXCEPTION) {
-
 
1328
        TApplicationException x = TApplicationException.read(iprot_);
-
 
1329
        iprot_.readMessageEnd();
-
 
1330
        throw x;
-
 
1331
      }
-
 
1332
      mergeCart_result result = new mergeCart_result();
1275
      send_refreshCart(cartId);
1333
      result.read(iprot_);
1276
      return recv_refreshCart();
1334
      iprot_.readMessageEnd();
-
 
1335
      return;
1277
    }
1336
    }
1278
 
1337
 
1279
    public void send_refreshCart(long cartId) throws TException
1338
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1280
    {
1339
    {
-
 
1340
      send_checkOut(cartId);
-
 
1341
      return recv_checkOut();
-
 
1342
    }
-
 
1343
 
-
 
1344
    public void send_checkOut(long cartId) throws TException
-
 
1345
    {
1281
      oprot_.writeMessageBegin(new TMessage("refreshCart", TMessageType.CALL, seqid_));
1346
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1282
      refreshCart_args args = new refreshCart_args();
1347
      checkOut_args args = new checkOut_args();
1283
      args.cartId = cartId;
1348
      args.cartId = cartId;
1284
      args.write(oprot_);
1349
      args.write(oprot_);
1285
      oprot_.writeMessageEnd();
1350
      oprot_.writeMessageEnd();
1286
      oprot_.getTransport().flush();
1351
      oprot_.getTransport().flush();
1287
    }
1352
    }
1288
 
1353
 
1289
    public boolean recv_refreshCart() throws ShoppingCartException, TException
1354
    public boolean recv_checkOut() throws ShoppingCartException, TException
1290
    {
1355
    {
1291
      TMessage msg = iprot_.readMessageBegin();
1356
      TMessage msg = iprot_.readMessageBegin();
1292
      if (msg.type == TMessageType.EXCEPTION) {
1357
      if (msg.type == TMessageType.EXCEPTION) {
1293
        TApplicationException x = TApplicationException.read(iprot_);
1358
        TApplicationException x = TApplicationException.read(iprot_);
1294
        iprot_.readMessageEnd();
1359
        iprot_.readMessageEnd();
1295
        throw x;
1360
        throw x;
1296
      }
1361
      }
1297
      refreshCart_result result = new refreshCart_result();
1362
      checkOut_result result = new checkOut_result();
1298
      result.read(iprot_);
1363
      result.read(iprot_);
1299
      iprot_.readMessageEnd();
1364
      iprot_.readMessageEnd();
1300
      if (result.isSetSuccess()) {
1365
      if (result.isSetSuccess()) {
1301
        return result.success;
1366
        return result.success;
1302
      }
1367
      }
1303
      if (result.scex != null) {
1368
      if (result.scex != null) {
1304
        throw result.scex;
1369
        throw result.scex;
1305
      }
1370
      }
1306
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "refreshCart failed: unknown result");
1371
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
1307
    }
1372
    }
1308
 
1373
 
1309
    public void mergeCart(long fromCartId, long toCartId) throws TException
1374
    public boolean resetCart(long cartId, Map<Long,Long> items) throws ShoppingCartException, TException
1310
    {
1375
    {
1311
      send_mergeCart(fromCartId, toCartId);
1376
      send_resetCart(cartId, items);
1312
      recv_mergeCart();
1377
      return recv_resetCart();
1313
    }
1378
    }
1314
 
1379
 
1315
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
1380
    public void send_resetCart(long cartId, Map<Long,Long> items) throws TException
1316
    {
1381
    {
1317
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1382
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1318
      mergeCart_args args = new mergeCart_args();
1383
      resetCart_args args = new resetCart_args();
1319
      args.fromCartId = fromCartId;
1384
      args.cartId = cartId;
1320
      args.toCartId = toCartId;
1385
      args.items = items;
1321
      args.write(oprot_);
1386
      args.write(oprot_);
1322
      oprot_.writeMessageEnd();
1387
      oprot_.writeMessageEnd();
1323
      oprot_.getTransport().flush();
1388
      oprot_.getTransport().flush();
1324
    }
1389
    }
1325
 
1390
 
1326
    public void recv_mergeCart() throws TException
1391
    public boolean recv_resetCart() throws ShoppingCartException, TException
1327
    {
1392
    {
1328
      TMessage msg = iprot_.readMessageBegin();
1393
      TMessage msg = iprot_.readMessageBegin();
1329
      if (msg.type == TMessageType.EXCEPTION) {
1394
      if (msg.type == TMessageType.EXCEPTION) {
1330
        TApplicationException x = TApplicationException.read(iprot_);
1395
        TApplicationException x = TApplicationException.read(iprot_);
1331
        iprot_.readMessageEnd();
1396
        iprot_.readMessageEnd();
1332
        throw x;
1397
        throw x;
1333
      }
1398
      }
1334
      mergeCart_result result = new mergeCart_result();
1399
      resetCart_result result = new resetCart_result();
1335
      result.read(iprot_);
1400
      result.read(iprot_);
1336
      iprot_.readMessageEnd();
1401
      iprot_.readMessageEnd();
-
 
1402
      if (result.isSetSuccess()) {
-
 
1403
        return result.success;
1337
      return;
1404
      }
-
 
1405
      if (result.scex != null) {
-
 
1406
        throw result.scex;
-
 
1407
      }
-
 
1408
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
1338
    }
1409
    }
1339
 
1410
 
1340
    public void addWidget(Widget widget) throws WidgetException, TException
1411
    public void addWidget(Widget widget) throws WidgetException, TException
1341
    {
1412
    {
1342
      send_addWidget(widget);
1413
      send_addWidget(widget);
Line 1823... Line 1894...
1823
      processMap_.put("addItemToCart", new addItemToCart());
1894
      processMap_.put("addItemToCart", new addItemToCart());
1824
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1895
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1825
      processMap_.put("changeQuantity", new changeQuantity());
1896
      processMap_.put("changeQuantity", new changeQuantity());
1826
      processMap_.put("changeItemStatus", new changeItemStatus());
1897
      processMap_.put("changeItemStatus", new changeItemStatus());
1827
      processMap_.put("addAddressToCart", new addAddressToCart());
1898
      processMap_.put("addAddressToCart", new addAddressToCart());
1828
      processMap_.put("commitCart", new commitCart());
1899
      processMap_.put("createOrders", new createOrders());
1829
      processMap_.put("validateCart", new validateCart());
1900
      processMap_.put("validateCart", new validateCart());
1830
      processMap_.put("refreshCart", new refreshCart());
-
 
1831
      processMap_.put("mergeCart", new mergeCart());
1901
      processMap_.put("mergeCart", new mergeCart());
-
 
1902
      processMap_.put("checkOut", new checkOut());
-
 
1903
      processMap_.put("resetCart", new resetCart());
1832
      processMap_.put("addWidget", new addWidget());
1904
      processMap_.put("addWidget", new addWidget());
1833
      processMap_.put("addItemToWidget", new addItemToWidget());
1905
      processMap_.put("addItemToWidget", new addItemToWidget());
1834
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1906
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1835
      processMap_.put("updateWidget", new updateWidget());
1907
      processMap_.put("updateWidget", new updateWidget());
1836
      processMap_.put("updateWidgetItem", new updateWidgetItem());
1908
      processMap_.put("updateWidgetItem", new updateWidgetItem());
Line 2690... Line 2762...
2690
        oprot.getTransport().flush();
2762
        oprot.getTransport().flush();
2691
      }
2763
      }
2692
 
2764
 
2693
    }
2765
    }
2694
 
2766
 
2695
    private class commitCart implements ProcessFunction {
2767
    private class createOrders implements ProcessFunction {
2696
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2768
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2697
      {
2769
      {
2698
        commitCart_args args = new commitCart_args();
2770
        createOrders_args args = new createOrders_args();
2699
        args.read(iprot);
2771
        args.read(iprot);
2700
        iprot.readMessageEnd();
2772
        iprot.readMessageEnd();
2701
        commitCart_result result = new commitCart_result();
2773
        createOrders_result result = new createOrders_result();
2702
        try {
2774
        try {
2703
          result.success = iface_.commitCart(args.cartId);
2775
          result.success = iface_.createOrders(args.cartId);
2704
          result.setSuccessIsSet(true);
2776
          result.setSuccessIsSet(true);
2705
        } catch (ShoppingCartException scx) {
2777
        } catch (ShoppingCartException scx) {
2706
          result.scx = scx;
2778
          result.scx = scx;
2707
        } catch (Throwable th) {
2779
        } catch (Throwable th) {
2708
          LOGGER.error("Internal error processing commitCart", th);
2780
          LOGGER.error("Internal error processing createOrders", th);
2709
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing commitCart");
2781
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2710
          oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.EXCEPTION, seqid));
2782
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
2711
          x.write(oprot);
2783
          x.write(oprot);
2712
          oprot.writeMessageEnd();
2784
          oprot.writeMessageEnd();
2713
          oprot.getTransport().flush();
2785
          oprot.getTransport().flush();
2714
          return;
2786
          return;
2715
        }
2787
        }
2716
        oprot.writeMessageBegin(new TMessage("commitCart", TMessageType.REPLY, seqid));
2788
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
2717
        result.write(oprot);
2789
        result.write(oprot);
2718
        oprot.writeMessageEnd();
2790
        oprot.writeMessageEnd();
2719
        oprot.getTransport().flush();
2791
        oprot.getTransport().flush();
2720
      }
2792
      }
2721
 
2793
 
Line 2748... Line 2820...
2748
        oprot.getTransport().flush();
2820
        oprot.getTransport().flush();
2749
      }
2821
      }
2750
 
2822
 
2751
    }
2823
    }
2752
 
2824
 
2753
    private class refreshCart implements ProcessFunction {
2825
    private class mergeCart implements ProcessFunction {
2754
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2826
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2755
      {
2827
      {
2756
        refreshCart_args args = new refreshCart_args();
2828
        mergeCart_args args = new mergeCart_args();
2757
        args.read(iprot);
2829
        args.read(iprot);
2758
        iprot.readMessageEnd();
2830
        iprot.readMessageEnd();
2759
        refreshCart_result result = new refreshCart_result();
2831
        mergeCart_result result = new mergeCart_result();
-
 
2832
        iface_.mergeCart(args.fromCartId, args.toCartId);
-
 
2833
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
-
 
2834
        result.write(oprot);
-
 
2835
        oprot.writeMessageEnd();
-
 
2836
        oprot.getTransport().flush();
-
 
2837
      }
-
 
2838
 
-
 
2839
    }
-
 
2840
 
-
 
2841
    private class checkOut implements ProcessFunction {
-
 
2842
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
2843
      {
-
 
2844
        checkOut_args args = new checkOut_args();
-
 
2845
        args.read(iprot);
-
 
2846
        iprot.readMessageEnd();
-
 
2847
        checkOut_result result = new checkOut_result();
2760
        try {
2848
        try {
2761
          result.success = iface_.refreshCart(args.cartId);
2849
          result.success = iface_.checkOut(args.cartId);
2762
          result.setSuccessIsSet(true);
2850
          result.setSuccessIsSet(true);
2763
        } catch (ShoppingCartException scex) {
2851
        } catch (ShoppingCartException scex) {
2764
          result.scex = scex;
2852
          result.scex = scex;
2765
        } catch (Throwable th) {
2853
        } catch (Throwable th) {
2766
          LOGGER.error("Internal error processing refreshCart", th);
2854
          LOGGER.error("Internal error processing checkOut", th);
2767
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing refreshCart");
2855
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2768
          oprot.writeMessageBegin(new TMessage("refreshCart", TMessageType.EXCEPTION, seqid));
2856
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
2769
          x.write(oprot);
2857
          x.write(oprot);
2770
          oprot.writeMessageEnd();
2858
          oprot.writeMessageEnd();
2771
          oprot.getTransport().flush();
2859
          oprot.getTransport().flush();
2772
          return;
2860
          return;
2773
        }
2861
        }
2774
        oprot.writeMessageBegin(new TMessage("refreshCart", TMessageType.REPLY, seqid));
2862
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
2775
        result.write(oprot);
2863
        result.write(oprot);
2776
        oprot.writeMessageEnd();
2864
        oprot.writeMessageEnd();
2777
        oprot.getTransport().flush();
2865
        oprot.getTransport().flush();
2778
      }
2866
      }
2779
 
2867
 
2780
    }
2868
    }
2781
 
2869
 
2782
    private class mergeCart implements ProcessFunction {
2870
    private class resetCart implements ProcessFunction {
2783
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2871
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2784
      {
2872
      {
2785
        mergeCart_args args = new mergeCart_args();
2873
        resetCart_args args = new resetCart_args();
2786
        args.read(iprot);
2874
        args.read(iprot);
2787
        iprot.readMessageEnd();
2875
        iprot.readMessageEnd();
2788
        mergeCart_result result = new mergeCart_result();
2876
        resetCart_result result = new resetCart_result();
-
 
2877
        try {
2789
        iface_.mergeCart(args.fromCartId, args.toCartId);
2878
          result.success = iface_.resetCart(args.cartId, args.items);
-
 
2879
          result.setSuccessIsSet(true);
-
 
2880
        } catch (ShoppingCartException scex) {
-
 
2881
          result.scex = scex;
-
 
2882
        } catch (Throwable th) {
-
 
2883
          LOGGER.error("Internal error processing resetCart", th);
-
 
2884
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
-
 
2885
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
-
 
2886
          x.write(oprot);
-
 
2887
          oprot.writeMessageEnd();
-
 
2888
          oprot.getTransport().flush();
-
 
2889
          return;
-
 
2890
        }
2790
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2891
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
2791
        result.write(oprot);
2892
        result.write(oprot);
2792
        oprot.writeMessageEnd();
2893
        oprot.writeMessageEnd();
2793
        oprot.getTransport().flush();
2894
        oprot.getTransport().flush();
2794
      }
2895
      }
2795
 
2896
 
Line 23215... Line 23316...
23215
      // check for required fields
23316
      // check for required fields
23216
    }
23317
    }
23217
 
23318
 
23218
  }
23319
  }
23219
 
23320
 
23220
  public static class commitCart_args implements TBase<commitCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_args>   {
23321
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
23221
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_args");
23322
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
23222
 
23323
 
23223
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23324
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23224
 
23325
 
23225
    private long cartId;
23326
    private long cartId;
23226
 
23327
 
Line 23287... Line 23388...
23287
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
23388
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
23288
          new FieldValueMetaData(TType.I64)));
23389
          new FieldValueMetaData(TType.I64)));
23289
    }});
23390
    }});
23290
 
23391
 
23291
    static {
23392
    static {
23292
      FieldMetaData.addStructMetaDataMap(commitCart_args.class, metaDataMap);
23393
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
23293
    }
23394
    }
23294
 
23395
 
23295
    public commitCart_args() {
23396
    public createOrders_args() {
23296
    }
23397
    }
23297
 
23398
 
23298
    public commitCart_args(
23399
    public createOrders_args(
23299
      long cartId)
23400
      long cartId)
23300
    {
23401
    {
23301
      this();
23402
      this();
23302
      this.cartId = cartId;
23403
      this.cartId = cartId;
23303
      setCartIdIsSet(true);
23404
      setCartIdIsSet(true);
23304
    }
23405
    }
23305
 
23406
 
23306
    /**
23407
    /**
23307
     * Performs a deep copy on <i>other</i>.
23408
     * Performs a deep copy on <i>other</i>.
23308
     */
23409
     */
23309
    public commitCart_args(commitCart_args other) {
23410
    public createOrders_args(createOrders_args other) {
23310
      __isset_bit_vector.clear();
23411
      __isset_bit_vector.clear();
23311
      __isset_bit_vector.or(other.__isset_bit_vector);
23412
      __isset_bit_vector.or(other.__isset_bit_vector);
23312
      this.cartId = other.cartId;
23413
      this.cartId = other.cartId;
23313
    }
23414
    }
23314
 
23415
 
23315
    public commitCart_args deepCopy() {
23416
    public createOrders_args deepCopy() {
23316
      return new commitCart_args(this);
23417
      return new createOrders_args(this);
23317
    }
23418
    }
23318
 
23419
 
23319
    @Deprecated
23420
    @Deprecated
23320
    public commitCart_args clone() {
23421
    public createOrders_args clone() {
23321
      return new commitCart_args(this);
23422
      return new createOrders_args(this);
23322
    }
23423
    }
23323
 
23424
 
23324
    public long getCartId() {
23425
    public long getCartId() {
23325
      return this.cartId;
23426
      return this.cartId;
23326
    }
23427
    }
23327
 
23428
 
23328
    public commitCart_args setCartId(long cartId) {
23429
    public createOrders_args setCartId(long cartId) {
23329
      this.cartId = cartId;
23430
      this.cartId = cartId;
23330
      setCartIdIsSet(true);
23431
      setCartIdIsSet(true);
23331
      return this;
23432
      return this;
23332
    }
23433
    }
23333
 
23434
 
Line 23389... Line 23490...
23389
 
23490
 
23390
    @Override
23491
    @Override
23391
    public boolean equals(Object that) {
23492
    public boolean equals(Object that) {
23392
      if (that == null)
23493
      if (that == null)
23393
        return false;
23494
        return false;
23394
      if (that instanceof commitCart_args)
23495
      if (that instanceof createOrders_args)
23395
        return this.equals((commitCart_args)that);
23496
        return this.equals((createOrders_args)that);
23396
      return false;
23497
      return false;
23397
    }
23498
    }
23398
 
23499
 
23399
    public boolean equals(commitCart_args that) {
23500
    public boolean equals(createOrders_args that) {
23400
      if (that == null)
23501
      if (that == null)
23401
        return false;
23502
        return false;
23402
 
23503
 
23403
      boolean this_present_cartId = true;
23504
      boolean this_present_cartId = true;
23404
      boolean that_present_cartId = true;
23505
      boolean that_present_cartId = true;
Line 23415... Line 23516...
23415
    @Override
23516
    @Override
23416
    public int hashCode() {
23517
    public int hashCode() {
23417
      return 0;
23518
      return 0;
23418
    }
23519
    }
23419
 
23520
 
23420
    public int compareTo(commitCart_args other) {
23521
    public int compareTo(createOrders_args other) {
23421
      if (!getClass().equals(other.getClass())) {
23522
      if (!getClass().equals(other.getClass())) {
23422
        return getClass().getName().compareTo(other.getClass().getName());
23523
        return getClass().getName().compareTo(other.getClass().getName());
23423
      }
23524
      }
23424
 
23525
 
23425
      int lastComparison = 0;
23526
      int lastComparison = 0;
23426
      commitCart_args typedOther = (commitCart_args)other;
23527
      createOrders_args typedOther = (createOrders_args)other;
23427
 
23528
 
23428
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
23529
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
23429
      if (lastComparison != 0) {
23530
      if (lastComparison != 0) {
23430
        return lastComparison;
23531
        return lastComparison;
23431
      }
23532
      }
Line 23477... Line 23578...
23477
      oprot.writeStructEnd();
23578
      oprot.writeStructEnd();
23478
    }
23579
    }
23479
 
23580
 
23480
    @Override
23581
    @Override
23481
    public String toString() {
23582
    public String toString() {
23482
      StringBuilder sb = new StringBuilder("commitCart_args(");
23583
      StringBuilder sb = new StringBuilder("createOrders_args(");
23483
      boolean first = true;
23584
      boolean first = true;
23484
 
23585
 
23485
      sb.append("cartId:");
23586
      sb.append("cartId:");
23486
      sb.append(this.cartId);
23587
      sb.append(this.cartId);
23487
      first = false;
23588
      first = false;
Line 23493... Line 23594...
23493
      // check for required fields
23594
      // check for required fields
23494
    }
23595
    }
23495
 
23596
 
23496
  }
23597
  }
23497
 
23598
 
23498
  public static class commitCart_result implements TBase<commitCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<commitCart_result>   {
23599
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
23499
    private static final TStruct STRUCT_DESC = new TStruct("commitCart_result");
23600
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
23500
 
23601
 
23501
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
23602
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
23502
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23603
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23503
 
23604
 
23504
    private long success;
23605
    private long success;
Line 23570... Line 23671...
23570
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23671
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23571
          new FieldValueMetaData(TType.STRUCT)));
23672
          new FieldValueMetaData(TType.STRUCT)));
23572
    }});
23673
    }});
23573
 
23674
 
23574
    static {
23675
    static {
23575
      FieldMetaData.addStructMetaDataMap(commitCart_result.class, metaDataMap);
23676
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
23576
    }
23677
    }
23577
 
23678
 
23578
    public commitCart_result() {
23679
    public createOrders_result() {
23579
    }
23680
    }
23580
 
23681
 
23581
    public commitCart_result(
23682
    public createOrders_result(
23582
      long success,
23683
      long success,
23583
      ShoppingCartException scx)
23684
      ShoppingCartException scx)
23584
    {
23685
    {
23585
      this();
23686
      this();
23586
      this.success = success;
23687
      this.success = success;
Line 23589... Line 23690...
23589
    }
23690
    }
23590
 
23691
 
23591
    /**
23692
    /**
23592
     * Performs a deep copy on <i>other</i>.
23693
     * Performs a deep copy on <i>other</i>.
23593
     */
23694
     */
23594
    public commitCart_result(commitCart_result other) {
23695
    public createOrders_result(createOrders_result other) {
23595
      __isset_bit_vector.clear();
23696
      __isset_bit_vector.clear();
23596
      __isset_bit_vector.or(other.__isset_bit_vector);
23697
      __isset_bit_vector.or(other.__isset_bit_vector);
23597
      this.success = other.success;
23698
      this.success = other.success;
23598
      if (other.isSetScx()) {
23699
      if (other.isSetScx()) {
23599
        this.scx = new ShoppingCartException(other.scx);
23700
        this.scx = new ShoppingCartException(other.scx);
23600
      }
23701
      }
23601
    }
23702
    }
23602
 
23703
 
23603
    public commitCart_result deepCopy() {
23704
    public createOrders_result deepCopy() {
23604
      return new commitCart_result(this);
23705
      return new createOrders_result(this);
23605
    }
23706
    }
23606
 
23707
 
23607
    @Deprecated
23708
    @Deprecated
23608
    public commitCart_result clone() {
23709
    public createOrders_result clone() {
23609
      return new commitCart_result(this);
23710
      return new createOrders_result(this);
23610
    }
23711
    }
23611
 
23712
 
23612
    public long getSuccess() {
23713
    public long getSuccess() {
23613
      return this.success;
23714
      return this.success;
23614
    }
23715
    }
23615
 
23716
 
23616
    public commitCart_result setSuccess(long success) {
23717
    public createOrders_result setSuccess(long success) {
23617
      this.success = success;
23718
      this.success = success;
23618
      setSuccessIsSet(true);
23719
      setSuccessIsSet(true);
23619
      return this;
23720
      return this;
23620
    }
23721
    }
23621
 
23722
 
Line 23634... Line 23735...
23634
 
23735
 
23635
    public ShoppingCartException getScx() {
23736
    public ShoppingCartException getScx() {
23636
      return this.scx;
23737
      return this.scx;
23637
    }
23738
    }
23638
 
23739
 
23639
    public commitCart_result setScx(ShoppingCartException scx) {
23740
    public createOrders_result setScx(ShoppingCartException scx) {
23640
      this.scx = scx;
23741
      this.scx = scx;
23641
      return this;
23742
      return this;
23642
    }
23743
    }
23643
 
23744
 
23644
    public void unsetScx() {
23745
    public void unsetScx() {
Line 23714... Line 23815...
23714
 
23815
 
23715
    @Override
23816
    @Override
23716
    public boolean equals(Object that) {
23817
    public boolean equals(Object that) {
23717
      if (that == null)
23818
      if (that == null)
23718
        return false;
23819
        return false;
23719
      if (that instanceof commitCart_result)
23820
      if (that instanceof createOrders_result)
23720
        return this.equals((commitCart_result)that);
23821
        return this.equals((createOrders_result)that);
23721
      return false;
23822
      return false;
23722
    }
23823
    }
23723
 
23824
 
23724
    public boolean equals(commitCart_result that) {
23825
    public boolean equals(createOrders_result that) {
23725
      if (that == null)
23826
      if (that == null)
23726
        return false;
23827
        return false;
23727
 
23828
 
23728
      boolean this_present_success = true;
23829
      boolean this_present_success = true;
23729
      boolean that_present_success = true;
23830
      boolean that_present_success = true;
Line 23749... Line 23850...
23749
    @Override
23850
    @Override
23750
    public int hashCode() {
23851
    public int hashCode() {
23751
      return 0;
23852
      return 0;
23752
    }
23853
    }
23753
 
23854
 
23754
    public int compareTo(commitCart_result other) {
23855
    public int compareTo(createOrders_result other) {
23755
      if (!getClass().equals(other.getClass())) {
23856
      if (!getClass().equals(other.getClass())) {
23756
        return getClass().getName().compareTo(other.getClass().getName());
23857
        return getClass().getName().compareTo(other.getClass().getName());
23757
      }
23858
      }
23758
 
23859
 
23759
      int lastComparison = 0;
23860
      int lastComparison = 0;
23760
      commitCart_result typedOther = (commitCart_result)other;
23861
      createOrders_result typedOther = (createOrders_result)other;
23761
 
23862
 
23762
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23863
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23763
      if (lastComparison != 0) {
23864
      if (lastComparison != 0) {
23764
        return lastComparison;
23865
        return lastComparison;
23765
      }
23866
      }
Line 23832... Line 23933...
23832
      oprot.writeStructEnd();
23933
      oprot.writeStructEnd();
23833
    }
23934
    }
23834
 
23935
 
23835
    @Override
23936
    @Override
23836
    public String toString() {
23937
    public String toString() {
23837
      StringBuilder sb = new StringBuilder("commitCart_result(");
23938
      StringBuilder sb = new StringBuilder("createOrders_result(");
23838
      boolean first = true;
23939
      boolean first = true;
23839
 
23940
 
23840
      sb.append("success:");
23941
      sb.append("success:");
23841
      sb.append(this.success);
23942
      sb.append(this.success);
23842
      first = false;
23943
      first = false;
Line 24497... Line 24598...
24497
      // check for required fields
24598
      // check for required fields
24498
    }
24599
    }
24499
 
24600
 
24500
  }
24601
  }
24501
 
24602
 
24502
  public static class refreshCart_args implements TBase<refreshCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<refreshCart_args>   {
24603
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
24503
    private static final TStruct STRUCT_DESC = new TStruct("refreshCart_args");
24604
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
-
 
24605
 
-
 
24606
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
-
 
24607
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
-
 
24608
 
-
 
24609
    private long fromCartId;
-
 
24610
    private long toCartId;
-
 
24611
 
-
 
24612
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
24613
    public enum _Fields implements TFieldIdEnum {
-
 
24614
      FROM_CART_ID((short)1, "fromCartId"),
-
 
24615
      TO_CART_ID((short)2, "toCartId");
-
 
24616
 
-
 
24617
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
24618
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
24619
 
-
 
24620
      static {
-
 
24621
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
24622
          byId.put((int)field._thriftId, field);
-
 
24623
          byName.put(field.getFieldName(), field);
-
 
24624
        }
-
 
24625
      }
-
 
24626
 
-
 
24627
      /**
-
 
24628
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
24629
       */
-
 
24630
      public static _Fields findByThriftId(int fieldId) {
-
 
24631
        return byId.get(fieldId);
-
 
24632
      }
-
 
24633
 
-
 
24634
      /**
-
 
24635
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
24636
       * if it is not found.
-
 
24637
       */
-
 
24638
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
24639
        _Fields fields = findByThriftId(fieldId);
-
 
24640
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
24641
        return fields;
-
 
24642
      }
-
 
24643
 
-
 
24644
      /**
-
 
24645
       * Find the _Fields constant that matches name, or null if its not found.
-
 
24646
       */
-
 
24647
      public static _Fields findByName(String name) {
-
 
24648
        return byName.get(name);
-
 
24649
      }
-
 
24650
 
-
 
24651
      private final short _thriftId;
-
 
24652
      private final String _fieldName;
-
 
24653
 
-
 
24654
      _Fields(short thriftId, String fieldName) {
-
 
24655
        _thriftId = thriftId;
-
 
24656
        _fieldName = fieldName;
-
 
24657
      }
-
 
24658
 
-
 
24659
      public short getThriftFieldId() {
-
 
24660
        return _thriftId;
-
 
24661
      }
-
 
24662
 
-
 
24663
      public String getFieldName() {
-
 
24664
        return _fieldName;
-
 
24665
      }
-
 
24666
    }
-
 
24667
 
-
 
24668
    // isset id assignments
-
 
24669
    private static final int __FROMCARTID_ISSET_ID = 0;
-
 
24670
    private static final int __TOCARTID_ISSET_ID = 1;
-
 
24671
    private BitSet __isset_bit_vector = new BitSet(2);
-
 
24672
 
-
 
24673
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
24674
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
-
 
24675
          new FieldValueMetaData(TType.I64)));
-
 
24676
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
-
 
24677
          new FieldValueMetaData(TType.I64)));
-
 
24678
    }});
-
 
24679
 
-
 
24680
    static {
-
 
24681
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
-
 
24682
    }
-
 
24683
 
-
 
24684
    public mergeCart_args() {
-
 
24685
    }
-
 
24686
 
-
 
24687
    public mergeCart_args(
-
 
24688
      long fromCartId,
-
 
24689
      long toCartId)
-
 
24690
    {
-
 
24691
      this();
-
 
24692
      this.fromCartId = fromCartId;
-
 
24693
      setFromCartIdIsSet(true);
-
 
24694
      this.toCartId = toCartId;
-
 
24695
      setToCartIdIsSet(true);
-
 
24696
    }
-
 
24697
 
-
 
24698
    /**
-
 
24699
     * Performs a deep copy on <i>other</i>.
-
 
24700
     */
-
 
24701
    public mergeCart_args(mergeCart_args other) {
-
 
24702
      __isset_bit_vector.clear();
-
 
24703
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
24704
      this.fromCartId = other.fromCartId;
-
 
24705
      this.toCartId = other.toCartId;
-
 
24706
    }
-
 
24707
 
-
 
24708
    public mergeCart_args deepCopy() {
-
 
24709
      return new mergeCart_args(this);
-
 
24710
    }
-
 
24711
 
-
 
24712
    @Deprecated
-
 
24713
    public mergeCart_args clone() {
-
 
24714
      return new mergeCart_args(this);
-
 
24715
    }
-
 
24716
 
-
 
24717
    public long getFromCartId() {
-
 
24718
      return this.fromCartId;
-
 
24719
    }
-
 
24720
 
-
 
24721
    public mergeCart_args setFromCartId(long fromCartId) {
-
 
24722
      this.fromCartId = fromCartId;
-
 
24723
      setFromCartIdIsSet(true);
-
 
24724
      return this;
-
 
24725
    }
-
 
24726
 
-
 
24727
    public void unsetFromCartId() {
-
 
24728
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
-
 
24729
    }
-
 
24730
 
-
 
24731
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
-
 
24732
    public boolean isSetFromCartId() {
-
 
24733
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
-
 
24734
    }
-
 
24735
 
-
 
24736
    public void setFromCartIdIsSet(boolean value) {
-
 
24737
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
-
 
24738
    }
-
 
24739
 
-
 
24740
    public long getToCartId() {
-
 
24741
      return this.toCartId;
-
 
24742
    }
-
 
24743
 
-
 
24744
    public mergeCart_args setToCartId(long toCartId) {
-
 
24745
      this.toCartId = toCartId;
-
 
24746
      setToCartIdIsSet(true);
-
 
24747
      return this;
-
 
24748
    }
-
 
24749
 
-
 
24750
    public void unsetToCartId() {
-
 
24751
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
-
 
24752
    }
-
 
24753
 
-
 
24754
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
-
 
24755
    public boolean isSetToCartId() {
-
 
24756
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
-
 
24757
    }
-
 
24758
 
-
 
24759
    public void setToCartIdIsSet(boolean value) {
-
 
24760
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
-
 
24761
    }
-
 
24762
 
-
 
24763
    public void setFieldValue(_Fields field, Object value) {
-
 
24764
      switch (field) {
-
 
24765
      case FROM_CART_ID:
-
 
24766
        if (value == null) {
-
 
24767
          unsetFromCartId();
-
 
24768
        } else {
-
 
24769
          setFromCartId((Long)value);
-
 
24770
        }
-
 
24771
        break;
-
 
24772
 
-
 
24773
      case TO_CART_ID:
-
 
24774
        if (value == null) {
-
 
24775
          unsetToCartId();
-
 
24776
        } else {
-
 
24777
          setToCartId((Long)value);
-
 
24778
        }
-
 
24779
        break;
-
 
24780
 
-
 
24781
      }
-
 
24782
    }
-
 
24783
 
-
 
24784
    public void setFieldValue(int fieldID, Object value) {
-
 
24785
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
24786
    }
-
 
24787
 
-
 
24788
    public Object getFieldValue(_Fields field) {
-
 
24789
      switch (field) {
-
 
24790
      case FROM_CART_ID:
-
 
24791
        return new Long(getFromCartId());
-
 
24792
 
-
 
24793
      case TO_CART_ID:
-
 
24794
        return new Long(getToCartId());
-
 
24795
 
-
 
24796
      }
-
 
24797
      throw new IllegalStateException();
-
 
24798
    }
-
 
24799
 
-
 
24800
    public Object getFieldValue(int fieldId) {
-
 
24801
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
24802
    }
-
 
24803
 
-
 
24804
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
24805
    public boolean isSet(_Fields field) {
-
 
24806
      switch (field) {
-
 
24807
      case FROM_CART_ID:
-
 
24808
        return isSetFromCartId();
-
 
24809
      case TO_CART_ID:
-
 
24810
        return isSetToCartId();
-
 
24811
      }
-
 
24812
      throw new IllegalStateException();
-
 
24813
    }
-
 
24814
 
-
 
24815
    public boolean isSet(int fieldID) {
-
 
24816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
24817
    }
-
 
24818
 
-
 
24819
    @Override
-
 
24820
    public boolean equals(Object that) {
-
 
24821
      if (that == null)
-
 
24822
        return false;
-
 
24823
      if (that instanceof mergeCart_args)
-
 
24824
        return this.equals((mergeCart_args)that);
-
 
24825
      return false;
-
 
24826
    }
-
 
24827
 
-
 
24828
    public boolean equals(mergeCart_args that) {
-
 
24829
      if (that == null)
-
 
24830
        return false;
-
 
24831
 
-
 
24832
      boolean this_present_fromCartId = true;
-
 
24833
      boolean that_present_fromCartId = true;
-
 
24834
      if (this_present_fromCartId || that_present_fromCartId) {
-
 
24835
        if (!(this_present_fromCartId && that_present_fromCartId))
-
 
24836
          return false;
-
 
24837
        if (this.fromCartId != that.fromCartId)
-
 
24838
          return false;
-
 
24839
      }
-
 
24840
 
-
 
24841
      boolean this_present_toCartId = true;
-
 
24842
      boolean that_present_toCartId = true;
-
 
24843
      if (this_present_toCartId || that_present_toCartId) {
-
 
24844
        if (!(this_present_toCartId && that_present_toCartId))
-
 
24845
          return false;
-
 
24846
        if (this.toCartId != that.toCartId)
-
 
24847
          return false;
-
 
24848
      }
-
 
24849
 
-
 
24850
      return true;
-
 
24851
    }
-
 
24852
 
-
 
24853
    @Override
-
 
24854
    public int hashCode() {
-
 
24855
      return 0;
-
 
24856
    }
-
 
24857
 
-
 
24858
    public int compareTo(mergeCart_args other) {
-
 
24859
      if (!getClass().equals(other.getClass())) {
-
 
24860
        return getClass().getName().compareTo(other.getClass().getName());
-
 
24861
      }
-
 
24862
 
-
 
24863
      int lastComparison = 0;
-
 
24864
      mergeCart_args typedOther = (mergeCart_args)other;
-
 
24865
 
-
 
24866
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
-
 
24867
      if (lastComparison != 0) {
-
 
24868
        return lastComparison;
-
 
24869
      }
-
 
24870
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
-
 
24871
      if (lastComparison != 0) {
-
 
24872
        return lastComparison;
-
 
24873
      }
-
 
24874
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
-
 
24875
      if (lastComparison != 0) {
-
 
24876
        return lastComparison;
-
 
24877
      }
-
 
24878
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
-
 
24879
      if (lastComparison != 0) {
-
 
24880
        return lastComparison;
-
 
24881
      }
-
 
24882
      return 0;
-
 
24883
    }
-
 
24884
 
-
 
24885
    public void read(TProtocol iprot) throws TException {
-
 
24886
      TField field;
-
 
24887
      iprot.readStructBegin();
-
 
24888
      while (true)
-
 
24889
      {
-
 
24890
        field = iprot.readFieldBegin();
-
 
24891
        if (field.type == TType.STOP) { 
-
 
24892
          break;
-
 
24893
        }
-
 
24894
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
24895
        if (fieldId == null) {
-
 
24896
          TProtocolUtil.skip(iprot, field.type);
-
 
24897
        } else {
-
 
24898
          switch (fieldId) {
-
 
24899
            case FROM_CART_ID:
-
 
24900
              if (field.type == TType.I64) {
-
 
24901
                this.fromCartId = iprot.readI64();
-
 
24902
                setFromCartIdIsSet(true);
-
 
24903
              } else { 
-
 
24904
                TProtocolUtil.skip(iprot, field.type);
-
 
24905
              }
-
 
24906
              break;
-
 
24907
            case TO_CART_ID:
-
 
24908
              if (field.type == TType.I64) {
-
 
24909
                this.toCartId = iprot.readI64();
-
 
24910
                setToCartIdIsSet(true);
-
 
24911
              } else { 
-
 
24912
                TProtocolUtil.skip(iprot, field.type);
-
 
24913
              }
-
 
24914
              break;
-
 
24915
          }
-
 
24916
          iprot.readFieldEnd();
-
 
24917
        }
-
 
24918
      }
-
 
24919
      iprot.readStructEnd();
-
 
24920
      validate();
-
 
24921
    }
-
 
24922
 
-
 
24923
    public void write(TProtocol oprot) throws TException {
-
 
24924
      validate();
-
 
24925
 
-
 
24926
      oprot.writeStructBegin(STRUCT_DESC);
-
 
24927
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
-
 
24928
      oprot.writeI64(this.fromCartId);
-
 
24929
      oprot.writeFieldEnd();
-
 
24930
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
-
 
24931
      oprot.writeI64(this.toCartId);
-
 
24932
      oprot.writeFieldEnd();
-
 
24933
      oprot.writeFieldStop();
-
 
24934
      oprot.writeStructEnd();
-
 
24935
    }
-
 
24936
 
-
 
24937
    @Override
-
 
24938
    public String toString() {
-
 
24939
      StringBuilder sb = new StringBuilder("mergeCart_args(");
-
 
24940
      boolean first = true;
-
 
24941
 
-
 
24942
      sb.append("fromCartId:");
-
 
24943
      sb.append(this.fromCartId);
-
 
24944
      first = false;
-
 
24945
      if (!first) sb.append(", ");
-
 
24946
      sb.append("toCartId:");
-
 
24947
      sb.append(this.toCartId);
-
 
24948
      first = false;
-
 
24949
      sb.append(")");
-
 
24950
      return sb.toString();
-
 
24951
    }
-
 
24952
 
-
 
24953
    public void validate() throws TException {
-
 
24954
      // check for required fields
-
 
24955
    }
-
 
24956
 
-
 
24957
  }
-
 
24958
 
-
 
24959
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
-
 
24960
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
-
 
24961
 
-
 
24962
 
-
 
24963
 
-
 
24964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
24965
    public enum _Fields implements TFieldIdEnum {
-
 
24966
;
-
 
24967
 
-
 
24968
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
24969
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
24970
 
-
 
24971
      static {
-
 
24972
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
24973
          byId.put((int)field._thriftId, field);
-
 
24974
          byName.put(field.getFieldName(), field);
-
 
24975
        }
-
 
24976
      }
-
 
24977
 
-
 
24978
      /**
-
 
24979
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
24980
       */
-
 
24981
      public static _Fields findByThriftId(int fieldId) {
-
 
24982
        return byId.get(fieldId);
-
 
24983
      }
-
 
24984
 
-
 
24985
      /**
-
 
24986
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
24987
       * if it is not found.
-
 
24988
       */
-
 
24989
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
24990
        _Fields fields = findByThriftId(fieldId);
-
 
24991
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
24992
        return fields;
-
 
24993
      }
-
 
24994
 
-
 
24995
      /**
-
 
24996
       * Find the _Fields constant that matches name, or null if its not found.
-
 
24997
       */
-
 
24998
      public static _Fields findByName(String name) {
-
 
24999
        return byName.get(name);
-
 
25000
      }
-
 
25001
 
-
 
25002
      private final short _thriftId;
-
 
25003
      private final String _fieldName;
-
 
25004
 
-
 
25005
      _Fields(short thriftId, String fieldName) {
-
 
25006
        _thriftId = thriftId;
-
 
25007
        _fieldName = fieldName;
-
 
25008
      }
-
 
25009
 
-
 
25010
      public short getThriftFieldId() {
-
 
25011
        return _thriftId;
-
 
25012
      }
-
 
25013
 
-
 
25014
      public String getFieldName() {
-
 
25015
        return _fieldName;
-
 
25016
      }
-
 
25017
    }
-
 
25018
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
25019
    }});
-
 
25020
 
-
 
25021
    static {
-
 
25022
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
-
 
25023
    }
-
 
25024
 
-
 
25025
    public mergeCart_result() {
-
 
25026
    }
-
 
25027
 
-
 
25028
    /**
-
 
25029
     * Performs a deep copy on <i>other</i>.
-
 
25030
     */
-
 
25031
    public mergeCart_result(mergeCart_result other) {
-
 
25032
    }
-
 
25033
 
-
 
25034
    public mergeCart_result deepCopy() {
-
 
25035
      return new mergeCart_result(this);
-
 
25036
    }
-
 
25037
 
-
 
25038
    @Deprecated
-
 
25039
    public mergeCart_result clone() {
-
 
25040
      return new mergeCart_result(this);
-
 
25041
    }
-
 
25042
 
-
 
25043
    public void setFieldValue(_Fields field, Object value) {
-
 
25044
      switch (field) {
-
 
25045
      }
-
 
25046
    }
-
 
25047
 
-
 
25048
    public void setFieldValue(int fieldID, Object value) {
-
 
25049
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
25050
    }
-
 
25051
 
-
 
25052
    public Object getFieldValue(_Fields field) {
-
 
25053
      switch (field) {
-
 
25054
      }
-
 
25055
      throw new IllegalStateException();
-
 
25056
    }
-
 
25057
 
-
 
25058
    public Object getFieldValue(int fieldId) {
-
 
25059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
25060
    }
-
 
25061
 
-
 
25062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
25063
    public boolean isSet(_Fields field) {
-
 
25064
      switch (field) {
-
 
25065
      }
-
 
25066
      throw new IllegalStateException();
-
 
25067
    }
-
 
25068
 
-
 
25069
    public boolean isSet(int fieldID) {
-
 
25070
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
25071
    }
-
 
25072
 
-
 
25073
    @Override
-
 
25074
    public boolean equals(Object that) {
-
 
25075
      if (that == null)
-
 
25076
        return false;
-
 
25077
      if (that instanceof mergeCart_result)
-
 
25078
        return this.equals((mergeCart_result)that);
-
 
25079
      return false;
-
 
25080
    }
-
 
25081
 
-
 
25082
    public boolean equals(mergeCart_result that) {
-
 
25083
      if (that == null)
-
 
25084
        return false;
-
 
25085
 
-
 
25086
      return true;
-
 
25087
    }
-
 
25088
 
-
 
25089
    @Override
-
 
25090
    public int hashCode() {
-
 
25091
      return 0;
-
 
25092
    }
-
 
25093
 
-
 
25094
    public int compareTo(mergeCart_result other) {
-
 
25095
      if (!getClass().equals(other.getClass())) {
-
 
25096
        return getClass().getName().compareTo(other.getClass().getName());
-
 
25097
      }
-
 
25098
 
-
 
25099
      int lastComparison = 0;
-
 
25100
      mergeCart_result typedOther = (mergeCart_result)other;
-
 
25101
 
-
 
25102
      return 0;
-
 
25103
    }
-
 
25104
 
-
 
25105
    public void read(TProtocol iprot) throws TException {
-
 
25106
      TField field;
-
 
25107
      iprot.readStructBegin();
-
 
25108
      while (true)
-
 
25109
      {
-
 
25110
        field = iprot.readFieldBegin();
-
 
25111
        if (field.type == TType.STOP) { 
-
 
25112
          break;
-
 
25113
        }
-
 
25114
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
25115
        if (fieldId == null) {
-
 
25116
          TProtocolUtil.skip(iprot, field.type);
-
 
25117
        } else {
-
 
25118
          switch (fieldId) {
-
 
25119
          }
-
 
25120
          iprot.readFieldEnd();
-
 
25121
        }
-
 
25122
      }
-
 
25123
      iprot.readStructEnd();
-
 
25124
      validate();
-
 
25125
    }
-
 
25126
 
-
 
25127
    public void write(TProtocol oprot) throws TException {
-
 
25128
      oprot.writeStructBegin(STRUCT_DESC);
-
 
25129
 
-
 
25130
      oprot.writeFieldStop();
-
 
25131
      oprot.writeStructEnd();
-
 
25132
    }
-
 
25133
 
-
 
25134
    @Override
-
 
25135
    public String toString() {
-
 
25136
      StringBuilder sb = new StringBuilder("mergeCart_result(");
-
 
25137
      boolean first = true;
-
 
25138
 
-
 
25139
      sb.append(")");
-
 
25140
      return sb.toString();
-
 
25141
    }
-
 
25142
 
-
 
25143
    public void validate() throws TException {
-
 
25144
      // check for required fields
-
 
25145
    }
-
 
25146
 
-
 
25147
  }
-
 
25148
 
-
 
25149
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
-
 
25150
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
24504
 
25151
 
24505
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25152
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24506
 
25153
 
24507
    private long cartId;
25154
    private long cartId;
24508
 
25155
 
Line 24569... Line 25216...
24569
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25216
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24570
          new FieldValueMetaData(TType.I64)));
25217
          new FieldValueMetaData(TType.I64)));
24571
    }});
25218
    }});
24572
 
25219
 
24573
    static {
25220
    static {
24574
      FieldMetaData.addStructMetaDataMap(refreshCart_args.class, metaDataMap);
25221
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
24575
    }
25222
    }
24576
 
25223
 
24577
    public refreshCart_args() {
25224
    public checkOut_args() {
24578
    }
25225
    }
24579
 
25226
 
24580
    public refreshCart_args(
25227
    public checkOut_args(
24581
      long cartId)
25228
      long cartId)
24582
    {
25229
    {
24583
      this();
25230
      this();
24584
      this.cartId = cartId;
25231
      this.cartId = cartId;
24585
      setCartIdIsSet(true);
25232
      setCartIdIsSet(true);
24586
    }
25233
    }
24587
 
25234
 
24588
    /**
25235
    /**
24589
     * Performs a deep copy on <i>other</i>.
25236
     * Performs a deep copy on <i>other</i>.
24590
     */
25237
     */
24591
    public refreshCart_args(refreshCart_args other) {
25238
    public checkOut_args(checkOut_args other) {
24592
      __isset_bit_vector.clear();
25239
      __isset_bit_vector.clear();
24593
      __isset_bit_vector.or(other.__isset_bit_vector);
25240
      __isset_bit_vector.or(other.__isset_bit_vector);
24594
      this.cartId = other.cartId;
25241
      this.cartId = other.cartId;
24595
    }
25242
    }
24596
 
25243
 
24597
    public refreshCart_args deepCopy() {
25244
    public checkOut_args deepCopy() {
24598
      return new refreshCart_args(this);
25245
      return new checkOut_args(this);
24599
    }
25246
    }
24600
 
25247
 
24601
    @Deprecated
25248
    @Deprecated
24602
    public refreshCart_args clone() {
25249
    public checkOut_args clone() {
24603
      return new refreshCart_args(this);
25250
      return new checkOut_args(this);
24604
    }
25251
    }
24605
 
25252
 
24606
    public long getCartId() {
25253
    public long getCartId() {
24607
      return this.cartId;
25254
      return this.cartId;
24608
    }
25255
    }
24609
 
25256
 
24610
    public refreshCart_args setCartId(long cartId) {
25257
    public checkOut_args setCartId(long cartId) {
24611
      this.cartId = cartId;
25258
      this.cartId = cartId;
24612
      setCartIdIsSet(true);
25259
      setCartIdIsSet(true);
24613
      return this;
25260
      return this;
24614
    }
25261
    }
24615
 
25262
 
Line 24671... Line 25318...
24671
 
25318
 
24672
    @Override
25319
    @Override
24673
    public boolean equals(Object that) {
25320
    public boolean equals(Object that) {
24674
      if (that == null)
25321
      if (that == null)
24675
        return false;
25322
        return false;
24676
      if (that instanceof refreshCart_args)
25323
      if (that instanceof checkOut_args)
24677
        return this.equals((refreshCart_args)that);
25324
        return this.equals((checkOut_args)that);
24678
      return false;
25325
      return false;
24679
    }
25326
    }
24680
 
25327
 
24681
    public boolean equals(refreshCart_args that) {
25328
    public boolean equals(checkOut_args that) {
24682
      if (that == null)
25329
      if (that == null)
24683
        return false;
25330
        return false;
24684
 
25331
 
24685
      boolean this_present_cartId = true;
25332
      boolean this_present_cartId = true;
24686
      boolean that_present_cartId = true;
25333
      boolean that_present_cartId = true;
Line 24697... Line 25344...
24697
    @Override
25344
    @Override
24698
    public int hashCode() {
25345
    public int hashCode() {
24699
      return 0;
25346
      return 0;
24700
    }
25347
    }
24701
 
25348
 
24702
    public int compareTo(refreshCart_args other) {
25349
    public int compareTo(checkOut_args other) {
24703
      if (!getClass().equals(other.getClass())) {
25350
      if (!getClass().equals(other.getClass())) {
24704
        return getClass().getName().compareTo(other.getClass().getName());
25351
        return getClass().getName().compareTo(other.getClass().getName());
24705
      }
25352
      }
24706
 
25353
 
24707
      int lastComparison = 0;
25354
      int lastComparison = 0;
24708
      refreshCart_args typedOther = (refreshCart_args)other;
25355
      checkOut_args typedOther = (checkOut_args)other;
24709
 
25356
 
24710
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25357
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
24711
      if (lastComparison != 0) {
25358
      if (lastComparison != 0) {
24712
        return lastComparison;
25359
        return lastComparison;
24713
      }
25360
      }
Line 24759... Line 25406...
24759
      oprot.writeStructEnd();
25406
      oprot.writeStructEnd();
24760
    }
25407
    }
24761
 
25408
 
24762
    @Override
25409
    @Override
24763
    public String toString() {
25410
    public String toString() {
24764
      StringBuilder sb = new StringBuilder("refreshCart_args(");
25411
      StringBuilder sb = new StringBuilder("checkOut_args(");
24765
      boolean first = true;
25412
      boolean first = true;
24766
 
25413
 
24767
      sb.append("cartId:");
25414
      sb.append("cartId:");
24768
      sb.append(this.cartId);
25415
      sb.append(this.cartId);
24769
      first = false;
25416
      first = false;
Line 24775... Line 25422...
24775
      // check for required fields
25422
      // check for required fields
24776
    }
25423
    }
24777
 
25424
 
24778
  }
25425
  }
24779
 
25426
 
24780
  public static class refreshCart_result implements TBase<refreshCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<refreshCart_result>   {
25427
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
24781
    private static final TStruct STRUCT_DESC = new TStruct("refreshCart_result");
25428
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
24782
 
25429
 
24783
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
25430
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
24784
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
25431
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
24785
 
25432
 
24786
    private boolean success;
25433
    private boolean success;
Line 24852... Line 25499...
24852
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
25499
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
24853
          new FieldValueMetaData(TType.STRUCT)));
25500
          new FieldValueMetaData(TType.STRUCT)));
24854
    }});
25501
    }});
24855
 
25502
 
24856
    static {
25503
    static {
24857
      FieldMetaData.addStructMetaDataMap(refreshCart_result.class, metaDataMap);
25504
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
24858
    }
25505
    }
24859
 
25506
 
24860
    public refreshCart_result() {
25507
    public checkOut_result() {
24861
    }
25508
    }
24862
 
25509
 
24863
    public refreshCart_result(
25510
    public checkOut_result(
24864
      boolean success,
25511
      boolean success,
24865
      ShoppingCartException scex)
25512
      ShoppingCartException scex)
24866
    {
25513
    {
24867
      this();
25514
      this();
24868
      this.success = success;
25515
      this.success = success;
Line 24871... Line 25518...
24871
    }
25518
    }
24872
 
25519
 
24873
    /**
25520
    /**
24874
     * Performs a deep copy on <i>other</i>.
25521
     * Performs a deep copy on <i>other</i>.
24875
     */
25522
     */
24876
    public refreshCart_result(refreshCart_result other) {
25523
    public checkOut_result(checkOut_result other) {
24877
      __isset_bit_vector.clear();
25524
      __isset_bit_vector.clear();
24878
      __isset_bit_vector.or(other.__isset_bit_vector);
25525
      __isset_bit_vector.or(other.__isset_bit_vector);
24879
      this.success = other.success;
25526
      this.success = other.success;
24880
      if (other.isSetScex()) {
25527
      if (other.isSetScex()) {
24881
        this.scex = new ShoppingCartException(other.scex);
25528
        this.scex = new ShoppingCartException(other.scex);
24882
      }
25529
      }
24883
    }
25530
    }
24884
 
25531
 
24885
    public refreshCart_result deepCopy() {
25532
    public checkOut_result deepCopy() {
24886
      return new refreshCart_result(this);
25533
      return new checkOut_result(this);
24887
    }
25534
    }
24888
 
25535
 
24889
    @Deprecated
25536
    @Deprecated
24890
    public refreshCart_result clone() {
25537
    public checkOut_result clone() {
24891
      return new refreshCart_result(this);
25538
      return new checkOut_result(this);
24892
    }
25539
    }
24893
 
25540
 
24894
    public boolean isSuccess() {
25541
    public boolean isSuccess() {
24895
      return this.success;
25542
      return this.success;
24896
    }
25543
    }
24897
 
25544
 
24898
    public refreshCart_result setSuccess(boolean success) {
25545
    public checkOut_result setSuccess(boolean success) {
24899
      this.success = success;
25546
      this.success = success;
24900
      setSuccessIsSet(true);
25547
      setSuccessIsSet(true);
24901
      return this;
25548
      return this;
24902
    }
25549
    }
24903
 
25550
 
Line 24916... Line 25563...
24916
 
25563
 
24917
    public ShoppingCartException getScex() {
25564
    public ShoppingCartException getScex() {
24918
      return this.scex;
25565
      return this.scex;
24919
    }
25566
    }
24920
 
25567
 
24921
    public refreshCart_result setScex(ShoppingCartException scex) {
25568
    public checkOut_result setScex(ShoppingCartException scex) {
24922
      this.scex = scex;
25569
      this.scex = scex;
24923
      return this;
25570
      return this;
24924
    }
25571
    }
24925
 
25572
 
24926
    public void unsetScex() {
25573
    public void unsetScex() {
Line 24996... Line 25643...
24996
 
25643
 
24997
    @Override
25644
    @Override
24998
    public boolean equals(Object that) {
25645
    public boolean equals(Object that) {
24999
      if (that == null)
25646
      if (that == null)
25000
        return false;
25647
        return false;
25001
      if (that instanceof refreshCart_result)
25648
      if (that instanceof checkOut_result)
25002
        return this.equals((refreshCart_result)that);
25649
        return this.equals((checkOut_result)that);
25003
      return false;
25650
      return false;
25004
    }
25651
    }
25005
 
25652
 
25006
    public boolean equals(refreshCart_result that) {
25653
    public boolean equals(checkOut_result that) {
25007
      if (that == null)
25654
      if (that == null)
25008
        return false;
25655
        return false;
25009
 
25656
 
25010
      boolean this_present_success = true;
25657
      boolean this_present_success = true;
25011
      boolean that_present_success = true;
25658
      boolean that_present_success = true;
Line 25031... Line 25678...
25031
    @Override
25678
    @Override
25032
    public int hashCode() {
25679
    public int hashCode() {
25033
      return 0;
25680
      return 0;
25034
    }
25681
    }
25035
 
25682
 
25036
    public int compareTo(refreshCart_result other) {
25683
    public int compareTo(checkOut_result other) {
25037
      if (!getClass().equals(other.getClass())) {
25684
      if (!getClass().equals(other.getClass())) {
25038
        return getClass().getName().compareTo(other.getClass().getName());
25685
        return getClass().getName().compareTo(other.getClass().getName());
25039
      }
25686
      }
25040
 
25687
 
25041
      int lastComparison = 0;
25688
      int lastComparison = 0;
25042
      refreshCart_result typedOther = (refreshCart_result)other;
25689
      checkOut_result typedOther = (checkOut_result)other;
25043
 
25690
 
25044
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25691
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25045
      if (lastComparison != 0) {
25692
      if (lastComparison != 0) {
25046
        return lastComparison;
25693
        return lastComparison;
25047
      }
25694
      }
Line 25114... Line 25761...
25114
      oprot.writeStructEnd();
25761
      oprot.writeStructEnd();
25115
    }
25762
    }
25116
 
25763
 
25117
    @Override
25764
    @Override
25118
    public String toString() {
25765
    public String toString() {
25119
      StringBuilder sb = new StringBuilder("refreshCart_result(");
25766
      StringBuilder sb = new StringBuilder("checkOut_result(");
25120
      boolean first = true;
25767
      boolean first = true;
25121
 
25768
 
25122
      sb.append("success:");
25769
      sb.append("success:");
25123
      sb.append(this.success);
25770
      sb.append(this.success);
25124
      first = false;
25771
      first = false;
Line 25138... Line 25785...
25138
      // check for required fields
25785
      // check for required fields
25139
    }
25786
    }
25140
 
25787
 
25141
  }
25788
  }
25142
 
25789
 
25143
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
25790
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
25144
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
25791
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
25145
 
25792
 
25146
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
25793
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25147
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
25794
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
25148
 
25795
 
25149
    private long fromCartId;
25796
    private long cartId;
25150
    private long toCartId;
25797
    private Map<Long,Long> items;
25151
 
25798
 
25152
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25153
    public enum _Fields implements TFieldIdEnum {
25800
    public enum _Fields implements TFieldIdEnum {
25154
      FROM_CART_ID((short)1, "fromCartId"),
25801
      CART_ID((short)1, "cartId"),
25155
      TO_CART_ID((short)2, "toCartId");
25802
      ITEMS((short)2, "items");
25156
 
25803
 
25157
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25158
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25159
 
25806
 
25160
      static {
25807
      static {
Line 25204... Line 25851...
25204
        return _fieldName;
25851
        return _fieldName;
25205
      }
25852
      }
25206
    }
25853
    }
25207
 
25854
 
25208
    // isset id assignments
25855
    // isset id assignments
25209
    private static final int __FROMCARTID_ISSET_ID = 0;
-
 
25210
    private static final int __TOCARTID_ISSET_ID = 1;
25856
    private static final int __CARTID_ISSET_ID = 0;
25211
    private BitSet __isset_bit_vector = new BitSet(2);
25857
    private BitSet __isset_bit_vector = new BitSet(1);
25212
 
25858
 
25213
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25859
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25214
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
-
 
25215
          new FieldValueMetaData(TType.I64)));
-
 
25216
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
25860
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25217
          new FieldValueMetaData(TType.I64)));
25861
          new FieldValueMetaData(TType.I64)));
-
 
25862
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
-
 
25863
          new MapMetaData(TType.MAP, 
-
 
25864
              new FieldValueMetaData(TType.I64), 
-
 
25865
              new FieldValueMetaData(TType.I64))));
25218
    }});
25866
    }});
25219
 
25867
 
25220
    static {
25868
    static {
25221
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
25869
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
25222
    }
25870
    }
25223
 
25871
 
25224
    public mergeCart_args() {
25872
    public resetCart_args() {
25225
    }
25873
    }
25226
 
25874
 
25227
    public mergeCart_args(
25875
    public resetCart_args(
25228
      long fromCartId,
25876
      long cartId,
25229
      long toCartId)
25877
      Map<Long,Long> items)
25230
    {
25878
    {
25231
      this();
25879
      this();
25232
      this.fromCartId = fromCartId;
25880
      this.cartId = cartId;
25233
      setFromCartIdIsSet(true);
25881
      setCartIdIsSet(true);
25234
      this.toCartId = toCartId;
25882
      this.items = items;
25235
      setToCartIdIsSet(true);
-
 
25236
    }
25883
    }
25237
 
25884
 
25238
    /**
25885
    /**
25239
     * Performs a deep copy on <i>other</i>.
25886
     * Performs a deep copy on <i>other</i>.
25240
     */
25887
     */
25241
    public mergeCart_args(mergeCart_args other) {
25888
    public resetCart_args(resetCart_args other) {
25242
      __isset_bit_vector.clear();
25889
      __isset_bit_vector.clear();
25243
      __isset_bit_vector.or(other.__isset_bit_vector);
25890
      __isset_bit_vector.or(other.__isset_bit_vector);
25244
      this.fromCartId = other.fromCartId;
25891
      this.cartId = other.cartId;
-
 
25892
      if (other.isSetItems()) {
-
 
25893
        Map<Long,Long> __this__items = new HashMap<Long,Long>();
-
 
25894
        for (Map.Entry<Long, Long> other_element : other.items.entrySet()) {
-
 
25895
 
-
 
25896
          Long other_element_key = other_element.getKey();
-
 
25897
          Long other_element_value = other_element.getValue();
-
 
25898
 
-
 
25899
          Long __this__items_copy_key = other_element_key;
-
 
25900
 
-
 
25901
          Long __this__items_copy_value = other_element_value;
-
 
25902
 
-
 
25903
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
-
 
25904
        }
25245
      this.toCartId = other.toCartId;
25905
        this.items = __this__items;
-
 
25906
      }
25246
    }
25907
    }
25247
 
25908
 
25248
    public mergeCart_args deepCopy() {
25909
    public resetCart_args deepCopy() {
25249
      return new mergeCart_args(this);
25910
      return new resetCart_args(this);
25250
    }
25911
    }
25251
 
25912
 
25252
    @Deprecated
25913
    @Deprecated
25253
    public mergeCart_args clone() {
25914
    public resetCart_args clone() {
25254
      return new mergeCart_args(this);
25915
      return new resetCart_args(this);
25255
    }
25916
    }
25256
 
25917
 
25257
    public long getFromCartId() {
25918
    public long getCartId() {
25258
      return this.fromCartId;
25919
      return this.cartId;
25259
    }
25920
    }
25260
 
25921
 
25261
    public mergeCart_args setFromCartId(long fromCartId) {
25922
    public resetCart_args setCartId(long cartId) {
25262
      this.fromCartId = fromCartId;
25923
      this.cartId = cartId;
25263
      setFromCartIdIsSet(true);
25924
      setCartIdIsSet(true);
25264
      return this;
25925
      return this;
25265
    }
25926
    }
25266
 
25927
 
25267
    public void unsetFromCartId() {
25928
    public void unsetCartId() {
25268
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
25929
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25269
    }
25930
    }
25270
 
25931
 
25271
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
25932
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25272
    public boolean isSetFromCartId() {
25933
    public boolean isSetCartId() {
25273
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
25934
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25274
    }
25935
    }
25275
 
25936
 
25276
    public void setFromCartIdIsSet(boolean value) {
25937
    public void setCartIdIsSet(boolean value) {
25277
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
25938
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25278
    }
25939
    }
25279
 
25940
 
25280
    public long getToCartId() {
25941
    public int getItemsSize() {
25281
      return this.toCartId;
25942
      return (this.items == null) ? 0 : this.items.size();
25282
    }
25943
    }
25283
 
25944
 
25284
    public mergeCart_args setToCartId(long toCartId) {
25945
    public void putToItems(long key, long val) {
-
 
25946
      if (this.items == null) {
-
 
25947
        this.items = new HashMap<Long,Long>();
-
 
25948
      }
25285
      this.toCartId = toCartId;
25949
      this.items.put(key, val);
-
 
25950
    }
-
 
25951
 
-
 
25952
    public Map<Long,Long> getItems() {
25286
      setToCartIdIsSet(true);
25953
      return this.items;
-
 
25954
    }
-
 
25955
 
-
 
25956
    public resetCart_args setItems(Map<Long,Long> items) {
-
 
25957
      this.items = items;
25287
      return this;
25958
      return this;
25288
    }
25959
    }
25289
 
25960
 
25290
    public void unsetToCartId() {
25961
    public void unsetItems() {
25291
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
25962
      this.items = null;
25292
    }
25963
    }
25293
 
25964
 
25294
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
25965
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
25295
    public boolean isSetToCartId() {
25966
    public boolean isSetItems() {
25296
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
25967
      return this.items != null;
25297
    }
25968
    }
25298
 
25969
 
25299
    public void setToCartIdIsSet(boolean value) {
25970
    public void setItemsIsSet(boolean value) {
-
 
25971
      if (!value) {
25300
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
25972
        this.items = null;
-
 
25973
      }
25301
    }
25974
    }
25302
 
25975
 
25303
    public void setFieldValue(_Fields field, Object value) {
25976
    public void setFieldValue(_Fields field, Object value) {
25304
      switch (field) {
25977
      switch (field) {
25305
      case FROM_CART_ID:
25978
      case CART_ID:
25306
        if (value == null) {
25979
        if (value == null) {
25307
          unsetFromCartId();
25980
          unsetCartId();
25308
        } else {
25981
        } else {
25309
          setFromCartId((Long)value);
25982
          setCartId((Long)value);
25310
        }
25983
        }
25311
        break;
25984
        break;
25312
 
25985
 
25313
      case TO_CART_ID:
25986
      case ITEMS:
25314
        if (value == null) {
25987
        if (value == null) {
25315
          unsetToCartId();
25988
          unsetItems();
25316
        } else {
25989
        } else {
25317
          setToCartId((Long)value);
25990
          setItems((Map<Long,Long>)value);
25318
        }
25991
        }
25319
        break;
25992
        break;
25320
 
25993
 
25321
      }
25994
      }
25322
    }
25995
    }
Line 25325... Line 25998...
25325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25998
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25326
    }
25999
    }
25327
 
26000
 
25328
    public Object getFieldValue(_Fields field) {
26001
    public Object getFieldValue(_Fields field) {
25329
      switch (field) {
26002
      switch (field) {
25330
      case FROM_CART_ID:
26003
      case CART_ID:
25331
        return new Long(getFromCartId());
26004
        return new Long(getCartId());
25332
 
26005
 
25333
      case TO_CART_ID:
26006
      case ITEMS:
25334
        return new Long(getToCartId());
26007
        return getItems();
25335
 
26008
 
25336
      }
26009
      }
25337
      throw new IllegalStateException();
26010
      throw new IllegalStateException();
25338
    }
26011
    }
25339
 
26012
 
Line 25342... Line 26015...
25342
    }
26015
    }
25343
 
26016
 
25344
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26017
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25345
    public boolean isSet(_Fields field) {
26018
    public boolean isSet(_Fields field) {
25346
      switch (field) {
26019
      switch (field) {
25347
      case FROM_CART_ID:
26020
      case CART_ID:
25348
        return isSetFromCartId();
26021
        return isSetCartId();
25349
      case TO_CART_ID:
26022
      case ITEMS:
25350
        return isSetToCartId();
26023
        return isSetItems();
25351
      }
26024
      }
25352
      throw new IllegalStateException();
26025
      throw new IllegalStateException();
25353
    }
26026
    }
25354
 
26027
 
25355
    public boolean isSet(int fieldID) {
26028
    public boolean isSet(int fieldID) {
Line 25358... Line 26031...
25358
 
26031
 
25359
    @Override
26032
    @Override
25360
    public boolean equals(Object that) {
26033
    public boolean equals(Object that) {
25361
      if (that == null)
26034
      if (that == null)
25362
        return false;
26035
        return false;
25363
      if (that instanceof mergeCart_args)
26036
      if (that instanceof resetCart_args)
25364
        return this.equals((mergeCart_args)that);
26037
        return this.equals((resetCart_args)that);
25365
      return false;
26038
      return false;
25366
    }
26039
    }
25367
 
26040
 
25368
    public boolean equals(mergeCart_args that) {
26041
    public boolean equals(resetCart_args that) {
25369
      if (that == null)
26042
      if (that == null)
25370
        return false;
26043
        return false;
25371
 
26044
 
25372
      boolean this_present_fromCartId = true;
26045
      boolean this_present_cartId = true;
25373
      boolean that_present_fromCartId = true;
26046
      boolean that_present_cartId = true;
25374
      if (this_present_fromCartId || that_present_fromCartId) {
26047
      if (this_present_cartId || that_present_cartId) {
25375
        if (!(this_present_fromCartId && that_present_fromCartId))
26048
        if (!(this_present_cartId && that_present_cartId))
25376
          return false;
26049
          return false;
25377
        if (this.fromCartId != that.fromCartId)
26050
        if (this.cartId != that.cartId)
25378
          return false;
26051
          return false;
25379
      }
26052
      }
25380
 
26053
 
25381
      boolean this_present_toCartId = true;
26054
      boolean this_present_items = true && this.isSetItems();
25382
      boolean that_present_toCartId = true;
26055
      boolean that_present_items = true && that.isSetItems();
25383
      if (this_present_toCartId || that_present_toCartId) {
26056
      if (this_present_items || that_present_items) {
25384
        if (!(this_present_toCartId && that_present_toCartId))
26057
        if (!(this_present_items && that_present_items))
25385
          return false;
26058
          return false;
25386
        if (this.toCartId != that.toCartId)
26059
        if (!this.items.equals(that.items))
25387
          return false;
26060
          return false;
25388
      }
26061
      }
25389
 
26062
 
25390
      return true;
26063
      return true;
25391
    }
26064
    }
Line 25393... Line 26066...
25393
    @Override
26066
    @Override
25394
    public int hashCode() {
26067
    public int hashCode() {
25395
      return 0;
26068
      return 0;
25396
    }
26069
    }
25397
 
26070
 
25398
    public int compareTo(mergeCart_args other) {
-
 
25399
      if (!getClass().equals(other.getClass())) {
-
 
25400
        return getClass().getName().compareTo(other.getClass().getName());
-
 
25401
      }
-
 
25402
 
-
 
25403
      int lastComparison = 0;
-
 
25404
      mergeCart_args typedOther = (mergeCart_args)other;
-
 
25405
 
-
 
25406
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
-
 
25407
      if (lastComparison != 0) {
-
 
25408
        return lastComparison;
-
 
25409
      }
-
 
25410
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
-
 
25411
      if (lastComparison != 0) {
-
 
25412
        return lastComparison;
-
 
25413
      }
-
 
25414
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
-
 
25415
      if (lastComparison != 0) {
-
 
25416
        return lastComparison;
-
 
25417
      }
-
 
25418
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
-
 
25419
      if (lastComparison != 0) {
-
 
25420
        return lastComparison;
-
 
25421
      }
-
 
25422
      return 0;
-
 
25423
    }
-
 
25424
 
-
 
25425
    public void read(TProtocol iprot) throws TException {
26071
    public void read(TProtocol iprot) throws TException {
25426
      TField field;
26072
      TField field;
25427
      iprot.readStructBegin();
26073
      iprot.readStructBegin();
25428
      while (true)
26074
      while (true)
25429
      {
26075
      {
Line 25434... Line 26080...
25434
        _Fields fieldId = _Fields.findByThriftId(field.id);
26080
        _Fields fieldId = _Fields.findByThriftId(field.id);
25435
        if (fieldId == null) {
26081
        if (fieldId == null) {
25436
          TProtocolUtil.skip(iprot, field.type);
26082
          TProtocolUtil.skip(iprot, field.type);
25437
        } else {
26083
        } else {
25438
          switch (fieldId) {
26084
          switch (fieldId) {
25439
            case FROM_CART_ID:
26085
            case CART_ID:
25440
              if (field.type == TType.I64) {
26086
              if (field.type == TType.I64) {
25441
                this.fromCartId = iprot.readI64();
26087
                this.cartId = iprot.readI64();
25442
                setFromCartIdIsSet(true);
26088
                setCartIdIsSet(true);
25443
              } else { 
26089
              } else { 
25444
                TProtocolUtil.skip(iprot, field.type);
26090
                TProtocolUtil.skip(iprot, field.type);
25445
              }
26091
              }
25446
              break;
26092
              break;
25447
            case TO_CART_ID:
26093
            case ITEMS:
25448
              if (field.type == TType.I64) {
26094
              if (field.type == TType.MAP) {
-
 
26095
                {
-
 
26096
                  TMap _map37 = iprot.readMapBegin();
-
 
26097
                  this.items = new HashMap<Long,Long>(2*_map37.size);
-
 
26098
                  for (int _i38 = 0; _i38 < _map37.size; ++_i38)
-
 
26099
                  {
-
 
26100
                    long _key39;
-
 
26101
                    long _val40;
-
 
26102
                    _key39 = iprot.readI64();
25449
                this.toCartId = iprot.readI64();
26103
                    _val40 = iprot.readI64();
-
 
26104
                    this.items.put(_key39, _val40);
-
 
26105
                  }
25450
                setToCartIdIsSet(true);
26106
                  iprot.readMapEnd();
-
 
26107
                }
25451
              } else { 
26108
              } else { 
25452
                TProtocolUtil.skip(iprot, field.type);
26109
                TProtocolUtil.skip(iprot, field.type);
25453
              }
26110
              }
25454
              break;
26111
              break;
25455
          }
26112
          }
Line 25462... Line 26119...
25462
 
26119
 
25463
    public void write(TProtocol oprot) throws TException {
26120
    public void write(TProtocol oprot) throws TException {
25464
      validate();
26121
      validate();
25465
 
26122
 
25466
      oprot.writeStructBegin(STRUCT_DESC);
26123
      oprot.writeStructBegin(STRUCT_DESC);
25467
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
-
 
25468
      oprot.writeI64(this.fromCartId);
-
 
25469
      oprot.writeFieldEnd();
-
 
25470
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
26124
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25471
      oprot.writeI64(this.toCartId);
26125
      oprot.writeI64(this.cartId);
25472
      oprot.writeFieldEnd();
26126
      oprot.writeFieldEnd();
-
 
26127
      if (this.items != null) {
-
 
26128
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
-
 
26129
        {
-
 
26130
          oprot.writeMapBegin(new TMap(TType.I64, TType.I64, this.items.size()));
-
 
26131
          for (Map.Entry<Long, Long> _iter41 : this.items.entrySet())
-
 
26132
          {
-
 
26133
            oprot.writeI64(_iter41.getKey());
-
 
26134
            oprot.writeI64(_iter41.getValue());
-
 
26135
          }
-
 
26136
          oprot.writeMapEnd();
-
 
26137
        }
-
 
26138
        oprot.writeFieldEnd();
-
 
26139
      }
25473
      oprot.writeFieldStop();
26140
      oprot.writeFieldStop();
25474
      oprot.writeStructEnd();
26141
      oprot.writeStructEnd();
25475
    }
26142
    }
25476
 
26143
 
25477
    @Override
26144
    @Override
25478
    public String toString() {
26145
    public String toString() {
25479
      StringBuilder sb = new StringBuilder("mergeCart_args(");
26146
      StringBuilder sb = new StringBuilder("resetCart_args(");
25480
      boolean first = true;
26147
      boolean first = true;
25481
 
26148
 
25482
      sb.append("fromCartId:");
26149
      sb.append("cartId:");
25483
      sb.append(this.fromCartId);
26150
      sb.append(this.cartId);
25484
      first = false;
26151
      first = false;
25485
      if (!first) sb.append(", ");
26152
      if (!first) sb.append(", ");
25486
      sb.append("toCartId:");
26153
      sb.append("items:");
-
 
26154
      if (this.items == null) {
-
 
26155
        sb.append("null");
-
 
26156
      } else {
25487
      sb.append(this.toCartId);
26157
        sb.append(this.items);
-
 
26158
      }
25488
      first = false;
26159
      first = false;
25489
      sb.append(")");
26160
      sb.append(")");
25490
      return sb.toString();
26161
      return sb.toString();
25491
    }
26162
    }
25492
 
26163
 
Line 25494... Line 26165...
25494
      // check for required fields
26165
      // check for required fields
25495
    }
26166
    }
25496
 
26167
 
25497
  }
26168
  }
25498
 
26169
 
25499
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
26170
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
25500
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
26171
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
25501
 
26172
 
-
 
26173
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
-
 
26174
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
25502
 
26175
 
-
 
26176
    private boolean success;
-
 
26177
    private ShoppingCartException scex;
25503
 
26178
 
25504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26179
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25505
    public enum _Fields implements TFieldIdEnum {
26180
    public enum _Fields implements TFieldIdEnum {
25506
;
-
 
-
 
26181
      SUCCESS((short)0, "success"),
-
 
26182
      SCEX((short)1, "scex");
25507
 
26183
 
25508
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26184
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26185
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25510
 
26186
 
25511
      static {
26187
      static {
Line 25553... Line 26229...
25553
 
26229
 
25554
      public String getFieldName() {
26230
      public String getFieldName() {
25555
        return _fieldName;
26231
        return _fieldName;
25556
      }
26232
      }
25557
    }
26233
    }
-
 
26234
 
-
 
26235
    // isset id assignments
-
 
26236
    private static final int __SUCCESS_ISSET_ID = 0;
-
 
26237
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
26238
 
25558
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26239
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
26240
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
-
 
26241
          new FieldValueMetaData(TType.BOOL)));
-
 
26242
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
-
 
26243
          new FieldValueMetaData(TType.STRUCT)));
25559
    }});
26244
    }});
25560
 
26245
 
25561
    static {
26246
    static {
25562
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
26247
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
25563
    }
26248
    }
25564
 
26249
 
25565
    public mergeCart_result() {
26250
    public resetCart_result() {
-
 
26251
    }
-
 
26252
 
-
 
26253
    public resetCart_result(
-
 
26254
      boolean success,
-
 
26255
      ShoppingCartException scex)
-
 
26256
    {
-
 
26257
      this();
-
 
26258
      this.success = success;
-
 
26259
      setSuccessIsSet(true);
-
 
26260
      this.scex = scex;
25566
    }
26261
    }
25567
 
26262
 
25568
    /**
26263
    /**
25569
     * Performs a deep copy on <i>other</i>.
26264
     * Performs a deep copy on <i>other</i>.
25570
     */
26265
     */
25571
    public mergeCart_result(mergeCart_result other) {
26266
    public resetCart_result(resetCart_result other) {
-
 
26267
      __isset_bit_vector.clear();
-
 
26268
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
26269
      this.success = other.success;
-
 
26270
      if (other.isSetScex()) {
-
 
26271
        this.scex = new ShoppingCartException(other.scex);
-
 
26272
      }
25572
    }
26273
    }
25573
 
26274
 
25574
    public mergeCart_result deepCopy() {
26275
    public resetCart_result deepCopy() {
25575
      return new mergeCart_result(this);
26276
      return new resetCart_result(this);
25576
    }
26277
    }
25577
 
26278
 
25578
    @Deprecated
26279
    @Deprecated
25579
    public mergeCart_result clone() {
26280
    public resetCart_result clone() {
25580
      return new mergeCart_result(this);
26281
      return new resetCart_result(this);
-
 
26282
    }
-
 
26283
 
-
 
26284
    public boolean isSuccess() {
-
 
26285
      return this.success;
-
 
26286
    }
-
 
26287
 
-
 
26288
    public resetCart_result setSuccess(boolean success) {
-
 
26289
      this.success = success;
-
 
26290
      setSuccessIsSet(true);
-
 
26291
      return this;
-
 
26292
    }
-
 
26293
 
-
 
26294
    public void unsetSuccess() {
-
 
26295
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
-
 
26296
    }
-
 
26297
 
-
 
26298
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
-
 
26299
    public boolean isSetSuccess() {
-
 
26300
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
-
 
26301
    }
-
 
26302
 
-
 
26303
    public void setSuccessIsSet(boolean value) {
-
 
26304
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
-
 
26305
    }
-
 
26306
 
-
 
26307
    public ShoppingCartException getScex() {
-
 
26308
      return this.scex;
-
 
26309
    }
-
 
26310
 
-
 
26311
    public resetCart_result setScex(ShoppingCartException scex) {
-
 
26312
      this.scex = scex;
-
 
26313
      return this;
-
 
26314
    }
-
 
26315
 
-
 
26316
    public void unsetScex() {
-
 
26317
      this.scex = null;
-
 
26318
    }
-
 
26319
 
-
 
26320
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
-
 
26321
    public boolean isSetScex() {
-
 
26322
      return this.scex != null;
-
 
26323
    }
-
 
26324
 
-
 
26325
    public void setScexIsSet(boolean value) {
-
 
26326
      if (!value) {
-
 
26327
        this.scex = null;
-
 
26328
      }
25581
    }
26329
    }
25582
 
26330
 
25583
    public void setFieldValue(_Fields field, Object value) {
26331
    public void setFieldValue(_Fields field, Object value) {
25584
      switch (field) {
26332
      switch (field) {
-
 
26333
      case SUCCESS:
-
 
26334
        if (value == null) {
-
 
26335
          unsetSuccess();
-
 
26336
        } else {
-
 
26337
          setSuccess((Boolean)value);
-
 
26338
        }
-
 
26339
        break;
-
 
26340
 
-
 
26341
      case SCEX:
-
 
26342
        if (value == null) {
-
 
26343
          unsetScex();
-
 
26344
        } else {
-
 
26345
          setScex((ShoppingCartException)value);
-
 
26346
        }
-
 
26347
        break;
-
 
26348
 
25585
      }
26349
      }
25586
    }
26350
    }
25587
 
26351
 
25588
    public void setFieldValue(int fieldID, Object value) {
26352
    public void setFieldValue(int fieldID, Object value) {
25589
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26353
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25590
    }
26354
    }
25591
 
26355
 
25592
    public Object getFieldValue(_Fields field) {
26356
    public Object getFieldValue(_Fields field) {
25593
      switch (field) {
26357
      switch (field) {
-
 
26358
      case SUCCESS:
-
 
26359
        return new Boolean(isSuccess());
-
 
26360
 
-
 
26361
      case SCEX:
-
 
26362
        return getScex();
-
 
26363
 
25594
      }
26364
      }
25595
      throw new IllegalStateException();
26365
      throw new IllegalStateException();
25596
    }
26366
    }
25597
 
26367
 
25598
    public Object getFieldValue(int fieldId) {
26368
    public Object getFieldValue(int fieldId) {
Line 25600... Line 26370...
25600
    }
26370
    }
25601
 
26371
 
25602
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25603
    public boolean isSet(_Fields field) {
26373
    public boolean isSet(_Fields field) {
25604
      switch (field) {
26374
      switch (field) {
-
 
26375
      case SUCCESS:
-
 
26376
        return isSetSuccess();
-
 
26377
      case SCEX:
-
 
26378
        return isSetScex();
25605
      }
26379
      }
25606
      throw new IllegalStateException();
26380
      throw new IllegalStateException();
25607
    }
26381
    }
25608
 
26382
 
25609
    public boolean isSet(int fieldID) {
26383
    public boolean isSet(int fieldID) {
Line 25612... Line 26386...
25612
 
26386
 
25613
    @Override
26387
    @Override
25614
    public boolean equals(Object that) {
26388
    public boolean equals(Object that) {
25615
      if (that == null)
26389
      if (that == null)
25616
        return false;
26390
        return false;
25617
      if (that instanceof mergeCart_result)
26391
      if (that instanceof resetCart_result)
25618
        return this.equals((mergeCart_result)that);
26392
        return this.equals((resetCart_result)that);
25619
      return false;
26393
      return false;
25620
    }
26394
    }
25621
 
26395
 
25622
    public boolean equals(mergeCart_result that) {
26396
    public boolean equals(resetCart_result that) {
25623
      if (that == null)
26397
      if (that == null)
25624
        return false;
26398
        return false;
25625
 
26399
 
-
 
26400
      boolean this_present_success = true;
-
 
26401
      boolean that_present_success = true;
-
 
26402
      if (this_present_success || that_present_success) {
-
 
26403
        if (!(this_present_success && that_present_success))
-
 
26404
          return false;
-
 
26405
        if (this.success != that.success)
-
 
26406
          return false;
-
 
26407
      }
-
 
26408
 
-
 
26409
      boolean this_present_scex = true && this.isSetScex();
-
 
26410
      boolean that_present_scex = true && that.isSetScex();
-
 
26411
      if (this_present_scex || that_present_scex) {
-
 
26412
        if (!(this_present_scex && that_present_scex))
-
 
26413
          return false;
-
 
26414
        if (!this.scex.equals(that.scex))
-
 
26415
          return false;
-
 
26416
      }
-
 
26417
 
25626
      return true;
26418
      return true;
25627
    }
26419
    }
25628
 
26420
 
25629
    @Override
26421
    @Override
25630
    public int hashCode() {
26422
    public int hashCode() {
25631
      return 0;
26423
      return 0;
25632
    }
26424
    }
25633
 
26425
 
25634
    public int compareTo(mergeCart_result other) {
26426
    public int compareTo(resetCart_result other) {
25635
      if (!getClass().equals(other.getClass())) {
26427
      if (!getClass().equals(other.getClass())) {
25636
        return getClass().getName().compareTo(other.getClass().getName());
26428
        return getClass().getName().compareTo(other.getClass().getName());
25637
      }
26429
      }
25638
 
26430
 
25639
      int lastComparison = 0;
26431
      int lastComparison = 0;
25640
      mergeCart_result typedOther = (mergeCart_result)other;
26432
      resetCart_result typedOther = (resetCart_result)other;
25641
 
26433
 
-
 
26434
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
-
 
26435
      if (lastComparison != 0) {
-
 
26436
        return lastComparison;
-
 
26437
      }
-
 
26438
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
-
 
26439
      if (lastComparison != 0) {
-
 
26440
        return lastComparison;
-
 
26441
      }
-
 
26442
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
-
 
26443
      if (lastComparison != 0) {
-
 
26444
        return lastComparison;
-
 
26445
      }
-
 
26446
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
-
 
26447
      if (lastComparison != 0) {
-
 
26448
        return lastComparison;
-
 
26449
      }
25642
      return 0;
26450
      return 0;
25643
    }
26451
    }
25644
 
26452
 
25645
    public void read(TProtocol iprot) throws TException {
26453
    public void read(TProtocol iprot) throws TException {
25646
      TField field;
26454
      TField field;
Line 25654... Line 26462...
25654
        _Fields fieldId = _Fields.findByThriftId(field.id);
26462
        _Fields fieldId = _Fields.findByThriftId(field.id);
25655
        if (fieldId == null) {
26463
        if (fieldId == null) {
25656
          TProtocolUtil.skip(iprot, field.type);
26464
          TProtocolUtil.skip(iprot, field.type);
25657
        } else {
26465
        } else {
25658
          switch (fieldId) {
26466
          switch (fieldId) {
-
 
26467
            case SUCCESS:
-
 
26468
              if (field.type == TType.BOOL) {
-
 
26469
                this.success = iprot.readBool();
-
 
26470
                setSuccessIsSet(true);
-
 
26471
              } else { 
-
 
26472
                TProtocolUtil.skip(iprot, field.type);
-
 
26473
              }
-
 
26474
              break;
-
 
26475
            case SCEX:
-
 
26476
              if (field.type == TType.STRUCT) {
-
 
26477
                this.scex = new ShoppingCartException();
-
 
26478
                this.scex.read(iprot);
-
 
26479
              } else { 
-
 
26480
                TProtocolUtil.skip(iprot, field.type);
-
 
26481
              }
-
 
26482
              break;
25659
          }
26483
          }
25660
          iprot.readFieldEnd();
26484
          iprot.readFieldEnd();
25661
        }
26485
        }
25662
      }
26486
      }
25663
      iprot.readStructEnd();
26487
      iprot.readStructEnd();
Line 25665... Line 26489...
25665
    }
26489
    }
25666
 
26490
 
25667
    public void write(TProtocol oprot) throws TException {
26491
    public void write(TProtocol oprot) throws TException {
25668
      oprot.writeStructBegin(STRUCT_DESC);
26492
      oprot.writeStructBegin(STRUCT_DESC);
25669
 
26493
 
-
 
26494
      if (this.isSetSuccess()) {
-
 
26495
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
-
 
26496
        oprot.writeBool(this.success);
-
 
26497
        oprot.writeFieldEnd();
-
 
26498
      } else if (this.isSetScex()) {
-
 
26499
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
-
 
26500
        this.scex.write(oprot);
-
 
26501
        oprot.writeFieldEnd();
-
 
26502
      }
25670
      oprot.writeFieldStop();
26503
      oprot.writeFieldStop();
25671
      oprot.writeStructEnd();
26504
      oprot.writeStructEnd();
25672
    }
26505
    }
25673
 
26506
 
25674
    @Override
26507
    @Override
25675
    public String toString() {
26508
    public String toString() {
25676
      StringBuilder sb = new StringBuilder("mergeCart_result(");
26509
      StringBuilder sb = new StringBuilder("resetCart_result(");
25677
      boolean first = true;
26510
      boolean first = true;
25678
 
26511
 
-
 
26512
      sb.append("success:");
-
 
26513
      sb.append(this.success);
-
 
26514
      first = false;
-
 
26515
      if (!first) sb.append(", ");
-
 
26516
      sb.append("scex:");
-
 
26517
      if (this.scex == null) {
-
 
26518
        sb.append("null");
-
 
26519
      } else {
-
 
26520
        sb.append(this.scex);
-
 
26521
      }
-
 
26522
      first = false;
25679
      sb.append(")");
26523
      sb.append(")");
25680
      return sb.toString();
26524
      return sb.toString();
25681
    }
26525
    }
25682
 
26526
 
25683
    public void validate() throws TException {
26527
    public void validate() throws TException {
Line 26575... Line 27419...
26575
              }
27419
              }
26576
              break;
27420
              break;
26577
            case ITEMS:
27421
            case ITEMS:
26578
              if (field.type == TType.LIST) {
27422
              if (field.type == TType.LIST) {
26579
                {
27423
                {
26580
                  TList _list37 = iprot.readListBegin();
27424
                  TList _list42 = iprot.readListBegin();
26581
                  this.items = new ArrayList<Long>(_list37.size);
27425
                  this.items = new ArrayList<Long>(_list42.size);
26582
                  for (int _i38 = 0; _i38 < _list37.size; ++_i38)
27426
                  for (int _i43 = 0; _i43 < _list42.size; ++_i43)
26583
                  {
27427
                  {
26584
                    long _elem39;
27428
                    long _elem44;
26585
                    _elem39 = iprot.readI64();
27429
                    _elem44 = iprot.readI64();
26586
                    this.items.add(_elem39);
27430
                    this.items.add(_elem44);
26587
                  }
27431
                  }
26588
                  iprot.readListEnd();
27432
                  iprot.readListEnd();
26589
                }
27433
                }
26590
              } else { 
27434
              } else { 
26591
                TProtocolUtil.skip(iprot, field.type);
27435
                TProtocolUtil.skip(iprot, field.type);
Line 26608... Line 27452...
26608
      oprot.writeFieldEnd();
27452
      oprot.writeFieldEnd();
26609
      if (this.items != null) {
27453
      if (this.items != null) {
26610
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
27454
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
26611
        {
27455
        {
26612
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
27456
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
26613
          for (long _iter40 : this.items)
27457
          for (long _iter45 : this.items)
26614
          {
27458
          {
26615
            oprot.writeI64(_iter40);
27459
            oprot.writeI64(_iter45);
26616
          }
27460
          }
26617
          oprot.writeListEnd();
27461
          oprot.writeListEnd();
26618
        }
27462
        }
26619
        oprot.writeFieldEnd();
27463
        oprot.writeFieldEnd();
26620
      }
27464
      }