Subversion Repositories SmartDukaan

Rev

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

Rev 1900 Rev 1982
Line 137... Line 137...
137
 
137
 
138
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
138
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
139
 
139
 
140
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
140
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
141
 
141
 
-
 
142
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice) throws ShoppingCartException, TException;
-
 
143
 
-
 
144
    public void removeCoupon(long cartId) throws ShoppingCartException, TException;
-
 
145
 
142
    /**
146
    /**
143
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
147
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
144
     * 
148
     * 
145
     * @param cartId
149
     * @param cartId
146
     */
150
     */
Line 2170... Line 2174...
2170
        throw result.scx;
2174
        throw result.scx;
2171
      }
2175
      }
2172
      return;
2176
      return;
2173
    }
2177
    }
2174
 
2178
 
-
 
2179
    public void applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice) throws ShoppingCartException, TException
-
 
2180
    {
-
 
2181
      send_applyCouponToCart(cartId, couponCode, totalPrice, discountedPrice);
-
 
2182
      recv_applyCouponToCart();
-
 
2183
    }
-
 
2184
 
-
 
2185
    public void send_applyCouponToCart(long cartId, String couponCode, double totalPrice, double discountedPrice) throws TException
-
 
2186
    {
-
 
2187
      oprot_.writeMessageBegin(new TMessage("applyCouponToCart", TMessageType.CALL, seqid_));
-
 
2188
      applyCouponToCart_args args = new applyCouponToCart_args();
-
 
2189
      args.cartId = cartId;
-
 
2190
      args.couponCode = couponCode;
-
 
2191
      args.totalPrice = totalPrice;
-
 
2192
      args.discountedPrice = discountedPrice;
-
 
2193
      args.write(oprot_);
-
 
2194
      oprot_.writeMessageEnd();
-
 
2195
      oprot_.getTransport().flush();
-
 
2196
    }
-
 
2197
 
-
 
2198
    public void recv_applyCouponToCart() throws ShoppingCartException, TException
-
 
2199
    {
-
 
2200
      TMessage msg = iprot_.readMessageBegin();
-
 
2201
      if (msg.type == TMessageType.EXCEPTION) {
-
 
2202
        TApplicationException x = TApplicationException.read(iprot_);
-
 
2203
        iprot_.readMessageEnd();
-
 
2204
        throw x;
-
 
2205
      }
-
 
2206
      applyCouponToCart_result result = new applyCouponToCart_result();
-
 
2207
      result.read(iprot_);
-
 
2208
      iprot_.readMessageEnd();
-
 
2209
      if (result.scx != null) {
-
 
2210
        throw result.scx;
-
 
2211
      }
-
 
2212
      return;
-
 
2213
    }
-
 
2214
 
-
 
2215
    public void removeCoupon(long cartId) throws ShoppingCartException, TException
-
 
2216
    {
-
 
2217
      send_removeCoupon(cartId);
-
 
2218
      recv_removeCoupon();
-
 
2219
    }
-
 
2220
 
-
 
2221
    public void send_removeCoupon(long cartId) throws TException
-
 
2222
    {
-
 
2223
      oprot_.writeMessageBegin(new TMessage("removeCoupon", TMessageType.CALL, seqid_));
-
 
2224
      removeCoupon_args args = new removeCoupon_args();
-
 
2225
      args.cartId = cartId;
-
 
2226
      args.write(oprot_);
-
 
2227
      oprot_.writeMessageEnd();
-
 
2228
      oprot_.getTransport().flush();
-
 
2229
    }
-
 
2230
 
-
 
2231
    public void recv_removeCoupon() throws ShoppingCartException, TException
-
 
2232
    {
-
 
2233
      TMessage msg = iprot_.readMessageBegin();
-
 
2234
      if (msg.type == TMessageType.EXCEPTION) {
-
 
2235
        TApplicationException x = TApplicationException.read(iprot_);
-
 
2236
        iprot_.readMessageEnd();
-
 
2237
        throw x;
-
 
2238
      }
-
 
2239
      removeCoupon_result result = new removeCoupon_result();
-
 
2240
      result.read(iprot_);
-
 
2241
      iprot_.readMessageEnd();
-
 
2242
      if (result.scx != null) {
-
 
2243
        throw result.scx;
-
 
2244
      }
-
 
2245
      return;
-
 
2246
    }
-
 
2247
 
2175
    public long createOrders(long cartId) throws ShoppingCartException, TException
2248
    public long createOrders(long cartId) throws ShoppingCartException, TException
2176
    {
2249
    {
2177
      send_createOrders(cartId);
2250
      send_createOrders(cartId);
2178
      return recv_createOrders();
2251
      return recv_createOrders();
2179
    }
2252
    }
Line 2678... Line 2751...
2678
      processMap_.put("addItemToCart", new addItemToCart());
2751
      processMap_.put("addItemToCart", new addItemToCart());
2679
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
2752
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
2680
      processMap_.put("changeQuantity", new changeQuantity());
2753
      processMap_.put("changeQuantity", new changeQuantity());
2681
      processMap_.put("changeItemStatus", new changeItemStatus());
2754
      processMap_.put("changeItemStatus", new changeItemStatus());
2682
      processMap_.put("addAddressToCart", new addAddressToCart());
2755
      processMap_.put("addAddressToCart", new addAddressToCart());
-
 
2756
      processMap_.put("applyCouponToCart", new applyCouponToCart());
-
 
2757
      processMap_.put("removeCoupon", new removeCoupon());
2683
      processMap_.put("createOrders", new createOrders());
2758
      processMap_.put("createOrders", new createOrders());
2684
      processMap_.put("validateCart", new validateCart());
2759
      processMap_.put("validateCart", new validateCart());
2685
      processMap_.put("mergeCart", new mergeCart());
2760
      processMap_.put("mergeCart", new mergeCart());
2686
      processMap_.put("checkOut", new checkOut());
2761
      processMap_.put("checkOut", new checkOut());
2687
      processMap_.put("resetCart", new resetCart());
2762
      processMap_.put("resetCart", new resetCart());
Line 4203... Line 4278...
4203
        oprot.getTransport().flush();
4278
        oprot.getTransport().flush();
4204
      }
4279
      }
4205
 
4280
 
4206
    }
4281
    }
4207
 
4282
 
-
 
4283
    private class applyCouponToCart implements ProcessFunction {
-
 
4284
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
4285
      {
-
 
4286
        applyCouponToCart_args args = new applyCouponToCart_args();
-
 
4287
        args.read(iprot);
-
 
4288
        iprot.readMessageEnd();
-
 
4289
        applyCouponToCart_result result = new applyCouponToCart_result();
-
 
4290
        try {
-
 
4291
          iface_.applyCouponToCart(args.cartId, args.couponCode, args.totalPrice, args.discountedPrice);
-
 
4292
        } catch (ShoppingCartException scx) {
-
 
4293
          result.scx = scx;
-
 
4294
        } catch (Throwable th) {
-
 
4295
          LOGGER.error("Internal error processing applyCouponToCart", th);
-
 
4296
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing applyCouponToCart");
-
 
4297
          oprot.writeMessageBegin(new TMessage("applyCouponToCart", TMessageType.EXCEPTION, seqid));
-
 
4298
          x.write(oprot);
-
 
4299
          oprot.writeMessageEnd();
-
 
4300
          oprot.getTransport().flush();
-
 
4301
          return;
-
 
4302
        }
-
 
4303
        oprot.writeMessageBegin(new TMessage("applyCouponToCart", TMessageType.REPLY, seqid));
-
 
4304
        result.write(oprot);
-
 
4305
        oprot.writeMessageEnd();
-
 
4306
        oprot.getTransport().flush();
-
 
4307
      }
-
 
4308
 
-
 
4309
    }
-
 
4310
 
-
 
4311
    private class removeCoupon implements ProcessFunction {
-
 
4312
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
-
 
4313
      {
-
 
4314
        removeCoupon_args args = new removeCoupon_args();
-
 
4315
        args.read(iprot);
-
 
4316
        iprot.readMessageEnd();
-
 
4317
        removeCoupon_result result = new removeCoupon_result();
-
 
4318
        try {
-
 
4319
          iface_.removeCoupon(args.cartId);
-
 
4320
        } catch (ShoppingCartException scx) {
-
 
4321
          result.scx = scx;
-
 
4322
        } catch (Throwable th) {
-
 
4323
          LOGGER.error("Internal error processing removeCoupon", th);
-
 
4324
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeCoupon");
-
 
4325
          oprot.writeMessageBegin(new TMessage("removeCoupon", TMessageType.EXCEPTION, seqid));
-
 
4326
          x.write(oprot);
-
 
4327
          oprot.writeMessageEnd();
-
 
4328
          oprot.getTransport().flush();
-
 
4329
          return;
-
 
4330
        }
-
 
4331
        oprot.writeMessageBegin(new TMessage("removeCoupon", TMessageType.REPLY, seqid));
-
 
4332
        result.write(oprot);
-
 
4333
        oprot.writeMessageEnd();
-
 
4334
        oprot.getTransport().flush();
-
 
4335
      }
-
 
4336
 
-
 
4337
    }
-
 
4338
 
4208
    private class createOrders implements ProcessFunction {
4339
    private class createOrders implements ProcessFunction {
4209
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
4340
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
4210
      {
4341
      {
4211
        createOrders_args args = new createOrders_args();
4342
        createOrders_args args = new createOrders_args();
4212
        args.read(iprot);
4343
        args.read(iprot);
Line 16595... Line 16726...
16595
        } else {
16726
        } else {
16596
          switch (fieldId) {
16727
          switch (fieldId) {
16597
            case SUCCESS:
16728
            case SUCCESS:
16598
              if (field.type == TType.LIST) {
16729
              if (field.type == TType.LIST) {
16599
                {
16730
                {
16600
                  TList _list16 = iprot.readListBegin();
16731
                  TList _list20 = iprot.readListBegin();
16601
                  this.success = new ArrayList<Address>(_list16.size);
16732
                  this.success = new ArrayList<Address>(_list20.size);
16602
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
16733
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
16603
                  {
16734
                  {
16604
                    Address _elem18;
16735
                    Address _elem22;
16605
                    _elem18 = new Address();
16736
                    _elem22 = new Address();
16606
                    _elem18.read(iprot);
16737
                    _elem22.read(iprot);
16607
                    this.success.add(_elem18);
16738
                    this.success.add(_elem22);
16608
                  }
16739
                  }
16609
                  iprot.readListEnd();
16740
                  iprot.readListEnd();
16610
                }
16741
                }
16611
              } else { 
16742
              } else { 
16612
                TProtocolUtil.skip(iprot, field.type);
16743
                TProtocolUtil.skip(iprot, field.type);
Line 16633... Line 16764...
16633
 
16764
 
16634
      if (this.isSetSuccess()) {
16765
      if (this.isSetSuccess()) {
16635
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16766
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16636
        {
16767
        {
16637
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16768
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
16638
          for (Address _iter19 : this.success)
16769
          for (Address _iter23 : this.success)
16639
          {
16770
          {
16640
            _iter19.write(oprot);
16771
            _iter23.write(oprot);
16641
          }
16772
          }
16642
          oprot.writeListEnd();
16773
          oprot.writeListEnd();
16643
        }
16774
        }
16644
        oprot.writeFieldEnd();
16775
        oprot.writeFieldEnd();
16645
      } else if (this.isSetUcx()) {
16776
      } else if (this.isSetUcx()) {
Line 21061... Line 21192...
21061
        } else {
21192
        } else {
21062
          switch (fieldId) {
21193
          switch (fieldId) {
21063
            case SUCCESS:
21194
            case SUCCESS:
21064
              if (field.type == TType.LIST) {
21195
              if (field.type == TType.LIST) {
21065
                {
21196
                {
21066
                  TList _list20 = iprot.readListBegin();
21197
                  TList _list24 = iprot.readListBegin();
21067
                  this.success = new ArrayList<UserCommunication>(_list20.size);
21198
                  this.success = new ArrayList<UserCommunication>(_list24.size);
21068
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
21199
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
21069
                  {
21200
                  {
21070
                    UserCommunication _elem22;
21201
                    UserCommunication _elem26;
21071
                    _elem22 = new UserCommunication();
21202
                    _elem26 = new UserCommunication();
21072
                    _elem22.read(iprot);
21203
                    _elem26.read(iprot);
21073
                    this.success.add(_elem22);
21204
                    this.success.add(_elem26);
21074
                  }
21205
                  }
21075
                  iprot.readListEnd();
21206
                  iprot.readListEnd();
21076
                }
21207
                }
21077
              } else { 
21208
              } else { 
21078
                TProtocolUtil.skip(iprot, field.type);
21209
                TProtocolUtil.skip(iprot, field.type);
Line 21099... Line 21230...
21099
 
21230
 
21100
      if (this.isSetSuccess()) {
21231
      if (this.isSetSuccess()) {
21101
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21232
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21102
        {
21233
        {
21103
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
21234
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
21104
          for (UserCommunication _iter23 : this.success)
21235
          for (UserCommunication _iter27 : this.success)
21105
          {
21236
          {
21106
            _iter23.write(oprot);
21237
            _iter27.write(oprot);
21107
          }
21238
          }
21108
          oprot.writeListEnd();
21239
          oprot.writeListEnd();
21109
        }
21240
        }
21110
        oprot.writeFieldEnd();
21241
        oprot.writeFieldEnd();
21111
      } else if (this.isSetUcx()) {
21242
      } else if (this.isSetUcx()) {
Line 21654... Line 21785...
21654
        } else {
21785
        } else {
21655
          switch (fieldId) {
21786
          switch (fieldId) {
21656
            case SUCCESS:
21787
            case SUCCESS:
21657
              if (field.type == TType.LIST) {
21788
              if (field.type == TType.LIST) {
21658
                {
21789
                {
21659
                  TList _list24 = iprot.readListBegin();
21790
                  TList _list28 = iprot.readListBegin();
21660
                  this.success = new ArrayList<UserCommunication>(_list24.size);
21791
                  this.success = new ArrayList<UserCommunication>(_list28.size);
21661
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
21792
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
21662
                  {
21793
                  {
21663
                    UserCommunication _elem26;
21794
                    UserCommunication _elem30;
21664
                    _elem26 = new UserCommunication();
21795
                    _elem30 = new UserCommunication();
21665
                    _elem26.read(iprot);
21796
                    _elem30.read(iprot);
21666
                    this.success.add(_elem26);
21797
                    this.success.add(_elem30);
21667
                  }
21798
                  }
21668
                  iprot.readListEnd();
21799
                  iprot.readListEnd();
21669
                }
21800
                }
21670
              } else { 
21801
              } else { 
21671
                TProtocolUtil.skip(iprot, field.type);
21802
                TProtocolUtil.skip(iprot, field.type);
Line 21692... Line 21823...
21692
 
21823
 
21693
      if (this.isSetSuccess()) {
21824
      if (this.isSetSuccess()) {
21694
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21825
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21695
        {
21826
        {
21696
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
21827
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
21697
          for (UserCommunication _iter27 : this.success)
21828
          for (UserCommunication _iter31 : this.success)
21698
          {
21829
          {
21699
            _iter27.write(oprot);
21830
            _iter31.write(oprot);
21700
          }
21831
          }
21701
          oprot.writeListEnd();
21832
          oprot.writeListEnd();
21702
        }
21833
        }
21703
        oprot.writeFieldEnd();
21834
        oprot.writeFieldEnd();
21704
      } else if (this.isSetUcx()) {
21835
      } else if (this.isSetUcx()) {
Line 22974... Line 23105...
22974
        } else {
23105
        } else {
22975
          switch (fieldId) {
23106
          switch (fieldId) {
22976
            case SUCCESS:
23107
            case SUCCESS:
22977
              if (field.type == TType.LIST) {
23108
              if (field.type == TType.LIST) {
22978
                {
23109
                {
22979
                  TList _list28 = iprot.readListBegin();
23110
                  TList _list32 = iprot.readListBegin();
22980
                  this.success = new ArrayList<MasterAffiliate>(_list28.size);
23111
                  this.success = new ArrayList<MasterAffiliate>(_list32.size);
22981
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
23112
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
22982
                  {
23113
                  {
22983
                    MasterAffiliate _elem30;
23114
                    MasterAffiliate _elem34;
22984
                    _elem30 = new MasterAffiliate();
23115
                    _elem34 = new MasterAffiliate();
22985
                    _elem30.read(iprot);
23116
                    _elem34.read(iprot);
22986
                    this.success.add(_elem30);
23117
                    this.success.add(_elem34);
22987
                  }
23118
                  }
22988
                  iprot.readListEnd();
23119
                  iprot.readListEnd();
22989
                }
23120
                }
22990
              } else { 
23121
              } else { 
22991
                TProtocolUtil.skip(iprot, field.type);
23122
                TProtocolUtil.skip(iprot, field.type);
Line 23012... Line 23143...
23012
 
23143
 
23013
      if (this.isSetSuccess()) {
23144
      if (this.isSetSuccess()) {
23014
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23145
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23015
        {
23146
        {
23016
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
23147
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
23017
          for (MasterAffiliate _iter31 : this.success)
23148
          for (MasterAffiliate _iter35 : this.success)
23018
          {
23149
          {
23019
            _iter31.write(oprot);
23150
            _iter35.write(oprot);
23020
          }
23151
          }
23021
          oprot.writeListEnd();
23152
          oprot.writeListEnd();
23022
        }
23153
        }
23023
        oprot.writeFieldEnd();
23154
        oprot.writeFieldEnd();
23024
      } else if (this.isSetUtx()) {
23155
      } else if (this.isSetUtx()) {
Line 27121... Line 27252...
27121
        } else {
27252
        } else {
27122
          switch (fieldId) {
27253
          switch (fieldId) {
27123
            case SUCCESS:
27254
            case SUCCESS:
27124
              if (field.type == TType.LIST) {
27255
              if (field.type == TType.LIST) {
27125
                {
27256
                {
27126
                  TList _list32 = iprot.readListBegin();
27257
                  TList _list36 = iprot.readListBegin();
27127
                  this.success = new ArrayList<Affiliate>(_list32.size);
27258
                  this.success = new ArrayList<Affiliate>(_list36.size);
27128
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
27259
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
27129
                  {
27260
                  {
27130
                    Affiliate _elem34;
27261
                    Affiliate _elem38;
27131
                    _elem34 = new Affiliate();
27262
                    _elem38 = new Affiliate();
27132
                    _elem34.read(iprot);
27263
                    _elem38.read(iprot);
27133
                    this.success.add(_elem34);
27264
                    this.success.add(_elem38);
27134
                  }
27265
                  }
27135
                  iprot.readListEnd();
27266
                  iprot.readListEnd();
27136
                }
27267
                }
27137
              } else { 
27268
              } else { 
27138
                TProtocolUtil.skip(iprot, field.type);
27269
                TProtocolUtil.skip(iprot, field.type);
Line 27159... Line 27290...
27159
 
27290
 
27160
      if (this.isSetSuccess()) {
27291
      if (this.isSetSuccess()) {
27161
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27292
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27162
        {
27293
        {
27163
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
27294
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
27164
          for (Affiliate _iter35 : this.success)
27295
          for (Affiliate _iter39 : this.success)
27165
          {
27296
          {
27166
            _iter35.write(oprot);
27297
            _iter39.write(oprot);
27167
          }
27298
          }
27168
          oprot.writeListEnd();
27299
          oprot.writeListEnd();
27169
        }
27300
        }
27170
        oprot.writeFieldEnd();
27301
        oprot.writeFieldEnd();
27171
      } else if (this.isSetUtx()) {
27302
      } else if (this.isSetUtx()) {
Line 29165... Line 29296...
29165
        } else {
29296
        } else {
29166
          switch (fieldId) {
29297
          switch (fieldId) {
29167
            case SUCCESS:
29298
            case SUCCESS:
29168
              if (field.type == TType.LIST) {
29299
              if (field.type == TType.LIST) {
29169
                {
29300
                {
29170
                  TList _list36 = iprot.readListBegin();
29301
                  TList _list40 = iprot.readListBegin();
29171
                  this.success = new ArrayList<Tracker>(_list36.size);
29302
                  this.success = new ArrayList<Tracker>(_list40.size);
29172
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
29303
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
29173
                  {
29304
                  {
29174
                    Tracker _elem38;
29305
                    Tracker _elem42;
29175
                    _elem38 = new Tracker();
29306
                    _elem42 = new Tracker();
29176
                    _elem38.read(iprot);
29307
                    _elem42.read(iprot);
29177
                    this.success.add(_elem38);
29308
                    this.success.add(_elem42);
29178
                  }
29309
                  }
29179
                  iprot.readListEnd();
29310
                  iprot.readListEnd();
29180
                }
29311
                }
29181
              } else { 
29312
              } else { 
29182
                TProtocolUtil.skip(iprot, field.type);
29313
                TProtocolUtil.skip(iprot, field.type);
Line 29203... Line 29334...
29203
 
29334
 
29204
      if (this.isSetSuccess()) {
29335
      if (this.isSetSuccess()) {
29205
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29336
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29206
        {
29337
        {
29207
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
29338
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
29208
          for (Tracker _iter39 : this.success)
29339
          for (Tracker _iter43 : this.success)
29209
          {
29340
          {
29210
            _iter39.write(oprot);
29341
            _iter43.write(oprot);
29211
          }
29342
          }
29212
          oprot.writeListEnd();
29343
          oprot.writeListEnd();
29213
        }
29344
        }
29214
        oprot.writeFieldEnd();
29345
        oprot.writeFieldEnd();
29215
      } else if (this.isSetUtx()) {
29346
      } else if (this.isSetUtx()) {
Line 31537... Line 31668...
31537
        } else {
31668
        } else {
31538
          switch (fieldId) {
31669
          switch (fieldId) {
31539
            case SUCCESS:
31670
            case SUCCESS:
31540
              if (field.type == TType.LIST) {
31671
              if (field.type == TType.LIST) {
31541
                {
31672
                {
31542
                  TList _list40 = iprot.readListBegin();
31673
                  TList _list44 = iprot.readListBegin();
31543
                  this.success = new ArrayList<TrackLog>(_list40.size);
31674
                  this.success = new ArrayList<TrackLog>(_list44.size);
31544
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
31675
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
31545
                  {
31676
                  {
31546
                    TrackLog _elem42;
31677
                    TrackLog _elem46;
31547
                    _elem42 = new TrackLog();
31678
                    _elem46 = new TrackLog();
31548
                    _elem42.read(iprot);
31679
                    _elem46.read(iprot);
31549
                    this.success.add(_elem42);
31680
                    this.success.add(_elem46);
31550
                  }
31681
                  }
31551
                  iprot.readListEnd();
31682
                  iprot.readListEnd();
31552
                }
31683
                }
31553
              } else { 
31684
              } else { 
31554
                TProtocolUtil.skip(iprot, field.type);
31685
                TProtocolUtil.skip(iprot, field.type);
Line 31575... Line 31706...
31575
 
31706
 
31576
      if (this.isSetSuccess()) {
31707
      if (this.isSetSuccess()) {
31577
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31708
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31578
        {
31709
        {
31579
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
31710
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
31580
          for (TrackLog _iter43 : this.success)
31711
          for (TrackLog _iter47 : this.success)
31581
          {
31712
          {
31582
            _iter43.write(oprot);
31713
            _iter47.write(oprot);
31583
          }
31714
          }
31584
          oprot.writeListEnd();
31715
          oprot.writeListEnd();
31585
        }
31716
        }
31586
        oprot.writeFieldEnd();
31717
        oprot.writeFieldEnd();
31587
      } else if (this.isSetUtx()) {
31718
      } else if (this.isSetUtx()) {
Line 32217... Line 32348...
32217
        } else {
32348
        } else {
32218
          switch (fieldId) {
32349
          switch (fieldId) {
32219
            case SUCCESS:
32350
            case SUCCESS:
32220
              if (field.type == TType.LIST) {
32351
              if (field.type == TType.LIST) {
32221
                {
32352
                {
32222
                  TList _list44 = iprot.readListBegin();
32353
                  TList _list48 = iprot.readListBegin();
32223
                  this.success = new ArrayList<TrackLog>(_list44.size);
32354
                  this.success = new ArrayList<TrackLog>(_list48.size);
32224
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
32355
                  for (int _i49 = 0; _i49 < _list48.size; ++_i49)
32225
                  {
32356
                  {
32226
                    TrackLog _elem46;
32357
                    TrackLog _elem50;
32227
                    _elem46 = new TrackLog();
32358
                    _elem50 = new TrackLog();
32228
                    _elem46.read(iprot);
32359
                    _elem50.read(iprot);
32229
                    this.success.add(_elem46);
32360
                    this.success.add(_elem50);
32230
                  }
32361
                  }
32231
                  iprot.readListEnd();
32362
                  iprot.readListEnd();
32232
                }
32363
                }
32233
              } else { 
32364
              } else { 
32234
                TProtocolUtil.skip(iprot, field.type);
32365
                TProtocolUtil.skip(iprot, field.type);
Line 32255... Line 32386...
32255
 
32386
 
32256
      if (this.isSetSuccess()) {
32387
      if (this.isSetSuccess()) {
32257
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32388
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32258
        {
32389
        {
32259
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
32390
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
32260
          for (TrackLog _iter47 : this.success)
32391
          for (TrackLog _iter51 : this.success)
32261
          {
32392
          {
32262
            _iter47.write(oprot);
32393
            _iter51.write(oprot);
32263
          }
32394
          }
32264
          oprot.writeListEnd();
32395
          oprot.writeListEnd();
32265
        }
32396
        }
32266
        oprot.writeFieldEnd();
32397
        oprot.writeFieldEnd();
32267
      } else if (this.isSetUtx()) {
32398
      } else if (this.isSetUtx()) {
Line 33143... Line 33274...
33143
        } else {
33274
        } else {
33144
          switch (fieldId) {
33275
          switch (fieldId) {
33145
            case SUCCESS:
33276
            case SUCCESS:
33146
              if (field.type == TType.LIST) {
33277
              if (field.type == TType.LIST) {
33147
                {
33278
                {
33148
                  TList _list48 = iprot.readListBegin();
33279
                  TList _list52 = iprot.readListBegin();
33149
                  this.success = new ArrayList<TrackLog>(_list48.size);
33280
                  this.success = new ArrayList<TrackLog>(_list52.size);
33150
                  for (int _i49 = 0; _i49 < _list48.size; ++_i49)
33281
                  for (int _i53 = 0; _i53 < _list52.size; ++_i53)
33151
                  {
33282
                  {
33152
                    TrackLog _elem50;
33283
                    TrackLog _elem54;
33153
                    _elem50 = new TrackLog();
33284
                    _elem54 = new TrackLog();
33154
                    _elem50.read(iprot);
33285
                    _elem54.read(iprot);
33155
                    this.success.add(_elem50);
33286
                    this.success.add(_elem54);
33156
                  }
33287
                  }
33157
                  iprot.readListEnd();
33288
                  iprot.readListEnd();
33158
                }
33289
                }
33159
              } else { 
33290
              } else { 
33160
                TProtocolUtil.skip(iprot, field.type);
33291
                TProtocolUtil.skip(iprot, field.type);
Line 33181... Line 33312...
33181
 
33312
 
33182
      if (this.isSetSuccess()) {
33313
      if (this.isSetSuccess()) {
33183
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
33314
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
33184
        {
33315
        {
33185
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
33316
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
33186
          for (TrackLog _iter51 : this.success)
33317
          for (TrackLog _iter55 : this.success)
33187
          {
33318
          {
33188
            _iter51.write(oprot);
33319
            _iter55.write(oprot);
33189
          }
33320
          }
33190
          oprot.writeListEnd();
33321
          oprot.writeListEnd();
33191
        }
33322
        }
33192
        oprot.writeFieldEnd();
33323
        oprot.writeFieldEnd();
33193
      } else if (this.isSetUtx()) {
33324
      } else if (this.isSetUtx()) {
Line 35854... Line 35985...
35854
        } else {
35985
        } else {
35855
          switch (fieldId) {
35986
          switch (fieldId) {
35856
            case SUCCESS:
35987
            case SUCCESS:
35857
              if (field.type == TType.LIST) {
35988
              if (field.type == TType.LIST) {
35858
                {
35989
                {
35859
                  TList _list52 = iprot.readListBegin();
35990
                  TList _list56 = iprot.readListBegin();
35860
                  this.success = new ArrayList<Cart>(_list52.size);
35991
                  this.success = new ArrayList<Cart>(_list56.size);
35861
                  for (int _i53 = 0; _i53 < _list52.size; ++_i53)
35992
                  for (int _i57 = 0; _i57 < _list56.size; ++_i57)
35862
                  {
35993
                  {
35863
                    Cart _elem54;
35994
                    Cart _elem58;
35864
                    _elem54 = new Cart();
35995
                    _elem58 = new Cart();
35865
                    _elem54.read(iprot);
35996
                    _elem58.read(iprot);
35866
                    this.success.add(_elem54);
35997
                    this.success.add(_elem58);
35867
                  }
35998
                  }
35868
                  iprot.readListEnd();
35999
                  iprot.readListEnd();
35869
                }
36000
                }
35870
              } else { 
36001
              } else { 
35871
                TProtocolUtil.skip(iprot, field.type);
36002
                TProtocolUtil.skip(iprot, field.type);
Line 35892... Line 36023...
35892
 
36023
 
35893
      if (this.isSetSuccess()) {
36024
      if (this.isSetSuccess()) {
35894
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
36025
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
35895
        {
36026
        {
35896
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
36027
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
35897
          for (Cart _iter55 : this.success)
36028
          for (Cart _iter59 : this.success)
35898
          {
36029
          {
35899
            _iter55.write(oprot);
36030
            _iter59.write(oprot);
35900
          }
36031
          }
35901
          oprot.writeListEnd();
36032
          oprot.writeListEnd();
35902
        }
36033
        }
35903
        oprot.writeFieldEnd();
36034
        oprot.writeFieldEnd();
35904
      } else if (this.isSetScx()) {
36035
      } else if (this.isSetScx()) {
Line 36557... Line 36688...
36557
        } else {
36688
        } else {
36558
          switch (fieldId) {
36689
          switch (fieldId) {
36559
            case SUCCESS:
36690
            case SUCCESS:
36560
              if (field.type == TType.LIST) {
36691
              if (field.type == TType.LIST) {
36561
                {
36692
                {
36562
                  TList _list56 = iprot.readListBegin();
36693
                  TList _list60 = iprot.readListBegin();
36563
                  this.success = new ArrayList<Cart>(_list56.size);
36694
                  this.success = new ArrayList<Cart>(_list60.size);
36564
                  for (int _i57 = 0; _i57 < _list56.size; ++_i57)
36695
                  for (int _i61 = 0; _i61 < _list60.size; ++_i61)
36565
                  {
36696
                  {
36566
                    Cart _elem58;
36697
                    Cart _elem62;
36567
                    _elem58 = new Cart();
36698
                    _elem62 = new Cart();
36568
                    _elem58.read(iprot);
36699
                    _elem62.read(iprot);
36569
                    this.success.add(_elem58);
36700
                    this.success.add(_elem62);
36570
                  }
36701
                  }
36571
                  iprot.readListEnd();
36702
                  iprot.readListEnd();
36572
                }
36703
                }
36573
              } else { 
36704
              } else { 
36574
                TProtocolUtil.skip(iprot, field.type);
36705
                TProtocolUtil.skip(iprot, field.type);
Line 36595... Line 36726...
36595
 
36726
 
36596
      if (this.isSetSuccess()) {
36727
      if (this.isSetSuccess()) {
36597
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
36728
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
36598
        {
36729
        {
36599
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
36730
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
36600
          for (Cart _iter59 : this.success)
36731
          for (Cart _iter63 : this.success)
36601
          {
36732
          {
36602
            _iter59.write(oprot);
36733
            _iter63.write(oprot);
36603
          }
36734
          }
36604
          oprot.writeListEnd();
36735
          oprot.writeListEnd();
36605
        }
36736
        }
36606
        oprot.writeFieldEnd();
36737
        oprot.writeFieldEnd();
36607
      } else if (this.isSetScx()) {
36738
      } else if (this.isSetScx()) {
Line 37419... Line 37550...
37419
        } else {
37550
        } else {
37420
          switch (fieldId) {
37551
          switch (fieldId) {
37421
            case SUCCESS:
37552
            case SUCCESS:
37422
              if (field.type == TType.LIST) {
37553
              if (field.type == TType.LIST) {
37423
                {
37554
                {
37424
                  TList _list60 = iprot.readListBegin();
37555
                  TList _list64 = iprot.readListBegin();
37425
                  this.success = new ArrayList<Cart>(_list60.size);
37556
                  this.success = new ArrayList<Cart>(_list64.size);
37426
                  for (int _i61 = 0; _i61 < _list60.size; ++_i61)
37557
                  for (int _i65 = 0; _i65 < _list64.size; ++_i65)
37427
                  {
37558
                  {
37428
                    Cart _elem62;
37559
                    Cart _elem66;
37429
                    _elem62 = new Cart();
37560
                    _elem66 = new Cart();
37430
                    _elem62.read(iprot);
37561
                    _elem66.read(iprot);
37431
                    this.success.add(_elem62);
37562
                    this.success.add(_elem66);
37432
                  }
37563
                  }
37433
                  iprot.readListEnd();
37564
                  iprot.readListEnd();
37434
                }
37565
                }
37435
              } else { 
37566
              } else { 
37436
                TProtocolUtil.skip(iprot, field.type);
37567
                TProtocolUtil.skip(iprot, field.type);
Line 37457... Line 37588...
37457
 
37588
 
37458
      if (this.isSetSuccess()) {
37589
      if (this.isSetSuccess()) {
37459
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
37590
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
37460
        {
37591
        {
37461
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
37592
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
37462
          for (Cart _iter63 : this.success)
37593
          for (Cart _iter67 : this.success)
37463
          {
37594
          {
37464
            _iter63.write(oprot);
37595
            _iter67.write(oprot);
37465
          }
37596
          }
37466
          oprot.writeListEnd();
37597
          oprot.writeListEnd();
37467
        }
37598
        }
37468
        oprot.writeFieldEnd();
37599
        oprot.writeFieldEnd();
37469
      } else if (this.isSetScx()) {
37600
      } else if (this.isSetScx()) {
Line 41611... Line 41742...
41611
      // check for required fields
41742
      // check for required fields
41612
    }
41743
    }
41613
 
41744
 
41614
  }
41745
  }
41615
 
41746
 
-
 
41747
  public static class applyCouponToCart_args implements TBase<applyCouponToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<applyCouponToCart_args>   {
-
 
41748
    private static final TStruct STRUCT_DESC = new TStruct("applyCouponToCart_args");
-
 
41749
 
-
 
41750
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
-
 
41751
    private static final TField COUPON_CODE_FIELD_DESC = new TField("couponCode", TType.STRING, (short)2);
-
 
41752
    private static final TField TOTAL_PRICE_FIELD_DESC = new TField("totalPrice", TType.DOUBLE, (short)3);
-
 
41753
    private static final TField DISCOUNTED_PRICE_FIELD_DESC = new TField("discountedPrice", TType.DOUBLE, (short)4);
-
 
41754
 
-
 
41755
    private long cartId;
-
 
41756
    private String couponCode;
-
 
41757
    private double totalPrice;
-
 
41758
    private double discountedPrice;
-
 
41759
 
-
 
41760
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
41761
    public enum _Fields implements TFieldIdEnum {
-
 
41762
      CART_ID((short)1, "cartId"),
-
 
41763
      COUPON_CODE((short)2, "couponCode"),
-
 
41764
      TOTAL_PRICE((short)3, "totalPrice"),
-
 
41765
      DISCOUNTED_PRICE((short)4, "discountedPrice");
-
 
41766
 
-
 
41767
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
41768
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
41769
 
-
 
41770
      static {
-
 
41771
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
41772
          byId.put((int)field._thriftId, field);
-
 
41773
          byName.put(field.getFieldName(), field);
-
 
41774
        }
-
 
41775
      }
-
 
41776
 
-
 
41777
      /**
-
 
41778
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
41779
       */
-
 
41780
      public static _Fields findByThriftId(int fieldId) {
-
 
41781
        return byId.get(fieldId);
-
 
41782
      }
-
 
41783
 
-
 
41784
      /**
-
 
41785
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
41786
       * if it is not found.
-
 
41787
       */
-
 
41788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
41789
        _Fields fields = findByThriftId(fieldId);
-
 
41790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
41791
        return fields;
-
 
41792
      }
-
 
41793
 
-
 
41794
      /**
-
 
41795
       * Find the _Fields constant that matches name, or null if its not found.
-
 
41796
       */
-
 
41797
      public static _Fields findByName(String name) {
-
 
41798
        return byName.get(name);
-
 
41799
      }
-
 
41800
 
-
 
41801
      private final short _thriftId;
-
 
41802
      private final String _fieldName;
-
 
41803
 
-
 
41804
      _Fields(short thriftId, String fieldName) {
-
 
41805
        _thriftId = thriftId;
-
 
41806
        _fieldName = fieldName;
-
 
41807
      }
-
 
41808
 
-
 
41809
      public short getThriftFieldId() {
-
 
41810
        return _thriftId;
-
 
41811
      }
-
 
41812
 
-
 
41813
      public String getFieldName() {
-
 
41814
        return _fieldName;
-
 
41815
      }
-
 
41816
    }
-
 
41817
 
-
 
41818
    // isset id assignments
-
 
41819
    private static final int __CARTID_ISSET_ID = 0;
-
 
41820
    private static final int __TOTALPRICE_ISSET_ID = 1;
-
 
41821
    private static final int __DISCOUNTEDPRICE_ISSET_ID = 2;
-
 
41822
    private BitSet __isset_bit_vector = new BitSet(3);
-
 
41823
 
-
 
41824
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
41825
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
-
 
41826
          new FieldValueMetaData(TType.I64)));
-
 
41827
      put(_Fields.COUPON_CODE, new FieldMetaData("couponCode", TFieldRequirementType.DEFAULT, 
-
 
41828
          new FieldValueMetaData(TType.STRING)));
-
 
41829
      put(_Fields.TOTAL_PRICE, new FieldMetaData("totalPrice", TFieldRequirementType.DEFAULT, 
-
 
41830
          new FieldValueMetaData(TType.DOUBLE)));
-
 
41831
      put(_Fields.DISCOUNTED_PRICE, new FieldMetaData("discountedPrice", TFieldRequirementType.DEFAULT, 
-
 
41832
          new FieldValueMetaData(TType.DOUBLE)));
-
 
41833
    }});
-
 
41834
 
-
 
41835
    static {
-
 
41836
      FieldMetaData.addStructMetaDataMap(applyCouponToCart_args.class, metaDataMap);
-
 
41837
    }
-
 
41838
 
-
 
41839
    public applyCouponToCart_args() {
-
 
41840
    }
-
 
41841
 
-
 
41842
    public applyCouponToCart_args(
-
 
41843
      long cartId,
-
 
41844
      String couponCode,
-
 
41845
      double totalPrice,
-
 
41846
      double discountedPrice)
-
 
41847
    {
-
 
41848
      this();
-
 
41849
      this.cartId = cartId;
-
 
41850
      setCartIdIsSet(true);
-
 
41851
      this.couponCode = couponCode;
-
 
41852
      this.totalPrice = totalPrice;
-
 
41853
      setTotalPriceIsSet(true);
-
 
41854
      this.discountedPrice = discountedPrice;
-
 
41855
      setDiscountedPriceIsSet(true);
-
 
41856
    }
-
 
41857
 
-
 
41858
    /**
-
 
41859
     * Performs a deep copy on <i>other</i>.
-
 
41860
     */
-
 
41861
    public applyCouponToCart_args(applyCouponToCart_args other) {
-
 
41862
      __isset_bit_vector.clear();
-
 
41863
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
41864
      this.cartId = other.cartId;
-
 
41865
      if (other.isSetCouponCode()) {
-
 
41866
        this.couponCode = other.couponCode;
-
 
41867
      }
-
 
41868
      this.totalPrice = other.totalPrice;
-
 
41869
      this.discountedPrice = other.discountedPrice;
-
 
41870
    }
-
 
41871
 
-
 
41872
    public applyCouponToCart_args deepCopy() {
-
 
41873
      return new applyCouponToCart_args(this);
-
 
41874
    }
-
 
41875
 
-
 
41876
    @Deprecated
-
 
41877
    public applyCouponToCart_args clone() {
-
 
41878
      return new applyCouponToCart_args(this);
-
 
41879
    }
-
 
41880
 
-
 
41881
    public long getCartId() {
-
 
41882
      return this.cartId;
-
 
41883
    }
-
 
41884
 
-
 
41885
    public applyCouponToCart_args setCartId(long cartId) {
-
 
41886
      this.cartId = cartId;
-
 
41887
      setCartIdIsSet(true);
-
 
41888
      return this;
-
 
41889
    }
-
 
41890
 
-
 
41891
    public void unsetCartId() {
-
 
41892
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
-
 
41893
    }
-
 
41894
 
-
 
41895
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
-
 
41896
    public boolean isSetCartId() {
-
 
41897
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
-
 
41898
    }
-
 
41899
 
-
 
41900
    public void setCartIdIsSet(boolean value) {
-
 
41901
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
-
 
41902
    }
-
 
41903
 
-
 
41904
    public String getCouponCode() {
-
 
41905
      return this.couponCode;
-
 
41906
    }
-
 
41907
 
-
 
41908
    public applyCouponToCart_args setCouponCode(String couponCode) {
-
 
41909
      this.couponCode = couponCode;
-
 
41910
      return this;
-
 
41911
    }
-
 
41912
 
-
 
41913
    public void unsetCouponCode() {
-
 
41914
      this.couponCode = null;
-
 
41915
    }
-
 
41916
 
-
 
41917
    /** Returns true if field couponCode is set (has been asigned a value) and false otherwise */
-
 
41918
    public boolean isSetCouponCode() {
-
 
41919
      return this.couponCode != null;
-
 
41920
    }
-
 
41921
 
-
 
41922
    public void setCouponCodeIsSet(boolean value) {
-
 
41923
      if (!value) {
-
 
41924
        this.couponCode = null;
-
 
41925
      }
-
 
41926
    }
-
 
41927
 
-
 
41928
    public double getTotalPrice() {
-
 
41929
      return this.totalPrice;
-
 
41930
    }
-
 
41931
 
-
 
41932
    public applyCouponToCart_args setTotalPrice(double totalPrice) {
-
 
41933
      this.totalPrice = totalPrice;
-
 
41934
      setTotalPriceIsSet(true);
-
 
41935
      return this;
-
 
41936
    }
-
 
41937
 
-
 
41938
    public void unsetTotalPrice() {
-
 
41939
      __isset_bit_vector.clear(__TOTALPRICE_ISSET_ID);
-
 
41940
    }
-
 
41941
 
-
 
41942
    /** Returns true if field totalPrice is set (has been asigned a value) and false otherwise */
-
 
41943
    public boolean isSetTotalPrice() {
-
 
41944
      return __isset_bit_vector.get(__TOTALPRICE_ISSET_ID);
-
 
41945
    }
-
 
41946
 
-
 
41947
    public void setTotalPriceIsSet(boolean value) {
-
 
41948
      __isset_bit_vector.set(__TOTALPRICE_ISSET_ID, value);
-
 
41949
    }
-
 
41950
 
-
 
41951
    public double getDiscountedPrice() {
-
 
41952
      return this.discountedPrice;
-
 
41953
    }
-
 
41954
 
-
 
41955
    public applyCouponToCart_args setDiscountedPrice(double discountedPrice) {
-
 
41956
      this.discountedPrice = discountedPrice;
-
 
41957
      setDiscountedPriceIsSet(true);
-
 
41958
      return this;
-
 
41959
    }
-
 
41960
 
-
 
41961
    public void unsetDiscountedPrice() {
-
 
41962
      __isset_bit_vector.clear(__DISCOUNTEDPRICE_ISSET_ID);
-
 
41963
    }
-
 
41964
 
-
 
41965
    /** Returns true if field discountedPrice is set (has been asigned a value) and false otherwise */
-
 
41966
    public boolean isSetDiscountedPrice() {
-
 
41967
      return __isset_bit_vector.get(__DISCOUNTEDPRICE_ISSET_ID);
-
 
41968
    }
-
 
41969
 
-
 
41970
    public void setDiscountedPriceIsSet(boolean value) {
-
 
41971
      __isset_bit_vector.set(__DISCOUNTEDPRICE_ISSET_ID, value);
-
 
41972
    }
-
 
41973
 
-
 
41974
    public void setFieldValue(_Fields field, Object value) {
-
 
41975
      switch (field) {
-
 
41976
      case CART_ID:
-
 
41977
        if (value == null) {
-
 
41978
          unsetCartId();
-
 
41979
        } else {
-
 
41980
          setCartId((Long)value);
-
 
41981
        }
-
 
41982
        break;
-
 
41983
 
-
 
41984
      case COUPON_CODE:
-
 
41985
        if (value == null) {
-
 
41986
          unsetCouponCode();
-
 
41987
        } else {
-
 
41988
          setCouponCode((String)value);
-
 
41989
        }
-
 
41990
        break;
-
 
41991
 
-
 
41992
      case TOTAL_PRICE:
-
 
41993
        if (value == null) {
-
 
41994
          unsetTotalPrice();
-
 
41995
        } else {
-
 
41996
          setTotalPrice((Double)value);
-
 
41997
        }
-
 
41998
        break;
-
 
41999
 
-
 
42000
      case DISCOUNTED_PRICE:
-
 
42001
        if (value == null) {
-
 
42002
          unsetDiscountedPrice();
-
 
42003
        } else {
-
 
42004
          setDiscountedPrice((Double)value);
-
 
42005
        }
-
 
42006
        break;
-
 
42007
 
-
 
42008
      }
-
 
42009
    }
-
 
42010
 
-
 
42011
    public void setFieldValue(int fieldID, Object value) {
-
 
42012
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
42013
    }
-
 
42014
 
-
 
42015
    public Object getFieldValue(_Fields field) {
-
 
42016
      switch (field) {
-
 
42017
      case CART_ID:
-
 
42018
        return new Long(getCartId());
-
 
42019
 
-
 
42020
      case COUPON_CODE:
-
 
42021
        return getCouponCode();
-
 
42022
 
-
 
42023
      case TOTAL_PRICE:
-
 
42024
        return new Double(getTotalPrice());
-
 
42025
 
-
 
42026
      case DISCOUNTED_PRICE:
-
 
42027
        return new Double(getDiscountedPrice());
-
 
42028
 
-
 
42029
      }
-
 
42030
      throw new IllegalStateException();
-
 
42031
    }
-
 
42032
 
-
 
42033
    public Object getFieldValue(int fieldId) {
-
 
42034
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
42035
    }
-
 
42036
 
-
 
42037
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
42038
    public boolean isSet(_Fields field) {
-
 
42039
      switch (field) {
-
 
42040
      case CART_ID:
-
 
42041
        return isSetCartId();
-
 
42042
      case COUPON_CODE:
-
 
42043
        return isSetCouponCode();
-
 
42044
      case TOTAL_PRICE:
-
 
42045
        return isSetTotalPrice();
-
 
42046
      case DISCOUNTED_PRICE:
-
 
42047
        return isSetDiscountedPrice();
-
 
42048
      }
-
 
42049
      throw new IllegalStateException();
-
 
42050
    }
-
 
42051
 
-
 
42052
    public boolean isSet(int fieldID) {
-
 
42053
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
42054
    }
-
 
42055
 
-
 
42056
    @Override
-
 
42057
    public boolean equals(Object that) {
-
 
42058
      if (that == null)
-
 
42059
        return false;
-
 
42060
      if (that instanceof applyCouponToCart_args)
-
 
42061
        return this.equals((applyCouponToCart_args)that);
-
 
42062
      return false;
-
 
42063
    }
-
 
42064
 
-
 
42065
    public boolean equals(applyCouponToCart_args that) {
-
 
42066
      if (that == null)
-
 
42067
        return false;
-
 
42068
 
-
 
42069
      boolean this_present_cartId = true;
-
 
42070
      boolean that_present_cartId = true;
-
 
42071
      if (this_present_cartId || that_present_cartId) {
-
 
42072
        if (!(this_present_cartId && that_present_cartId))
-
 
42073
          return false;
-
 
42074
        if (this.cartId != that.cartId)
-
 
42075
          return false;
-
 
42076
      }
-
 
42077
 
-
 
42078
      boolean this_present_couponCode = true && this.isSetCouponCode();
-
 
42079
      boolean that_present_couponCode = true && that.isSetCouponCode();
-
 
42080
      if (this_present_couponCode || that_present_couponCode) {
-
 
42081
        if (!(this_present_couponCode && that_present_couponCode))
-
 
42082
          return false;
-
 
42083
        if (!this.couponCode.equals(that.couponCode))
-
 
42084
          return false;
-
 
42085
      }
-
 
42086
 
-
 
42087
      boolean this_present_totalPrice = true;
-
 
42088
      boolean that_present_totalPrice = true;
-
 
42089
      if (this_present_totalPrice || that_present_totalPrice) {
-
 
42090
        if (!(this_present_totalPrice && that_present_totalPrice))
-
 
42091
          return false;
-
 
42092
        if (this.totalPrice != that.totalPrice)
-
 
42093
          return false;
-
 
42094
      }
-
 
42095
 
-
 
42096
      boolean this_present_discountedPrice = true;
-
 
42097
      boolean that_present_discountedPrice = true;
-
 
42098
      if (this_present_discountedPrice || that_present_discountedPrice) {
-
 
42099
        if (!(this_present_discountedPrice && that_present_discountedPrice))
-
 
42100
          return false;
-
 
42101
        if (this.discountedPrice != that.discountedPrice)
-
 
42102
          return false;
-
 
42103
      }
-
 
42104
 
-
 
42105
      return true;
-
 
42106
    }
-
 
42107
 
-
 
42108
    @Override
-
 
42109
    public int hashCode() {
-
 
42110
      return 0;
-
 
42111
    }
-
 
42112
 
-
 
42113
    public int compareTo(applyCouponToCart_args other) {
-
 
42114
      if (!getClass().equals(other.getClass())) {
-
 
42115
        return getClass().getName().compareTo(other.getClass().getName());
-
 
42116
      }
-
 
42117
 
-
 
42118
      int lastComparison = 0;
-
 
42119
      applyCouponToCart_args typedOther = (applyCouponToCart_args)other;
-
 
42120
 
-
 
42121
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
-
 
42122
      if (lastComparison != 0) {
-
 
42123
        return lastComparison;
-
 
42124
      }
-
 
42125
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
-
 
42126
      if (lastComparison != 0) {
-
 
42127
        return lastComparison;
-
 
42128
      }
-
 
42129
      lastComparison = Boolean.valueOf(isSetCouponCode()).compareTo(isSetCouponCode());
-
 
42130
      if (lastComparison != 0) {
-
 
42131
        return lastComparison;
-
 
42132
      }
-
 
42133
      lastComparison = TBaseHelper.compareTo(couponCode, typedOther.couponCode);
-
 
42134
      if (lastComparison != 0) {
-
 
42135
        return lastComparison;
-
 
42136
      }
-
 
42137
      lastComparison = Boolean.valueOf(isSetTotalPrice()).compareTo(isSetTotalPrice());
-
 
42138
      if (lastComparison != 0) {
-
 
42139
        return lastComparison;
-
 
42140
      }
-
 
42141
      lastComparison = TBaseHelper.compareTo(totalPrice, typedOther.totalPrice);
-
 
42142
      if (lastComparison != 0) {
-
 
42143
        return lastComparison;
-
 
42144
      }
-
 
42145
      lastComparison = Boolean.valueOf(isSetDiscountedPrice()).compareTo(isSetDiscountedPrice());
-
 
42146
      if (lastComparison != 0) {
-
 
42147
        return lastComparison;
-
 
42148
      }
-
 
42149
      lastComparison = TBaseHelper.compareTo(discountedPrice, typedOther.discountedPrice);
-
 
42150
      if (lastComparison != 0) {
-
 
42151
        return lastComparison;
-
 
42152
      }
-
 
42153
      return 0;
-
 
42154
    }
-
 
42155
 
-
 
42156
    public void read(TProtocol iprot) throws TException {
-
 
42157
      TField field;
-
 
42158
      iprot.readStructBegin();
-
 
42159
      while (true)
-
 
42160
      {
-
 
42161
        field = iprot.readFieldBegin();
-
 
42162
        if (field.type == TType.STOP) { 
-
 
42163
          break;
-
 
42164
        }
-
 
42165
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
42166
        if (fieldId == null) {
-
 
42167
          TProtocolUtil.skip(iprot, field.type);
-
 
42168
        } else {
-
 
42169
          switch (fieldId) {
-
 
42170
            case CART_ID:
-
 
42171
              if (field.type == TType.I64) {
-
 
42172
                this.cartId = iprot.readI64();
-
 
42173
                setCartIdIsSet(true);
-
 
42174
              } else { 
-
 
42175
                TProtocolUtil.skip(iprot, field.type);
-
 
42176
              }
-
 
42177
              break;
-
 
42178
            case COUPON_CODE:
-
 
42179
              if (field.type == TType.STRING) {
-
 
42180
                this.couponCode = iprot.readString();
-
 
42181
              } else { 
-
 
42182
                TProtocolUtil.skip(iprot, field.type);
-
 
42183
              }
-
 
42184
              break;
-
 
42185
            case TOTAL_PRICE:
-
 
42186
              if (field.type == TType.DOUBLE) {
-
 
42187
                this.totalPrice = iprot.readDouble();
-
 
42188
                setTotalPriceIsSet(true);
-
 
42189
              } else { 
-
 
42190
                TProtocolUtil.skip(iprot, field.type);
-
 
42191
              }
-
 
42192
              break;
-
 
42193
            case DISCOUNTED_PRICE:
-
 
42194
              if (field.type == TType.DOUBLE) {
-
 
42195
                this.discountedPrice = iprot.readDouble();
-
 
42196
                setDiscountedPriceIsSet(true);
-
 
42197
              } else { 
-
 
42198
                TProtocolUtil.skip(iprot, field.type);
-
 
42199
              }
-
 
42200
              break;
-
 
42201
          }
-
 
42202
          iprot.readFieldEnd();
-
 
42203
        }
-
 
42204
      }
-
 
42205
      iprot.readStructEnd();
-
 
42206
      validate();
-
 
42207
    }
-
 
42208
 
-
 
42209
    public void write(TProtocol oprot) throws TException {
-
 
42210
      validate();
-
 
42211
 
-
 
42212
      oprot.writeStructBegin(STRUCT_DESC);
-
 
42213
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
-
 
42214
      oprot.writeI64(this.cartId);
-
 
42215
      oprot.writeFieldEnd();
-
 
42216
      if (this.couponCode != null) {
-
 
42217
        oprot.writeFieldBegin(COUPON_CODE_FIELD_DESC);
-
 
42218
        oprot.writeString(this.couponCode);
-
 
42219
        oprot.writeFieldEnd();
-
 
42220
      }
-
 
42221
      oprot.writeFieldBegin(TOTAL_PRICE_FIELD_DESC);
-
 
42222
      oprot.writeDouble(this.totalPrice);
-
 
42223
      oprot.writeFieldEnd();
-
 
42224
      oprot.writeFieldBegin(DISCOUNTED_PRICE_FIELD_DESC);
-
 
42225
      oprot.writeDouble(this.discountedPrice);
-
 
42226
      oprot.writeFieldEnd();
-
 
42227
      oprot.writeFieldStop();
-
 
42228
      oprot.writeStructEnd();
-
 
42229
    }
-
 
42230
 
-
 
42231
    @Override
-
 
42232
    public String toString() {
-
 
42233
      StringBuilder sb = new StringBuilder("applyCouponToCart_args(");
-
 
42234
      boolean first = true;
-
 
42235
 
-
 
42236
      sb.append("cartId:");
-
 
42237
      sb.append(this.cartId);
-
 
42238
      first = false;
-
 
42239
      if (!first) sb.append(", ");
-
 
42240
      sb.append("couponCode:");
-
 
42241
      if (this.couponCode == null) {
-
 
42242
        sb.append("null");
-
 
42243
      } else {
-
 
42244
        sb.append(this.couponCode);
-
 
42245
      }
-
 
42246
      first = false;
-
 
42247
      if (!first) sb.append(", ");
-
 
42248
      sb.append("totalPrice:");
-
 
42249
      sb.append(this.totalPrice);
-
 
42250
      first = false;
-
 
42251
      if (!first) sb.append(", ");
-
 
42252
      sb.append("discountedPrice:");
-
 
42253
      sb.append(this.discountedPrice);
-
 
42254
      first = false;
-
 
42255
      sb.append(")");
-
 
42256
      return sb.toString();
-
 
42257
    }
-
 
42258
 
-
 
42259
    public void validate() throws TException {
-
 
42260
      // check for required fields
-
 
42261
    }
-
 
42262
 
-
 
42263
  }
-
 
42264
 
-
 
42265
  public static class applyCouponToCart_result implements TBase<applyCouponToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<applyCouponToCart_result>   {
-
 
42266
    private static final TStruct STRUCT_DESC = new TStruct("applyCouponToCart_result");
-
 
42267
 
-
 
42268
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
-
 
42269
 
-
 
42270
    private ShoppingCartException scx;
-
 
42271
 
-
 
42272
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
42273
    public enum _Fields implements TFieldIdEnum {
-
 
42274
      SCX((short)1, "scx");
-
 
42275
 
-
 
42276
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
42277
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
42278
 
-
 
42279
      static {
-
 
42280
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
42281
          byId.put((int)field._thriftId, field);
-
 
42282
          byName.put(field.getFieldName(), field);
-
 
42283
        }
-
 
42284
      }
-
 
42285
 
-
 
42286
      /**
-
 
42287
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
42288
       */
-
 
42289
      public static _Fields findByThriftId(int fieldId) {
-
 
42290
        return byId.get(fieldId);
-
 
42291
      }
-
 
42292
 
-
 
42293
      /**
-
 
42294
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
42295
       * if it is not found.
-
 
42296
       */
-
 
42297
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
42298
        _Fields fields = findByThriftId(fieldId);
-
 
42299
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
42300
        return fields;
-
 
42301
      }
-
 
42302
 
-
 
42303
      /**
-
 
42304
       * Find the _Fields constant that matches name, or null if its not found.
-
 
42305
       */
-
 
42306
      public static _Fields findByName(String name) {
-
 
42307
        return byName.get(name);
-
 
42308
      }
-
 
42309
 
-
 
42310
      private final short _thriftId;
-
 
42311
      private final String _fieldName;
-
 
42312
 
-
 
42313
      _Fields(short thriftId, String fieldName) {
-
 
42314
        _thriftId = thriftId;
-
 
42315
        _fieldName = fieldName;
-
 
42316
      }
-
 
42317
 
-
 
42318
      public short getThriftFieldId() {
-
 
42319
        return _thriftId;
-
 
42320
      }
-
 
42321
 
-
 
42322
      public String getFieldName() {
-
 
42323
        return _fieldName;
-
 
42324
      }
-
 
42325
    }
-
 
42326
 
-
 
42327
    // isset id assignments
-
 
42328
 
-
 
42329
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
42330
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
-
 
42331
          new FieldValueMetaData(TType.STRUCT)));
-
 
42332
    }});
-
 
42333
 
-
 
42334
    static {
-
 
42335
      FieldMetaData.addStructMetaDataMap(applyCouponToCart_result.class, metaDataMap);
-
 
42336
    }
-
 
42337
 
-
 
42338
    public applyCouponToCart_result() {
-
 
42339
    }
-
 
42340
 
-
 
42341
    public applyCouponToCart_result(
-
 
42342
      ShoppingCartException scx)
-
 
42343
    {
-
 
42344
      this();
-
 
42345
      this.scx = scx;
-
 
42346
    }
-
 
42347
 
-
 
42348
    /**
-
 
42349
     * Performs a deep copy on <i>other</i>.
-
 
42350
     */
-
 
42351
    public applyCouponToCart_result(applyCouponToCart_result other) {
-
 
42352
      if (other.isSetScx()) {
-
 
42353
        this.scx = new ShoppingCartException(other.scx);
-
 
42354
      }
-
 
42355
    }
-
 
42356
 
-
 
42357
    public applyCouponToCart_result deepCopy() {
-
 
42358
      return new applyCouponToCart_result(this);
-
 
42359
    }
-
 
42360
 
-
 
42361
    @Deprecated
-
 
42362
    public applyCouponToCart_result clone() {
-
 
42363
      return new applyCouponToCart_result(this);
-
 
42364
    }
-
 
42365
 
-
 
42366
    public ShoppingCartException getScx() {
-
 
42367
      return this.scx;
-
 
42368
    }
-
 
42369
 
-
 
42370
    public applyCouponToCart_result setScx(ShoppingCartException scx) {
-
 
42371
      this.scx = scx;
-
 
42372
      return this;
-
 
42373
    }
-
 
42374
 
-
 
42375
    public void unsetScx() {
-
 
42376
      this.scx = null;
-
 
42377
    }
-
 
42378
 
-
 
42379
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
-
 
42380
    public boolean isSetScx() {
-
 
42381
      return this.scx != null;
-
 
42382
    }
-
 
42383
 
-
 
42384
    public void setScxIsSet(boolean value) {
-
 
42385
      if (!value) {
-
 
42386
        this.scx = null;
-
 
42387
      }
-
 
42388
    }
-
 
42389
 
-
 
42390
    public void setFieldValue(_Fields field, Object value) {
-
 
42391
      switch (field) {
-
 
42392
      case SCX:
-
 
42393
        if (value == null) {
-
 
42394
          unsetScx();
-
 
42395
        } else {
-
 
42396
          setScx((ShoppingCartException)value);
-
 
42397
        }
-
 
42398
        break;
-
 
42399
 
-
 
42400
      }
-
 
42401
    }
-
 
42402
 
-
 
42403
    public void setFieldValue(int fieldID, Object value) {
-
 
42404
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
42405
    }
-
 
42406
 
-
 
42407
    public Object getFieldValue(_Fields field) {
-
 
42408
      switch (field) {
-
 
42409
      case SCX:
-
 
42410
        return getScx();
-
 
42411
 
-
 
42412
      }
-
 
42413
      throw new IllegalStateException();
-
 
42414
    }
-
 
42415
 
-
 
42416
    public Object getFieldValue(int fieldId) {
-
 
42417
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
42418
    }
-
 
42419
 
-
 
42420
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
42421
    public boolean isSet(_Fields field) {
-
 
42422
      switch (field) {
-
 
42423
      case SCX:
-
 
42424
        return isSetScx();
-
 
42425
      }
-
 
42426
      throw new IllegalStateException();
-
 
42427
    }
-
 
42428
 
-
 
42429
    public boolean isSet(int fieldID) {
-
 
42430
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
42431
    }
-
 
42432
 
-
 
42433
    @Override
-
 
42434
    public boolean equals(Object that) {
-
 
42435
      if (that == null)
-
 
42436
        return false;
-
 
42437
      if (that instanceof applyCouponToCart_result)
-
 
42438
        return this.equals((applyCouponToCart_result)that);
-
 
42439
      return false;
-
 
42440
    }
-
 
42441
 
-
 
42442
    public boolean equals(applyCouponToCart_result that) {
-
 
42443
      if (that == null)
-
 
42444
        return false;
-
 
42445
 
-
 
42446
      boolean this_present_scx = true && this.isSetScx();
-
 
42447
      boolean that_present_scx = true && that.isSetScx();
-
 
42448
      if (this_present_scx || that_present_scx) {
-
 
42449
        if (!(this_present_scx && that_present_scx))
-
 
42450
          return false;
-
 
42451
        if (!this.scx.equals(that.scx))
-
 
42452
          return false;
-
 
42453
      }
-
 
42454
 
-
 
42455
      return true;
-
 
42456
    }
-
 
42457
 
-
 
42458
    @Override
-
 
42459
    public int hashCode() {
-
 
42460
      return 0;
-
 
42461
    }
-
 
42462
 
-
 
42463
    public int compareTo(applyCouponToCart_result other) {
-
 
42464
      if (!getClass().equals(other.getClass())) {
-
 
42465
        return getClass().getName().compareTo(other.getClass().getName());
-
 
42466
      }
-
 
42467
 
-
 
42468
      int lastComparison = 0;
-
 
42469
      applyCouponToCart_result typedOther = (applyCouponToCart_result)other;
-
 
42470
 
-
 
42471
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
-
 
42472
      if (lastComparison != 0) {
-
 
42473
        return lastComparison;
-
 
42474
      }
-
 
42475
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
-
 
42476
      if (lastComparison != 0) {
-
 
42477
        return lastComparison;
-
 
42478
      }
-
 
42479
      return 0;
-
 
42480
    }
-
 
42481
 
-
 
42482
    public void read(TProtocol iprot) throws TException {
-
 
42483
      TField field;
-
 
42484
      iprot.readStructBegin();
-
 
42485
      while (true)
-
 
42486
      {
-
 
42487
        field = iprot.readFieldBegin();
-
 
42488
        if (field.type == TType.STOP) { 
-
 
42489
          break;
-
 
42490
        }
-
 
42491
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
42492
        if (fieldId == null) {
-
 
42493
          TProtocolUtil.skip(iprot, field.type);
-
 
42494
        } else {
-
 
42495
          switch (fieldId) {
-
 
42496
            case SCX:
-
 
42497
              if (field.type == TType.STRUCT) {
-
 
42498
                this.scx = new ShoppingCartException();
-
 
42499
                this.scx.read(iprot);
-
 
42500
              } else { 
-
 
42501
                TProtocolUtil.skip(iprot, field.type);
-
 
42502
              }
-
 
42503
              break;
-
 
42504
          }
-
 
42505
          iprot.readFieldEnd();
-
 
42506
        }
-
 
42507
      }
-
 
42508
      iprot.readStructEnd();
-
 
42509
      validate();
-
 
42510
    }
-
 
42511
 
-
 
42512
    public void write(TProtocol oprot) throws TException {
-
 
42513
      oprot.writeStructBegin(STRUCT_DESC);
-
 
42514
 
-
 
42515
      if (this.isSetScx()) {
-
 
42516
        oprot.writeFieldBegin(SCX_FIELD_DESC);
-
 
42517
        this.scx.write(oprot);
-
 
42518
        oprot.writeFieldEnd();
-
 
42519
      }
-
 
42520
      oprot.writeFieldStop();
-
 
42521
      oprot.writeStructEnd();
-
 
42522
    }
-
 
42523
 
-
 
42524
    @Override
-
 
42525
    public String toString() {
-
 
42526
      StringBuilder sb = new StringBuilder("applyCouponToCart_result(");
-
 
42527
      boolean first = true;
-
 
42528
 
-
 
42529
      sb.append("scx:");
-
 
42530
      if (this.scx == null) {
-
 
42531
        sb.append("null");
-
 
42532
      } else {
-
 
42533
        sb.append(this.scx);
-
 
42534
      }
-
 
42535
      first = false;
-
 
42536
      sb.append(")");
-
 
42537
      return sb.toString();
-
 
42538
    }
-
 
42539
 
-
 
42540
    public void validate() throws TException {
-
 
42541
      // check for required fields
-
 
42542
    }
-
 
42543
 
-
 
42544
  }
-
 
42545
 
-
 
42546
  public static class removeCoupon_args implements TBase<removeCoupon_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeCoupon_args>   {
-
 
42547
    private static final TStruct STRUCT_DESC = new TStruct("removeCoupon_args");
-
 
42548
 
-
 
42549
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
-
 
42550
 
-
 
42551
    private long cartId;
-
 
42552
 
-
 
42553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
42554
    public enum _Fields implements TFieldIdEnum {
-
 
42555
      CART_ID((short)1, "cartId");
-
 
42556
 
-
 
42557
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
42558
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
42559
 
-
 
42560
      static {
-
 
42561
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
42562
          byId.put((int)field._thriftId, field);
-
 
42563
          byName.put(field.getFieldName(), field);
-
 
42564
        }
-
 
42565
      }
-
 
42566
 
-
 
42567
      /**
-
 
42568
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
42569
       */
-
 
42570
      public static _Fields findByThriftId(int fieldId) {
-
 
42571
        return byId.get(fieldId);
-
 
42572
      }
-
 
42573
 
-
 
42574
      /**
-
 
42575
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
42576
       * if it is not found.
-
 
42577
       */
-
 
42578
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
42579
        _Fields fields = findByThriftId(fieldId);
-
 
42580
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
42581
        return fields;
-
 
42582
      }
-
 
42583
 
-
 
42584
      /**
-
 
42585
       * Find the _Fields constant that matches name, or null if its not found.
-
 
42586
       */
-
 
42587
      public static _Fields findByName(String name) {
-
 
42588
        return byName.get(name);
-
 
42589
      }
-
 
42590
 
-
 
42591
      private final short _thriftId;
-
 
42592
      private final String _fieldName;
-
 
42593
 
-
 
42594
      _Fields(short thriftId, String fieldName) {
-
 
42595
        _thriftId = thriftId;
-
 
42596
        _fieldName = fieldName;
-
 
42597
      }
-
 
42598
 
-
 
42599
      public short getThriftFieldId() {
-
 
42600
        return _thriftId;
-
 
42601
      }
-
 
42602
 
-
 
42603
      public String getFieldName() {
-
 
42604
        return _fieldName;
-
 
42605
      }
-
 
42606
    }
-
 
42607
 
-
 
42608
    // isset id assignments
-
 
42609
    private static final int __CARTID_ISSET_ID = 0;
-
 
42610
    private BitSet __isset_bit_vector = new BitSet(1);
-
 
42611
 
-
 
42612
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
42613
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
-
 
42614
          new FieldValueMetaData(TType.I64)));
-
 
42615
    }});
-
 
42616
 
-
 
42617
    static {
-
 
42618
      FieldMetaData.addStructMetaDataMap(removeCoupon_args.class, metaDataMap);
-
 
42619
    }
-
 
42620
 
-
 
42621
    public removeCoupon_args() {
-
 
42622
    }
-
 
42623
 
-
 
42624
    public removeCoupon_args(
-
 
42625
      long cartId)
-
 
42626
    {
-
 
42627
      this();
-
 
42628
      this.cartId = cartId;
-
 
42629
      setCartIdIsSet(true);
-
 
42630
    }
-
 
42631
 
-
 
42632
    /**
-
 
42633
     * Performs a deep copy on <i>other</i>.
-
 
42634
     */
-
 
42635
    public removeCoupon_args(removeCoupon_args other) {
-
 
42636
      __isset_bit_vector.clear();
-
 
42637
      __isset_bit_vector.or(other.__isset_bit_vector);
-
 
42638
      this.cartId = other.cartId;
-
 
42639
    }
-
 
42640
 
-
 
42641
    public removeCoupon_args deepCopy() {
-
 
42642
      return new removeCoupon_args(this);
-
 
42643
    }
-
 
42644
 
-
 
42645
    @Deprecated
-
 
42646
    public removeCoupon_args clone() {
-
 
42647
      return new removeCoupon_args(this);
-
 
42648
    }
-
 
42649
 
-
 
42650
    public long getCartId() {
-
 
42651
      return this.cartId;
-
 
42652
    }
-
 
42653
 
-
 
42654
    public removeCoupon_args setCartId(long cartId) {
-
 
42655
      this.cartId = cartId;
-
 
42656
      setCartIdIsSet(true);
-
 
42657
      return this;
-
 
42658
    }
-
 
42659
 
-
 
42660
    public void unsetCartId() {
-
 
42661
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
-
 
42662
    }
-
 
42663
 
-
 
42664
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
-
 
42665
    public boolean isSetCartId() {
-
 
42666
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
-
 
42667
    }
-
 
42668
 
-
 
42669
    public void setCartIdIsSet(boolean value) {
-
 
42670
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
-
 
42671
    }
-
 
42672
 
-
 
42673
    public void setFieldValue(_Fields field, Object value) {
-
 
42674
      switch (field) {
-
 
42675
      case CART_ID:
-
 
42676
        if (value == null) {
-
 
42677
          unsetCartId();
-
 
42678
        } else {
-
 
42679
          setCartId((Long)value);
-
 
42680
        }
-
 
42681
        break;
-
 
42682
 
-
 
42683
      }
-
 
42684
    }
-
 
42685
 
-
 
42686
    public void setFieldValue(int fieldID, Object value) {
-
 
42687
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
42688
    }
-
 
42689
 
-
 
42690
    public Object getFieldValue(_Fields field) {
-
 
42691
      switch (field) {
-
 
42692
      case CART_ID:
-
 
42693
        return new Long(getCartId());
-
 
42694
 
-
 
42695
      }
-
 
42696
      throw new IllegalStateException();
-
 
42697
    }
-
 
42698
 
-
 
42699
    public Object getFieldValue(int fieldId) {
-
 
42700
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
42701
    }
-
 
42702
 
-
 
42703
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
42704
    public boolean isSet(_Fields field) {
-
 
42705
      switch (field) {
-
 
42706
      case CART_ID:
-
 
42707
        return isSetCartId();
-
 
42708
      }
-
 
42709
      throw new IllegalStateException();
-
 
42710
    }
-
 
42711
 
-
 
42712
    public boolean isSet(int fieldID) {
-
 
42713
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
42714
    }
-
 
42715
 
-
 
42716
    @Override
-
 
42717
    public boolean equals(Object that) {
-
 
42718
      if (that == null)
-
 
42719
        return false;
-
 
42720
      if (that instanceof removeCoupon_args)
-
 
42721
        return this.equals((removeCoupon_args)that);
-
 
42722
      return false;
-
 
42723
    }
-
 
42724
 
-
 
42725
    public boolean equals(removeCoupon_args that) {
-
 
42726
      if (that == null)
-
 
42727
        return false;
-
 
42728
 
-
 
42729
      boolean this_present_cartId = true;
-
 
42730
      boolean that_present_cartId = true;
-
 
42731
      if (this_present_cartId || that_present_cartId) {
-
 
42732
        if (!(this_present_cartId && that_present_cartId))
-
 
42733
          return false;
-
 
42734
        if (this.cartId != that.cartId)
-
 
42735
          return false;
-
 
42736
      }
-
 
42737
 
-
 
42738
      return true;
-
 
42739
    }
-
 
42740
 
-
 
42741
    @Override
-
 
42742
    public int hashCode() {
-
 
42743
      return 0;
-
 
42744
    }
-
 
42745
 
-
 
42746
    public int compareTo(removeCoupon_args other) {
-
 
42747
      if (!getClass().equals(other.getClass())) {
-
 
42748
        return getClass().getName().compareTo(other.getClass().getName());
-
 
42749
      }
-
 
42750
 
-
 
42751
      int lastComparison = 0;
-
 
42752
      removeCoupon_args typedOther = (removeCoupon_args)other;
-
 
42753
 
-
 
42754
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
-
 
42755
      if (lastComparison != 0) {
-
 
42756
        return lastComparison;
-
 
42757
      }
-
 
42758
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
-
 
42759
      if (lastComparison != 0) {
-
 
42760
        return lastComparison;
-
 
42761
      }
-
 
42762
      return 0;
-
 
42763
    }
-
 
42764
 
-
 
42765
    public void read(TProtocol iprot) throws TException {
-
 
42766
      TField field;
-
 
42767
      iprot.readStructBegin();
-
 
42768
      while (true)
-
 
42769
      {
-
 
42770
        field = iprot.readFieldBegin();
-
 
42771
        if (field.type == TType.STOP) { 
-
 
42772
          break;
-
 
42773
        }
-
 
42774
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
42775
        if (fieldId == null) {
-
 
42776
          TProtocolUtil.skip(iprot, field.type);
-
 
42777
        } else {
-
 
42778
          switch (fieldId) {
-
 
42779
            case CART_ID:
-
 
42780
              if (field.type == TType.I64) {
-
 
42781
                this.cartId = iprot.readI64();
-
 
42782
                setCartIdIsSet(true);
-
 
42783
              } else { 
-
 
42784
                TProtocolUtil.skip(iprot, field.type);
-
 
42785
              }
-
 
42786
              break;
-
 
42787
          }
-
 
42788
          iprot.readFieldEnd();
-
 
42789
        }
-
 
42790
      }
-
 
42791
      iprot.readStructEnd();
-
 
42792
      validate();
-
 
42793
    }
-
 
42794
 
-
 
42795
    public void write(TProtocol oprot) throws TException {
-
 
42796
      validate();
-
 
42797
 
-
 
42798
      oprot.writeStructBegin(STRUCT_DESC);
-
 
42799
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
-
 
42800
      oprot.writeI64(this.cartId);
-
 
42801
      oprot.writeFieldEnd();
-
 
42802
      oprot.writeFieldStop();
-
 
42803
      oprot.writeStructEnd();
-
 
42804
    }
-
 
42805
 
-
 
42806
    @Override
-
 
42807
    public String toString() {
-
 
42808
      StringBuilder sb = new StringBuilder("removeCoupon_args(");
-
 
42809
      boolean first = true;
-
 
42810
 
-
 
42811
      sb.append("cartId:");
-
 
42812
      sb.append(this.cartId);
-
 
42813
      first = false;
-
 
42814
      sb.append(")");
-
 
42815
      return sb.toString();
-
 
42816
    }
-
 
42817
 
-
 
42818
    public void validate() throws TException {
-
 
42819
      // check for required fields
-
 
42820
    }
-
 
42821
 
-
 
42822
  }
-
 
42823
 
-
 
42824
  public static class removeCoupon_result implements TBase<removeCoupon_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeCoupon_result>   {
-
 
42825
    private static final TStruct STRUCT_DESC = new TStruct("removeCoupon_result");
-
 
42826
 
-
 
42827
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
-
 
42828
 
-
 
42829
    private ShoppingCartException scx;
-
 
42830
 
-
 
42831
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
-
 
42832
    public enum _Fields implements TFieldIdEnum {
-
 
42833
      SCX((short)1, "scx");
-
 
42834
 
-
 
42835
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
-
 
42836
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
-
 
42837
 
-
 
42838
      static {
-
 
42839
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
-
 
42840
          byId.put((int)field._thriftId, field);
-
 
42841
          byName.put(field.getFieldName(), field);
-
 
42842
        }
-
 
42843
      }
-
 
42844
 
-
 
42845
      /**
-
 
42846
       * Find the _Fields constant that matches fieldId, or null if its not found.
-
 
42847
       */
-
 
42848
      public static _Fields findByThriftId(int fieldId) {
-
 
42849
        return byId.get(fieldId);
-
 
42850
      }
-
 
42851
 
-
 
42852
      /**
-
 
42853
       * Find the _Fields constant that matches fieldId, throwing an exception
-
 
42854
       * if it is not found.
-
 
42855
       */
-
 
42856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
-
 
42857
        _Fields fields = findByThriftId(fieldId);
-
 
42858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
-
 
42859
        return fields;
-
 
42860
      }
-
 
42861
 
-
 
42862
      /**
-
 
42863
       * Find the _Fields constant that matches name, or null if its not found.
-
 
42864
       */
-
 
42865
      public static _Fields findByName(String name) {
-
 
42866
        return byName.get(name);
-
 
42867
      }
-
 
42868
 
-
 
42869
      private final short _thriftId;
-
 
42870
      private final String _fieldName;
-
 
42871
 
-
 
42872
      _Fields(short thriftId, String fieldName) {
-
 
42873
        _thriftId = thriftId;
-
 
42874
        _fieldName = fieldName;
-
 
42875
      }
-
 
42876
 
-
 
42877
      public short getThriftFieldId() {
-
 
42878
        return _thriftId;
-
 
42879
      }
-
 
42880
 
-
 
42881
      public String getFieldName() {
-
 
42882
        return _fieldName;
-
 
42883
      }
-
 
42884
    }
-
 
42885
 
-
 
42886
    // isset id assignments
-
 
42887
 
-
 
42888
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
-
 
42889
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
-
 
42890
          new FieldValueMetaData(TType.STRUCT)));
-
 
42891
    }});
-
 
42892
 
-
 
42893
    static {
-
 
42894
      FieldMetaData.addStructMetaDataMap(removeCoupon_result.class, metaDataMap);
-
 
42895
    }
-
 
42896
 
-
 
42897
    public removeCoupon_result() {
-
 
42898
    }
-
 
42899
 
-
 
42900
    public removeCoupon_result(
-
 
42901
      ShoppingCartException scx)
-
 
42902
    {
-
 
42903
      this();
-
 
42904
      this.scx = scx;
-
 
42905
    }
-
 
42906
 
-
 
42907
    /**
-
 
42908
     * Performs a deep copy on <i>other</i>.
-
 
42909
     */
-
 
42910
    public removeCoupon_result(removeCoupon_result other) {
-
 
42911
      if (other.isSetScx()) {
-
 
42912
        this.scx = new ShoppingCartException(other.scx);
-
 
42913
      }
-
 
42914
    }
-
 
42915
 
-
 
42916
    public removeCoupon_result deepCopy() {
-
 
42917
      return new removeCoupon_result(this);
-
 
42918
    }
-
 
42919
 
-
 
42920
    @Deprecated
-
 
42921
    public removeCoupon_result clone() {
-
 
42922
      return new removeCoupon_result(this);
-
 
42923
    }
-
 
42924
 
-
 
42925
    public ShoppingCartException getScx() {
-
 
42926
      return this.scx;
-
 
42927
    }
-
 
42928
 
-
 
42929
    public removeCoupon_result setScx(ShoppingCartException scx) {
-
 
42930
      this.scx = scx;
-
 
42931
      return this;
-
 
42932
    }
-
 
42933
 
-
 
42934
    public void unsetScx() {
-
 
42935
      this.scx = null;
-
 
42936
    }
-
 
42937
 
-
 
42938
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
-
 
42939
    public boolean isSetScx() {
-
 
42940
      return this.scx != null;
-
 
42941
    }
-
 
42942
 
-
 
42943
    public void setScxIsSet(boolean value) {
-
 
42944
      if (!value) {
-
 
42945
        this.scx = null;
-
 
42946
      }
-
 
42947
    }
-
 
42948
 
-
 
42949
    public void setFieldValue(_Fields field, Object value) {
-
 
42950
      switch (field) {
-
 
42951
      case SCX:
-
 
42952
        if (value == null) {
-
 
42953
          unsetScx();
-
 
42954
        } else {
-
 
42955
          setScx((ShoppingCartException)value);
-
 
42956
        }
-
 
42957
        break;
-
 
42958
 
-
 
42959
      }
-
 
42960
    }
-
 
42961
 
-
 
42962
    public void setFieldValue(int fieldID, Object value) {
-
 
42963
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
-
 
42964
    }
-
 
42965
 
-
 
42966
    public Object getFieldValue(_Fields field) {
-
 
42967
      switch (field) {
-
 
42968
      case SCX:
-
 
42969
        return getScx();
-
 
42970
 
-
 
42971
      }
-
 
42972
      throw new IllegalStateException();
-
 
42973
    }
-
 
42974
 
-
 
42975
    public Object getFieldValue(int fieldId) {
-
 
42976
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
-
 
42977
    }
-
 
42978
 
-
 
42979
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
-
 
42980
    public boolean isSet(_Fields field) {
-
 
42981
      switch (field) {
-
 
42982
      case SCX:
-
 
42983
        return isSetScx();
-
 
42984
      }
-
 
42985
      throw new IllegalStateException();
-
 
42986
    }
-
 
42987
 
-
 
42988
    public boolean isSet(int fieldID) {
-
 
42989
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
-
 
42990
    }
-
 
42991
 
-
 
42992
    @Override
-
 
42993
    public boolean equals(Object that) {
-
 
42994
      if (that == null)
-
 
42995
        return false;
-
 
42996
      if (that instanceof removeCoupon_result)
-
 
42997
        return this.equals((removeCoupon_result)that);
-
 
42998
      return false;
-
 
42999
    }
-
 
43000
 
-
 
43001
    public boolean equals(removeCoupon_result that) {
-
 
43002
      if (that == null)
-
 
43003
        return false;
-
 
43004
 
-
 
43005
      boolean this_present_scx = true && this.isSetScx();
-
 
43006
      boolean that_present_scx = true && that.isSetScx();
-
 
43007
      if (this_present_scx || that_present_scx) {
-
 
43008
        if (!(this_present_scx && that_present_scx))
-
 
43009
          return false;
-
 
43010
        if (!this.scx.equals(that.scx))
-
 
43011
          return false;
-
 
43012
      }
-
 
43013
 
-
 
43014
      return true;
-
 
43015
    }
-
 
43016
 
-
 
43017
    @Override
-
 
43018
    public int hashCode() {
-
 
43019
      return 0;
-
 
43020
    }
-
 
43021
 
-
 
43022
    public int compareTo(removeCoupon_result other) {
-
 
43023
      if (!getClass().equals(other.getClass())) {
-
 
43024
        return getClass().getName().compareTo(other.getClass().getName());
-
 
43025
      }
-
 
43026
 
-
 
43027
      int lastComparison = 0;
-
 
43028
      removeCoupon_result typedOther = (removeCoupon_result)other;
-
 
43029
 
-
 
43030
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
-
 
43031
      if (lastComparison != 0) {
-
 
43032
        return lastComparison;
-
 
43033
      }
-
 
43034
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
-
 
43035
      if (lastComparison != 0) {
-
 
43036
        return lastComparison;
-
 
43037
      }
-
 
43038
      return 0;
-
 
43039
    }
-
 
43040
 
-
 
43041
    public void read(TProtocol iprot) throws TException {
-
 
43042
      TField field;
-
 
43043
      iprot.readStructBegin();
-
 
43044
      while (true)
-
 
43045
      {
-
 
43046
        field = iprot.readFieldBegin();
-
 
43047
        if (field.type == TType.STOP) { 
-
 
43048
          break;
-
 
43049
        }
-
 
43050
        _Fields fieldId = _Fields.findByThriftId(field.id);
-
 
43051
        if (fieldId == null) {
-
 
43052
          TProtocolUtil.skip(iprot, field.type);
-
 
43053
        } else {
-
 
43054
          switch (fieldId) {
-
 
43055
            case SCX:
-
 
43056
              if (field.type == TType.STRUCT) {
-
 
43057
                this.scx = new ShoppingCartException();
-
 
43058
                this.scx.read(iprot);
-
 
43059
              } else { 
-
 
43060
                TProtocolUtil.skip(iprot, field.type);
-
 
43061
              }
-
 
43062
              break;
-
 
43063
          }
-
 
43064
          iprot.readFieldEnd();
-
 
43065
        }
-
 
43066
      }
-
 
43067
      iprot.readStructEnd();
-
 
43068
      validate();
-
 
43069
    }
-
 
43070
 
-
 
43071
    public void write(TProtocol oprot) throws TException {
-
 
43072
      oprot.writeStructBegin(STRUCT_DESC);
-
 
43073
 
-
 
43074
      if (this.isSetScx()) {
-
 
43075
        oprot.writeFieldBegin(SCX_FIELD_DESC);
-
 
43076
        this.scx.write(oprot);
-
 
43077
        oprot.writeFieldEnd();
-
 
43078
      }
-
 
43079
      oprot.writeFieldStop();
-
 
43080
      oprot.writeStructEnd();
-
 
43081
    }
-
 
43082
 
-
 
43083
    @Override
-
 
43084
    public String toString() {
-
 
43085
      StringBuilder sb = new StringBuilder("removeCoupon_result(");
-
 
43086
      boolean first = true;
-
 
43087
 
-
 
43088
      sb.append("scx:");
-
 
43089
      if (this.scx == null) {
-
 
43090
        sb.append("null");
-
 
43091
      } else {
-
 
43092
        sb.append(this.scx);
-
 
43093
      }
-
 
43094
      first = false;
-
 
43095
      sb.append(")");
-
 
43096
      return sb.toString();
-
 
43097
    }
-
 
43098
 
-
 
43099
    public void validate() throws TException {
-
 
43100
      // check for required fields
-
 
43101
    }
-
 
43102
 
-
 
43103
  }
-
 
43104
 
41616
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
43105
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
41617
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
43106
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
41618
 
43107
 
41619
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
43108
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
41620
 
43109
 
Line 44387... Line 45876...
44387
              }
45876
              }
44388
              break;
45877
              break;
44389
            case ITEMS:
45878
            case ITEMS:
44390
              if (field.type == TType.MAP) {
45879
              if (field.type == TType.MAP) {
44391
                {
45880
                {
44392
                  TMap _map64 = iprot.readMapBegin();
45881
                  TMap _map68 = iprot.readMapBegin();
44393
                  this.items = new HashMap<Long,Double>(2*_map64.size);
45882
                  this.items = new HashMap<Long,Double>(2*_map68.size);
44394
                  for (int _i65 = 0; _i65 < _map64.size; ++_i65)
45883
                  for (int _i69 = 0; _i69 < _map68.size; ++_i69)
44395
                  {
45884
                  {
44396
                    long _key66;
45885
                    long _key70;
44397
                    double _val67;
45886
                    double _val71;
44398
                    _key66 = iprot.readI64();
45887
                    _key70 = iprot.readI64();
44399
                    _val67 = iprot.readDouble();
45888
                    _val71 = iprot.readDouble();
44400
                    this.items.put(_key66, _val67);
45889
                    this.items.put(_key70, _val71);
44401
                  }
45890
                  }
44402
                  iprot.readMapEnd();
45891
                  iprot.readMapEnd();
44403
                }
45892
                }
44404
              } else { 
45893
              } else { 
44405
                TProtocolUtil.skip(iprot, field.type);
45894
                TProtocolUtil.skip(iprot, field.type);
Line 44422... Line 45911...
44422
      oprot.writeFieldEnd();
45911
      oprot.writeFieldEnd();
44423
      if (this.items != null) {
45912
      if (this.items != null) {
44424
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
45913
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
44425
        {
45914
        {
44426
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
45915
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
44427
          for (Map.Entry<Long, Double> _iter68 : this.items.entrySet())
45916
          for (Map.Entry<Long, Double> _iter72 : this.items.entrySet())
44428
          {
45917
          {
44429
            oprot.writeI64(_iter68.getKey());
45918
            oprot.writeI64(_iter72.getKey());
44430
            oprot.writeDouble(_iter68.getValue());
45919
            oprot.writeDouble(_iter72.getValue());
44431
          }
45920
          }
44432
          oprot.writeMapEnd();
45921
          oprot.writeMapEnd();
44433
        }
45922
        }
44434
        oprot.writeFieldEnd();
45923
        oprot.writeFieldEnd();
44435
      }
45924
      }
Line 49852... Line 51341...
49852
        } else {
51341
        } else {
49853
          switch (fieldId) {
51342
          switch (fieldId) {
49854
            case SUCCESS:
51343
            case SUCCESS:
49855
              if (field.type == TType.LIST) {
51344
              if (field.type == TType.LIST) {
49856
                {
51345
                {
49857
                  TList _list69 = iprot.readListBegin();
51346
                  TList _list73 = iprot.readListBegin();
49858
                  this.success = new ArrayList<User>(_list69.size);
51347
                  this.success = new ArrayList<User>(_list73.size);
49859
                  for (int _i70 = 0; _i70 < _list69.size; ++_i70)
51348
                  for (int _i74 = 0; _i74 < _list73.size; ++_i74)
49860
                  {
51349
                  {
49861
                    User _elem71;
51350
                    User _elem75;
49862
                    _elem71 = new User();
51351
                    _elem75 = new User();
49863
                    _elem71.read(iprot);
51352
                    _elem75.read(iprot);
49864
                    this.success.add(_elem71);
51353
                    this.success.add(_elem75);
49865
                  }
51354
                  }
49866
                  iprot.readListEnd();
51355
                  iprot.readListEnd();
49867
                }
51356
                }
49868
              } else { 
51357
              } else { 
49869
                TProtocolUtil.skip(iprot, field.type);
51358
                TProtocolUtil.skip(iprot, field.type);
Line 49882... Line 51371...
49882
 
51371
 
49883
      if (this.isSetSuccess()) {
51372
      if (this.isSetSuccess()) {
49884
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
51373
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
49885
        {
51374
        {
49886
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
51375
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
49887
          for (User _iter72 : this.success)
51376
          for (User _iter76 : this.success)
49888
          {
51377
          {
49889
            _iter72.write(oprot);
51378
            _iter76.write(oprot);
49890
          }
51379
          }
49891
          oprot.writeListEnd();
51380
          oprot.writeListEnd();
49892
        }
51381
        }
49893
        oprot.writeFieldEnd();
51382
        oprot.writeFieldEnd();
49894
      }
51383
      }