Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
48 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class UserContextService {
27
 
28
  /**
29
   * service
30
   */
31
  public interface Iface {
32
 
553 chandransh 33
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException;
48 ashish 34
 
553 chandransh 35
    public User getUserById(long userId) throws UserContextException, TException;
48 ashish 36
 
553 chandransh 37
    public User createUser(User user) throws UserContextException, TException;
48 ashish 38
 
553 chandransh 39
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 40
 
553 chandransh 41
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 42
 
553 chandransh 43
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 44
 
553 chandransh 45
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 46
 
47
    public boolean userExists(String email) throws UserContextException, TException;
48
 
571 rajveer 49
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 50
 
51
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
52
 
53
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
54
 
55
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
56
 
506 rajveer 57
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
58
 
593 rajveer 59
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 60
 
582 rajveer 61
    public boolean forgotPassword(String email) throws UserContextException, TException;
62
 
593 rajveer 63
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
64
 
65
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
66
 
553 chandransh 67
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 68
 
553 chandransh 69
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 70
 
553 chandransh 71
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 72
 
553 chandransh 73
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 74
 
553 chandransh 75
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 76
 
553 chandransh 77
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 78
 
553 chandransh 79
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 80
 
553 chandransh 81
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 82
 
553 chandransh 83
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
84
 
85
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
86
 
87
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
88
 
578 chandransh 89
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 90
 
688 chandransh 91
    /**
92
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
93
     * 
94
     * @param cartId
95
     */
96
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 97
 
688 chandransh 98
    /**
99
     * Validates that:
100
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
101
     * 2. None of the lines in the cart for an inactive item.
102
     * 3. The estimate for any of the lines in cart doesn't change.
103
     * Returns true only if all three hold.
104
     * 
105
     * @param cartId
106
     */
578 chandransh 107
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 108
 
688 chandransh 109
    /**
110
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
111
     * 
112
     * @param fromCartId
113
     * @param toCartId
114
     */
553 chandransh 115
    public void mergeCart(long fromCartId, long toCartId) throws TException;
116
 
688 chandransh 117
    /**
118
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
119
     * 
120
     * @param cartId
121
     */
122
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
123
 
124
    /**
125
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
126
     * This methods removes the specified quantiry of the specified item from the cart.
127
     * 
128
     * @param cartId
129
     * @param items
130
     */
708 rajveer 131
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 132
 
553 chandransh 133
    public void addWidget(Widget widget) throws WidgetException, TException;
134
 
135
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException;
136
 
137
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException;
138
 
139
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException;
140
 
141
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException;
142
 
143
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException;
144
 
145
    public Widget getMyResearch(long user_id) throws WidgetException, TException;
146
 
147
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException;
148
 
149
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException;
150
 
151
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException;
152
 
153
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException;
154
 
155
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException;
156
 
157
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException;
158
 
48 ashish 159
  }
160
 
161
  public static class Client implements Iface {
162
    public Client(TProtocol prot)
163
    {
164
      this(prot, prot);
165
    }
166
 
167
    public Client(TProtocol iprot, TProtocol oprot)
168
    {
169
      iprot_ = iprot;
170
      oprot_ = oprot;
171
    }
172
 
173
    protected TProtocol iprot_;
174
    protected TProtocol oprot_;
175
 
176
    protected int seqid_;
177
 
178
    public TProtocol getInputProtocol()
179
    {
180
      return this.iprot_;
181
    }
182
 
183
    public TProtocol getOutputProtocol()
184
    {
185
      return this.oprot_;
186
    }
187
 
553 chandransh 188
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 189
    {
553 chandransh 190
      send_createAnonymousUser(jsessionId);
191
      return recv_createAnonymousUser();
48 ashish 192
    }
193
 
553 chandransh 194
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 195
    {
553 chandransh 196
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
197
      createAnonymousUser_args args = new createAnonymousUser_args();
198
      args.jsessionId = jsessionId;
48 ashish 199
      args.write(oprot_);
200
      oprot_.writeMessageEnd();
201
      oprot_.getTransport().flush();
202
    }
203
 
553 chandransh 204
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 205
    {
206
      TMessage msg = iprot_.readMessageBegin();
207
      if (msg.type == TMessageType.EXCEPTION) {
208
        TApplicationException x = TApplicationException.read(iprot_);
209
        iprot_.readMessageEnd();
210
        throw x;
211
      }
553 chandransh 212
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 213
      result.read(iprot_);
214
      iprot_.readMessageEnd();
215
      if (result.isSetSuccess()) {
216
        return result.success;
217
      }
553 chandransh 218
      if (result.ucex != null) {
219
        throw result.ucex;
48 ashish 220
      }
553 chandransh 221
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 222
    }
223
 
553 chandransh 224
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 225
    {
553 chandransh 226
      send_getUserById(userId);
227
      return recv_getUserById();
48 ashish 228
    }
229
 
553 chandransh 230
    public void send_getUserById(long userId) throws TException
48 ashish 231
    {
553 chandransh 232
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
233
      getUserById_args args = new getUserById_args();
48 ashish 234
      args.userId = userId;
235
      args.write(oprot_);
236
      oprot_.writeMessageEnd();
237
      oprot_.getTransport().flush();
238
    }
239
 
553 chandransh 240
    public User recv_getUserById() throws UserContextException, TException
48 ashish 241
    {
242
      TMessage msg = iprot_.readMessageBegin();
243
      if (msg.type == TMessageType.EXCEPTION) {
244
        TApplicationException x = TApplicationException.read(iprot_);
245
        iprot_.readMessageEnd();
246
        throw x;
247
      }
553 chandransh 248
      getUserById_result result = new getUserById_result();
48 ashish 249
      result.read(iprot_);
250
      iprot_.readMessageEnd();
251
      if (result.isSetSuccess()) {
252
        return result.success;
253
      }
553 chandransh 254
      if (result.ucex != null) {
255
        throw result.ucex;
48 ashish 256
      }
553 chandransh 257
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 258
    }
259
 
553 chandransh 260
    public User createUser(User user) throws UserContextException, TException
48 ashish 261
    {
553 chandransh 262
      send_createUser(user);
263
      return recv_createUser();
48 ashish 264
    }
265
 
553 chandransh 266
    public void send_createUser(User user) throws TException
48 ashish 267
    {
553 chandransh 268
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
269
      createUser_args args = new createUser_args();
270
      args.user = user;
48 ashish 271
      args.write(oprot_);
272
      oprot_.writeMessageEnd();
273
      oprot_.getTransport().flush();
274
    }
275
 
553 chandransh 276
    public User recv_createUser() throws UserContextException, TException
48 ashish 277
    {
278
      TMessage msg = iprot_.readMessageBegin();
279
      if (msg.type == TMessageType.EXCEPTION) {
280
        TApplicationException x = TApplicationException.read(iprot_);
281
        iprot_.readMessageEnd();
282
        throw x;
283
      }
553 chandransh 284
      createUser_result result = new createUser_result();
48 ashish 285
      result.read(iprot_);
286
      iprot_.readMessageEnd();
287
      if (result.isSetSuccess()) {
288
        return result.success;
289
      }
553 chandransh 290
      if (result.ucex != null) {
291
        throw result.ucex;
48 ashish 292
      }
553 chandransh 293
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 294
    }
295
 
553 chandransh 296
    public User updateUser(User user) throws UserContextException, TException
48 ashish 297
    {
553 chandransh 298
      send_updateUser(user);
299
      return recv_updateUser();
48 ashish 300
    }
301
 
553 chandransh 302
    public void send_updateUser(User user) throws TException
48 ashish 303
    {
553 chandransh 304
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
305
      updateUser_args args = new updateUser_args();
306
      args.user = user;
48 ashish 307
      args.write(oprot_);
308
      oprot_.writeMessageEnd();
309
      oprot_.getTransport().flush();
310
    }
311
 
553 chandransh 312
    public User recv_updateUser() throws UserContextException, TException
48 ashish 313
    {
314
      TMessage msg = iprot_.readMessageBegin();
315
      if (msg.type == TMessageType.EXCEPTION) {
316
        TApplicationException x = TApplicationException.read(iprot_);
317
        iprot_.readMessageEnd();
318
        throw x;
319
      }
553 chandransh 320
      updateUser_result result = new updateUser_result();
48 ashish 321
      result.read(iprot_);
322
      iprot_.readMessageEnd();
323
      if (result.isSetSuccess()) {
324
        return result.success;
325
      }
553 chandransh 326
      if (result.ucex != null) {
327
        throw result.ucex;
48 ashish 328
      }
553 chandransh 329
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 330
    }
331
 
553 chandransh 332
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 333
    {
553 chandransh 334
      send_deleteUser(userId);
335
      return recv_deleteUser();
48 ashish 336
    }
337
 
553 chandransh 338
    public void send_deleteUser(long userId) throws TException
48 ashish 339
    {
553 chandransh 340
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
341
      deleteUser_args args = new deleteUser_args();
48 ashish 342
      args.userId = userId;
343
      args.write(oprot_);
344
      oprot_.writeMessageEnd();
345
      oprot_.getTransport().flush();
346
    }
347
 
553 chandransh 348
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 349
    {
350
      TMessage msg = iprot_.readMessageBegin();
351
      if (msg.type == TMessageType.EXCEPTION) {
352
        TApplicationException x = TApplicationException.read(iprot_);
353
        iprot_.readMessageEnd();
354
        throw x;
355
      }
553 chandransh 356
      deleteUser_result result = new deleteUser_result();
48 ashish 357
      result.read(iprot_);
358
      iprot_.readMessageEnd();
359
      if (result.isSetSuccess()) {
360
        return result.success;
361
      }
553 chandransh 362
      if (result.ucex != null) {
363
        throw result.ucex;
48 ashish 364
      }
553 chandransh 365
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 366
    }
367
 
553 chandransh 368
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 369
    {
553 chandransh 370
      send_getUserState(userId);
371
      return recv_getUserState();
48 ashish 372
    }
373
 
553 chandransh 374
    public void send_getUserState(long userId) throws TException
48 ashish 375
    {
553 chandransh 376
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
377
      getUserState_args args = new getUserState_args();
48 ashish 378
      args.userId = userId;
379
      args.write(oprot_);
380
      oprot_.writeMessageEnd();
381
      oprot_.getTransport().flush();
382
    }
383
 
553 chandransh 384
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 385
    {
386
      TMessage msg = iprot_.readMessageBegin();
387
      if (msg.type == TMessageType.EXCEPTION) {
388
        TApplicationException x = TApplicationException.read(iprot_);
389
        iprot_.readMessageEnd();
390
        throw x;
391
      }
553 chandransh 392
      getUserState_result result = new getUserState_result();
48 ashish 393
      result.read(iprot_);
394
      iprot_.readMessageEnd();
395
      if (result.isSetSuccess()) {
396
        return result.success;
397
      }
553 chandransh 398
      if (result.ucex != null) {
399
        throw result.ucex;
48 ashish 400
      }
553 chandransh 401
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 402
    }
403
 
553 chandransh 404
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 405
    {
553 chandransh 406
      send_authenticateUser(email, password);
123 ashish 407
      return recv_authenticateUser();
408
    }
409
 
553 chandransh 410
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 411
    {
412
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
413
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 414
      args.email = email;
123 ashish 415
      args.password = password;
416
      args.write(oprot_);
417
      oprot_.writeMessageEnd();
418
      oprot_.getTransport().flush();
419
    }
420
 
553 chandransh 421
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 422
    {
423
      TMessage msg = iprot_.readMessageBegin();
424
      if (msg.type == TMessageType.EXCEPTION) {
425
        TApplicationException x = TApplicationException.read(iprot_);
426
        iprot_.readMessageEnd();
427
        throw x;
428
      }
429
      authenticateUser_result result = new authenticateUser_result();
430
      result.read(iprot_);
431
      iprot_.readMessageEnd();
432
      if (result.isSetSuccess()) {
433
        return result.success;
434
      }
553 chandransh 435
      if (result.auex != null) {
436
        throw result.auex;
123 ashish 437
      }
438
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
439
    }
440
 
48 ashish 441
    public boolean userExists(String email) throws UserContextException, TException
442
    {
443
      send_userExists(email);
444
      return recv_userExists();
445
    }
446
 
447
    public void send_userExists(String email) throws TException
448
    {
449
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
450
      userExists_args args = new userExists_args();
451
      args.email = email;
452
      args.write(oprot_);
453
      oprot_.writeMessageEnd();
454
      oprot_.getTransport().flush();
455
    }
456
 
457
    public boolean recv_userExists() throws UserContextException, TException
458
    {
459
      TMessage msg = iprot_.readMessageBegin();
460
      if (msg.type == TMessageType.EXCEPTION) {
461
        TApplicationException x = TApplicationException.read(iprot_);
462
        iprot_.readMessageEnd();
463
        throw x;
464
      }
465
      userExists_result result = new userExists_result();
466
      result.read(iprot_);
467
      iprot_.readMessageEnd();
468
      if (result.isSetSuccess()) {
469
        return result.success;
470
      }
471
      if (result.ucx != null) {
472
        throw result.ucx;
473
      }
474
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
475
    }
476
 
571 rajveer 477
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 478
    {
571 rajveer 479
      send_addAddressForUser(userId, address, setDefault);
48 ashish 480
      return recv_addAddressForUser();
481
    }
482
 
571 rajveer 483
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 484
    {
485
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
486
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 487
      args.userId = userId;
48 ashish 488
      args.address = address;
513 rajveer 489
      args.setDefault = setDefault;
48 ashish 490
      args.write(oprot_);
491
      oprot_.writeMessageEnd();
492
      oprot_.getTransport().flush();
493
    }
494
 
571 rajveer 495
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 496
    {
497
      TMessage msg = iprot_.readMessageBegin();
498
      if (msg.type == TMessageType.EXCEPTION) {
499
        TApplicationException x = TApplicationException.read(iprot_);
500
        iprot_.readMessageEnd();
501
        throw x;
502
      }
503
      addAddressForUser_result result = new addAddressForUser_result();
504
      result.read(iprot_);
505
      iprot_.readMessageEnd();
506
      if (result.isSetSuccess()) {
507
        return result.success;
508
      }
509
      if (result.ucx != null) {
510
        throw result.ucx;
511
      }
512
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
513
    }
514
 
515
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
516
    {
517
      send_removeAddressForUser(userid, addressId);
518
      return recv_removeAddressForUser();
519
    }
520
 
521
    public void send_removeAddressForUser(long userid, long addressId) throws TException
522
    {
523
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
524
      removeAddressForUser_args args = new removeAddressForUser_args();
525
      args.userid = userid;
526
      args.addressId = addressId;
527
      args.write(oprot_);
528
      oprot_.writeMessageEnd();
529
      oprot_.getTransport().flush();
530
    }
531
 
532
    public boolean recv_removeAddressForUser() throws UserContextException, TException
533
    {
534
      TMessage msg = iprot_.readMessageBegin();
535
      if (msg.type == TMessageType.EXCEPTION) {
536
        TApplicationException x = TApplicationException.read(iprot_);
537
        iprot_.readMessageEnd();
538
        throw x;
539
      }
540
      removeAddressForUser_result result = new removeAddressForUser_result();
541
      result.read(iprot_);
542
      iprot_.readMessageEnd();
543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
546
      if (result.ucx != null) {
547
        throw result.ucx;
548
      }
549
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
550
    }
551
 
552
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
553
    {
554
      send_setUserAsLoggedIn(userId, timestamp);
555
      return recv_setUserAsLoggedIn();
556
    }
557
 
558
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
559
    {
560
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
561
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
562
      args.userId = userId;
563
      args.timestamp = timestamp;
564
      args.write(oprot_);
565
      oprot_.writeMessageEnd();
566
      oprot_.getTransport().flush();
567
    }
568
 
569
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
570
    {
571
      TMessage msg = iprot_.readMessageBegin();
572
      if (msg.type == TMessageType.EXCEPTION) {
573
        TApplicationException x = TApplicationException.read(iprot_);
574
        iprot_.readMessageEnd();
575
        throw x;
576
      }
577
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
578
      result.read(iprot_);
579
      iprot_.readMessageEnd();
580
      if (result.isSetSuccess()) {
581
        return result.success;
582
      }
583
      if (result.ucx != null) {
584
        throw result.ucx;
585
      }
586
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
587
    }
588
 
589
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
590
    {
591
      send_setUserAsLoggedOut(userid, timestamp);
592
      return recv_setUserAsLoggedOut();
593
    }
594
 
595
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
596
    {
597
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
598
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
599
      args.userid = userid;
600
      args.timestamp = timestamp;
601
      args.write(oprot_);
602
      oprot_.writeMessageEnd();
603
      oprot_.getTransport().flush();
604
    }
605
 
606
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
607
    {
608
      TMessage msg = iprot_.readMessageBegin();
609
      if (msg.type == TMessageType.EXCEPTION) {
610
        TApplicationException x = TApplicationException.read(iprot_);
611
        iprot_.readMessageEnd();
612
        throw x;
613
      }
614
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
615
      result.read(iprot_);
616
      iprot_.readMessageEnd();
617
      if (result.isSetSuccess()) {
618
        return result.success;
619
      }
620
      if (result.ucx != null) {
621
        throw result.ucx;
622
      }
623
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
624
    }
625
 
506 rajveer 626
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
627
    {
628
      send_setDefaultAddress(userid, addressId);
629
      return recv_setDefaultAddress();
630
    }
631
 
632
    public void send_setDefaultAddress(long userid, long addressId) throws TException
633
    {
634
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
635
      setDefaultAddress_args args = new setDefaultAddress_args();
636
      args.userid = userid;
637
      args.addressId = addressId;
638
      args.write(oprot_);
639
      oprot_.writeMessageEnd();
640
      oprot_.getTransport().flush();
641
    }
642
 
643
    public boolean recv_setDefaultAddress() throws UserContextException, TException
644
    {
645
      TMessage msg = iprot_.readMessageBegin();
646
      if (msg.type == TMessageType.EXCEPTION) {
647
        TApplicationException x = TApplicationException.read(iprot_);
648
        iprot_.readMessageEnd();
649
        throw x;
650
      }
651
      setDefaultAddress_result result = new setDefaultAddress_result();
652
      result.read(iprot_);
653
      iprot_.readMessageEnd();
654
      if (result.isSetSuccess()) {
655
        return result.success;
656
      }
657
      if (result.ucx != null) {
658
        throw result.ucx;
659
      }
660
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
661
    }
662
 
593 rajveer 663
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 664
    {
593 rajveer 665
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 666
      return recv_updatePassword();
667
    }
668
 
593 rajveer 669
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 670
    {
671
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
672
      updatePassword_args args = new updatePassword_args();
673
      args.userid = userid;
593 rajveer 674
      args.oldPassword = oldPassword;
675
      args.newPassword = newPassword;
48 ashish 676
      args.write(oprot_);
677
      oprot_.writeMessageEnd();
678
      oprot_.getTransport().flush();
679
    }
680
 
681
    public boolean recv_updatePassword() throws UserContextException, TException
682
    {
683
      TMessage msg = iprot_.readMessageBegin();
684
      if (msg.type == TMessageType.EXCEPTION) {
685
        TApplicationException x = TApplicationException.read(iprot_);
686
        iprot_.readMessageEnd();
687
        throw x;
688
      }
689
      updatePassword_result result = new updatePassword_result();
690
      result.read(iprot_);
691
      iprot_.readMessageEnd();
692
      if (result.isSetSuccess()) {
693
        return result.success;
694
      }
695
      if (result.ucx != null) {
696
        throw result.ucx;
697
      }
698
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
699
    }
700
 
582 rajveer 701
    public boolean forgotPassword(String email) throws UserContextException, TException
702
    {
703
      send_forgotPassword(email);
704
      return recv_forgotPassword();
705
    }
706
 
707
    public void send_forgotPassword(String email) throws TException
708
    {
709
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
710
      forgotPassword_args args = new forgotPassword_args();
711
      args.email = email;
712
      args.write(oprot_);
713
      oprot_.writeMessageEnd();
714
      oprot_.getTransport().flush();
715
    }
716
 
717
    public boolean recv_forgotPassword() throws UserContextException, TException
718
    {
719
      TMessage msg = iprot_.readMessageBegin();
720
      if (msg.type == TMessageType.EXCEPTION) {
721
        TApplicationException x = TApplicationException.read(iprot_);
722
        iprot_.readMessageEnd();
723
        throw x;
724
      }
725
      forgotPassword_result result = new forgotPassword_result();
726
      result.read(iprot_);
727
      iprot_.readMessageEnd();
728
      if (result.isSetSuccess()) {
729
        return result.success;
730
      }
731
      if (result.ucx != null) {
732
        throw result.ucx;
733
      }
734
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
735
    }
736
 
593 rajveer 737
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
738
    {
739
      send_getAllAddressesForUser(userId);
740
      return recv_getAllAddressesForUser();
741
    }
742
 
743
    public void send_getAllAddressesForUser(long userId) throws TException
744
    {
745
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
746
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
747
      args.userId = userId;
748
      args.write(oprot_);
749
      oprot_.writeMessageEnd();
750
      oprot_.getTransport().flush();
751
    }
752
 
753
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
754
    {
755
      TMessage msg = iprot_.readMessageBegin();
756
      if (msg.type == TMessageType.EXCEPTION) {
757
        TApplicationException x = TApplicationException.read(iprot_);
758
        iprot_.readMessageEnd();
759
        throw x;
760
      }
761
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
762
      result.read(iprot_);
763
      iprot_.readMessageEnd();
764
      if (result.isSetSuccess()) {
765
        return result.success;
766
      }
767
      if (result.ucx != null) {
768
        throw result.ucx;
769
      }
770
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
771
    }
772
 
773
    public long getDefaultAddressId(long userId) throws UserContextException, TException
774
    {
775
      send_getDefaultAddressId(userId);
776
      return recv_getDefaultAddressId();
777
    }
778
 
779
    public void send_getDefaultAddressId(long userId) throws TException
780
    {
781
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
782
      getDefaultAddressId_args args = new getDefaultAddressId_args();
783
      args.userId = userId;
784
      args.write(oprot_);
785
      oprot_.writeMessageEnd();
786
      oprot_.getTransport().flush();
787
    }
788
 
789
    public long recv_getDefaultAddressId() throws UserContextException, TException
790
    {
791
      TMessage msg = iprot_.readMessageBegin();
792
      if (msg.type == TMessageType.EXCEPTION) {
793
        TApplicationException x = TApplicationException.read(iprot_);
794
        iprot_.readMessageEnd();
795
        throw x;
796
      }
797
      getDefaultAddressId_result result = new getDefaultAddressId_result();
798
      result.read(iprot_);
799
      iprot_.readMessageEnd();
800
      if (result.isSetSuccess()) {
801
        return result.success;
802
      }
803
      if (result.ucx != null) {
804
        throw result.ucx;
805
      }
806
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
807
    }
808
 
553 chandransh 809
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 810
    {
553 chandransh 811
      send_createCart(userId);
812
      return recv_createCart();
48 ashish 813
    }
814
 
553 chandransh 815
    public void send_createCart(long userId) throws TException
48 ashish 816
    {
553 chandransh 817
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
818
      createCart_args args = new createCart_args();
819
      args.userId = userId;
48 ashish 820
      args.write(oprot_);
821
      oprot_.writeMessageEnd();
822
      oprot_.getTransport().flush();
823
    }
824
 
553 chandransh 825
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 826
    {
827
      TMessage msg = iprot_.readMessageBegin();
828
      if (msg.type == TMessageType.EXCEPTION) {
829
        TApplicationException x = TApplicationException.read(iprot_);
830
        iprot_.readMessageEnd();
831
        throw x;
832
      }
553 chandransh 833
      createCart_result result = new createCart_result();
48 ashish 834
      result.read(iprot_);
835
      iprot_.readMessageEnd();
836
      if (result.isSetSuccess()) {
837
        return result.success;
838
      }
553 chandransh 839
      if (result.scx != null) {
840
        throw result.scx;
48 ashish 841
      }
553 chandransh 842
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 843
    }
844
 
553 chandransh 845
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 846
    {
553 chandransh 847
      send_getCurrentCart(userId);
848
      return recv_getCurrentCart();
48 ashish 849
    }
850
 
553 chandransh 851
    public void send_getCurrentCart(long userId) throws TException
48 ashish 852
    {
553 chandransh 853
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
854
      getCurrentCart_args args = new getCurrentCart_args();
855
      args.userId = userId;
48 ashish 856
      args.write(oprot_);
857
      oprot_.writeMessageEnd();
858
      oprot_.getTransport().flush();
859
    }
860
 
553 chandransh 861
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 862
    {
863
      TMessage msg = iprot_.readMessageBegin();
864
      if (msg.type == TMessageType.EXCEPTION) {
865
        TApplicationException x = TApplicationException.read(iprot_);
866
        iprot_.readMessageEnd();
867
        throw x;
868
      }
553 chandransh 869
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 870
      result.read(iprot_);
871
      iprot_.readMessageEnd();
872
      if (result.isSetSuccess()) {
873
        return result.success;
874
      }
553 chandransh 875
      if (result.scx != null) {
876
        throw result.scx;
48 ashish 877
      }
553 chandransh 878
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 879
    }
880
 
553 chandransh 881
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 882
    {
553 chandransh 883
      send_getCart(cartId);
884
      return recv_getCart();
48 ashish 885
    }
886
 
553 chandransh 887
    public void send_getCart(long cartId) throws TException
48 ashish 888
    {
553 chandransh 889
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
890
      getCart_args args = new getCart_args();
891
      args.cartId = cartId;
48 ashish 892
      args.write(oprot_);
893
      oprot_.writeMessageEnd();
894
      oprot_.getTransport().flush();
895
    }
896
 
553 chandransh 897
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 898
    {
899
      TMessage msg = iprot_.readMessageBegin();
900
      if (msg.type == TMessageType.EXCEPTION) {
901
        TApplicationException x = TApplicationException.read(iprot_);
902
        iprot_.readMessageEnd();
903
        throw x;
904
      }
553 chandransh 905
      getCart_result result = new getCart_result();
48 ashish 906
      result.read(iprot_);
907
      iprot_.readMessageEnd();
908
      if (result.isSetSuccess()) {
909
        return result.success;
910
      }
553 chandransh 911
      if (result.scx != null) {
912
        throw result.scx;
48 ashish 913
      }
553 chandransh 914
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 915
    }
916
 
553 chandransh 917
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 918
    {
553 chandransh 919
      send_getCartsForUser(userId, status);
920
      return recv_getCartsForUser();
48 ashish 921
    }
922
 
553 chandransh 923
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 924
    {
553 chandransh 925
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
926
      getCartsForUser_args args = new getCartsForUser_args();
927
      args.userId = userId;
928
      args.status = status;
48 ashish 929
      args.write(oprot_);
930
      oprot_.writeMessageEnd();
931
      oprot_.getTransport().flush();
932
    }
933
 
553 chandransh 934
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 935
    {
936
      TMessage msg = iprot_.readMessageBegin();
937
      if (msg.type == TMessageType.EXCEPTION) {
938
        TApplicationException x = TApplicationException.read(iprot_);
939
        iprot_.readMessageEnd();
940
        throw x;
941
      }
553 chandransh 942
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 943
      result.read(iprot_);
944
      iprot_.readMessageEnd();
945
      if (result.isSetSuccess()) {
946
        return result.success;
947
      }
553 chandransh 948
      if (result.scx != null) {
949
        throw result.scx;
48 ashish 950
      }
553 chandransh 951
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 952
    }
953
 
553 chandransh 954
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 955
    {
553 chandransh 956
      send_getCartsByStatus(status);
957
      return recv_getCartsByStatus();
48 ashish 958
    }
959
 
553 chandransh 960
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 961
    {
553 chandransh 962
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
963
      getCartsByStatus_args args = new getCartsByStatus_args();
964
      args.status = status;
48 ashish 965
      args.write(oprot_);
966
      oprot_.writeMessageEnd();
967
      oprot_.getTransport().flush();
968
    }
969
 
553 chandransh 970
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 971
    {
972
      TMessage msg = iprot_.readMessageBegin();
973
      if (msg.type == TMessageType.EXCEPTION) {
974
        TApplicationException x = TApplicationException.read(iprot_);
975
        iprot_.readMessageEnd();
976
        throw x;
977
      }
553 chandransh 978
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 979
      result.read(iprot_);
980
      iprot_.readMessageEnd();
981
      if (result.isSetSuccess()) {
982
        return result.success;
983
      }
553 chandransh 984
      if (result.scx != null) {
985
        throw result.scx;
48 ashish 986
      }
553 chandransh 987
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 988
    }
989
 
553 chandransh 990
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 991
    {
553 chandransh 992
      send_getCartsByTime(from_time, to_time, status);
993
      return recv_getCartsByTime();
48 ashish 994
    }
995
 
553 chandransh 996
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 997
    {
553 chandransh 998
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
999
      getCartsByTime_args args = new getCartsByTime_args();
1000
      args.from_time = from_time;
1001
      args.to_time = to_time;
1002
      args.status = status;
48 ashish 1003
      args.write(oprot_);
1004
      oprot_.writeMessageEnd();
1005
      oprot_.getTransport().flush();
1006
    }
1007
 
553 chandransh 1008
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 1009
    {
1010
      TMessage msg = iprot_.readMessageBegin();
1011
      if (msg.type == TMessageType.EXCEPTION) {
1012
        TApplicationException x = TApplicationException.read(iprot_);
1013
        iprot_.readMessageEnd();
1014
        throw x;
1015
      }
553 chandransh 1016
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 1017
      result.read(iprot_);
1018
      iprot_.readMessageEnd();
1019
      if (result.isSetSuccess()) {
1020
        return result.success;
1021
      }
553 chandransh 1022
      if (result.scx != null) {
1023
        throw result.scx;
48 ashish 1024
      }
553 chandransh 1025
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 1026
    }
1027
 
553 chandransh 1028
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1029
    {
553 chandransh 1030
      send_changeCartStatus(cartId, status);
1031
      recv_changeCartStatus();
130 ashish 1032
    }
1033
 
553 chandransh 1034
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1035
    {
553 chandransh 1036
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1037
      changeCartStatus_args args = new changeCartStatus_args();
1038
      args.cartId = cartId;
1039
      args.status = status;
130 ashish 1040
      args.write(oprot_);
1041
      oprot_.writeMessageEnd();
1042
      oprot_.getTransport().flush();
1043
    }
1044
 
553 chandransh 1045
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1046
    {
1047
      TMessage msg = iprot_.readMessageBegin();
1048
      if (msg.type == TMessageType.EXCEPTION) {
1049
        TApplicationException x = TApplicationException.read(iprot_);
1050
        iprot_.readMessageEnd();
1051
        throw x;
1052
      }
553 chandransh 1053
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1054
      result.read(iprot_);
1055
      iprot_.readMessageEnd();
553 chandransh 1056
      if (result.scx != null) {
1057
        throw result.scx;
1058
      }
1059
      return;
1060
    }
1061
 
1062
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1063
    {
1064
      send_addItemToCart(cartId, itemId, quantity);
1065
      recv_addItemToCart();
1066
    }
1067
 
1068
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1069
    {
1070
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1071
      addItemToCart_args args = new addItemToCart_args();
1072
      args.cartId = cartId;
1073
      args.itemId = itemId;
1074
      args.quantity = quantity;
1075
      args.write(oprot_);
1076
      oprot_.writeMessageEnd();
1077
      oprot_.getTransport().flush();
1078
    }
1079
 
1080
    public void recv_addItemToCart() throws ShoppingCartException, TException
1081
    {
1082
      TMessage msg = iprot_.readMessageBegin();
1083
      if (msg.type == TMessageType.EXCEPTION) {
1084
        TApplicationException x = TApplicationException.read(iprot_);
1085
        iprot_.readMessageEnd();
1086
        throw x;
1087
      }
1088
      addItemToCart_result result = new addItemToCart_result();
1089
      result.read(iprot_);
1090
      iprot_.readMessageEnd();
1091
      if (result.scx != null) {
1092
        throw result.scx;
1093
      }
1094
      return;
1095
    }
1096
 
1097
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1098
    {
1099
      send_deleteItemFromCart(cartId, itemId);
1100
      recv_deleteItemFromCart();
1101
    }
1102
 
1103
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1104
    {
1105
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1106
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1107
      args.cartId = cartId;
1108
      args.itemId = itemId;
1109
      args.write(oprot_);
1110
      oprot_.writeMessageEnd();
1111
      oprot_.getTransport().flush();
1112
    }
1113
 
1114
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1115
    {
1116
      TMessage msg = iprot_.readMessageBegin();
1117
      if (msg.type == TMessageType.EXCEPTION) {
1118
        TApplicationException x = TApplicationException.read(iprot_);
1119
        iprot_.readMessageEnd();
1120
        throw x;
1121
      }
1122
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1123
      result.read(iprot_);
1124
      iprot_.readMessageEnd();
1125
      if (result.scx != null) {
1126
        throw result.scx;
1127
      }
1128
      return;
1129
    }
1130
 
1131
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1132
    {
1133
      send_changeQuantity(cartId, itemId, quantity);
1134
      recv_changeQuantity();
1135
    }
1136
 
1137
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1138
    {
1139
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1140
      changeQuantity_args args = new changeQuantity_args();
1141
      args.cartId = cartId;
1142
      args.itemId = itemId;
1143
      args.quantity = quantity;
1144
      args.write(oprot_);
1145
      oprot_.writeMessageEnd();
1146
      oprot_.getTransport().flush();
1147
    }
1148
 
1149
    public void recv_changeQuantity() throws ShoppingCartException, TException
1150
    {
1151
      TMessage msg = iprot_.readMessageBegin();
1152
      if (msg.type == TMessageType.EXCEPTION) {
1153
        TApplicationException x = TApplicationException.read(iprot_);
1154
        iprot_.readMessageEnd();
1155
        throw x;
1156
      }
1157
      changeQuantity_result result = new changeQuantity_result();
1158
      result.read(iprot_);
1159
      iprot_.readMessageEnd();
1160
      if (result.scx != null) {
1161
        throw result.scx;
1162
      }
1163
      return;
1164
    }
1165
 
1166
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1167
    {
1168
      send_changeItemStatus(cartId, itemId, status);
1169
      recv_changeItemStatus();
1170
    }
1171
 
1172
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1173
    {
1174
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1175
      changeItemStatus_args args = new changeItemStatus_args();
1176
      args.cartId = cartId;
1177
      args.itemId = itemId;
1178
      args.status = status;
1179
      args.write(oprot_);
1180
      oprot_.writeMessageEnd();
1181
      oprot_.getTransport().flush();
1182
    }
1183
 
1184
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1185
    {
1186
      TMessage msg = iprot_.readMessageBegin();
1187
      if (msg.type == TMessageType.EXCEPTION) {
1188
        TApplicationException x = TApplicationException.read(iprot_);
1189
        iprot_.readMessageEnd();
1190
        throw x;
1191
      }
1192
      changeItemStatus_result result = new changeItemStatus_result();
1193
      result.read(iprot_);
1194
      iprot_.readMessageEnd();
1195
      if (result.scx != null) {
1196
        throw result.scx;
1197
      }
1198
      return;
1199
    }
1200
 
578 chandransh 1201
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1202
    {
1203
      send_addAddressToCart(cartId, addressId);
1204
      recv_addAddressToCart();
1205
    }
1206
 
1207
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1208
    {
1209
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1210
      addAddressToCart_args args = new addAddressToCart_args();
1211
      args.cartId = cartId;
1212
      args.addressId = addressId;
1213
      args.write(oprot_);
1214
      oprot_.writeMessageEnd();
1215
      oprot_.getTransport().flush();
1216
    }
1217
 
578 chandransh 1218
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1219
    {
1220
      TMessage msg = iprot_.readMessageBegin();
1221
      if (msg.type == TMessageType.EXCEPTION) {
1222
        TApplicationException x = TApplicationException.read(iprot_);
1223
        iprot_.readMessageEnd();
1224
        throw x;
1225
      }
1226
      addAddressToCart_result result = new addAddressToCart_result();
1227
      result.read(iprot_);
1228
      iprot_.readMessageEnd();
578 chandransh 1229
      if (result.scx != null) {
1230
        throw result.scx;
1231
      }
553 chandransh 1232
      return;
1233
    }
1234
 
688 chandransh 1235
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1236
    {
688 chandransh 1237
      send_createOrders(cartId);
1238
      return recv_createOrders();
553 chandransh 1239
    }
1240
 
688 chandransh 1241
    public void send_createOrders(long cartId) throws TException
553 chandransh 1242
    {
688 chandransh 1243
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1244
      createOrders_args args = new createOrders_args();
553 chandransh 1245
      args.cartId = cartId;
1246
      args.write(oprot_);
1247
      oprot_.writeMessageEnd();
1248
      oprot_.getTransport().flush();
1249
    }
1250
 
688 chandransh 1251
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1252
    {
1253
      TMessage msg = iprot_.readMessageBegin();
1254
      if (msg.type == TMessageType.EXCEPTION) {
1255
        TApplicationException x = TApplicationException.read(iprot_);
1256
        iprot_.readMessageEnd();
1257
        throw x;
1258
      }
688 chandransh 1259
      createOrders_result result = new createOrders_result();
553 chandransh 1260
      result.read(iprot_);
1261
      iprot_.readMessageEnd();
130 ashish 1262
      if (result.isSetSuccess()) {
1263
        return result.success;
1264
      }
553 chandransh 1265
      if (result.scx != null) {
1266
        throw result.scx;
130 ashish 1267
      }
688 chandransh 1268
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1269
    }
1270
 
578 chandransh 1271
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1272
    {
553 chandransh 1273
      send_validateCart(cartId);
1274
      return recv_validateCart();
130 ashish 1275
    }
1276
 
553 chandransh 1277
    public void send_validateCart(long cartId) throws TException
130 ashish 1278
    {
553 chandransh 1279
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1280
      validateCart_args args = new validateCart_args();
1281
      args.cartId = cartId;
130 ashish 1282
      args.write(oprot_);
1283
      oprot_.writeMessageEnd();
1284
      oprot_.getTransport().flush();
1285
    }
1286
 
578 chandransh 1287
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1288
    {
1289
      TMessage msg = iprot_.readMessageBegin();
1290
      if (msg.type == TMessageType.EXCEPTION) {
1291
        TApplicationException x = TApplicationException.read(iprot_);
1292
        iprot_.readMessageEnd();
1293
        throw x;
1294
      }
553 chandransh 1295
      validateCart_result result = new validateCart_result();
130 ashish 1296
      result.read(iprot_);
1297
      iprot_.readMessageEnd();
1298
      if (result.isSetSuccess()) {
1299
        return result.success;
1300
      }
578 chandransh 1301
      if (result.scex != null) {
1302
        throw result.scex;
1303
      }
553 chandransh 1304
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1305
    }
1306
 
688 chandransh 1307
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1308
    {
688 chandransh 1309
      send_mergeCart(fromCartId, toCartId);
1310
      recv_mergeCart();
578 chandransh 1311
    }
1312
 
688 chandransh 1313
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1314
    {
688 chandransh 1315
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1316
      mergeCart_args args = new mergeCart_args();
1317
      args.fromCartId = fromCartId;
1318
      args.toCartId = toCartId;
1319
      args.write(oprot_);
1320
      oprot_.writeMessageEnd();
1321
      oprot_.getTransport().flush();
1322
    }
1323
 
1324
    public void recv_mergeCart() throws TException
1325
    {
1326
      TMessage msg = iprot_.readMessageBegin();
1327
      if (msg.type == TMessageType.EXCEPTION) {
1328
        TApplicationException x = TApplicationException.read(iprot_);
1329
        iprot_.readMessageEnd();
1330
        throw x;
1331
      }
1332
      mergeCart_result result = new mergeCart_result();
1333
      result.read(iprot_);
1334
      iprot_.readMessageEnd();
1335
      return;
1336
    }
1337
 
1338
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1339
    {
1340
      send_checkOut(cartId);
1341
      return recv_checkOut();
1342
    }
1343
 
1344
    public void send_checkOut(long cartId) throws TException
1345
    {
1346
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1347
      checkOut_args args = new checkOut_args();
578 chandransh 1348
      args.cartId = cartId;
1349
      args.write(oprot_);
1350
      oprot_.writeMessageEnd();
1351
      oprot_.getTransport().flush();
1352
    }
1353
 
688 chandransh 1354
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1355
    {
1356
      TMessage msg = iprot_.readMessageBegin();
1357
      if (msg.type == TMessageType.EXCEPTION) {
1358
        TApplicationException x = TApplicationException.read(iprot_);
1359
        iprot_.readMessageEnd();
1360
        throw x;
1361
      }
688 chandransh 1362
      checkOut_result result = new checkOut_result();
578 chandransh 1363
      result.read(iprot_);
1364
      iprot_.readMessageEnd();
1365
      if (result.isSetSuccess()) {
1366
        return result.success;
1367
      }
1368
      if (result.scex != null) {
1369
        throw result.scex;
1370
      }
688 chandransh 1371
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1372
    }
1373
 
708 rajveer 1374
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1375
    {
688 chandransh 1376
      send_resetCart(cartId, items);
1377
      return recv_resetCart();
553 chandransh 1378
    }
1379
 
708 rajveer 1380
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1381
    {
688 chandransh 1382
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1383
      resetCart_args args = new resetCart_args();
1384
      args.cartId = cartId;
1385
      args.items = items;
553 chandransh 1386
      args.write(oprot_);
1387
      oprot_.writeMessageEnd();
1388
      oprot_.getTransport().flush();
1389
    }
1390
 
688 chandransh 1391
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1392
    {
1393
      TMessage msg = iprot_.readMessageBegin();
1394
      if (msg.type == TMessageType.EXCEPTION) {
1395
        TApplicationException x = TApplicationException.read(iprot_);
1396
        iprot_.readMessageEnd();
1397
        throw x;
130 ashish 1398
      }
688 chandransh 1399
      resetCart_result result = new resetCart_result();
553 chandransh 1400
      result.read(iprot_);
1401
      iprot_.readMessageEnd();
688 chandransh 1402
      if (result.isSetSuccess()) {
1403
        return result.success;
1404
      }
1405
      if (result.scex != null) {
1406
        throw result.scex;
1407
      }
1408
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1409
    }
1410
 
553 chandransh 1411
    public void addWidget(Widget widget) throws WidgetException, TException
1412
    {
1413
      send_addWidget(widget);
1414
      recv_addWidget();
1415
    }
1416
 
1417
    public void send_addWidget(Widget widget) throws TException
1418
    {
1419
      oprot_.writeMessageBegin(new TMessage("addWidget", TMessageType.CALL, seqid_));
1420
      addWidget_args args = new addWidget_args();
1421
      args.widget = widget;
1422
      args.write(oprot_);
1423
      oprot_.writeMessageEnd();
1424
      oprot_.getTransport().flush();
1425
    }
1426
 
1427
    public void recv_addWidget() throws WidgetException, TException
1428
    {
1429
      TMessage msg = iprot_.readMessageBegin();
1430
      if (msg.type == TMessageType.EXCEPTION) {
1431
        TApplicationException x = TApplicationException.read(iprot_);
1432
        iprot_.readMessageEnd();
1433
        throw x;
1434
      }
1435
      addWidget_result result = new addWidget_result();
1436
      result.read(iprot_);
1437
      iprot_.readMessageEnd();
1438
      if (result.scx != null) {
1439
        throw result.scx;
1440
      }
1441
      return;
1442
    }
1443
 
1444
    public void addItemToWidget(long widget_id, List<Long> items) throws WidgetException, TException
1445
    {
1446
      send_addItemToWidget(widget_id, items);
1447
      recv_addItemToWidget();
1448
    }
1449
 
1450
    public void send_addItemToWidget(long widget_id, List<Long> items) throws TException
1451
    {
1452
      oprot_.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.CALL, seqid_));
1453
      addItemToWidget_args args = new addItemToWidget_args();
1454
      args.widget_id = widget_id;
1455
      args.items = items;
1456
      args.write(oprot_);
1457
      oprot_.writeMessageEnd();
1458
      oprot_.getTransport().flush();
1459
    }
1460
 
1461
    public void recv_addItemToWidget() throws WidgetException, TException
1462
    {
1463
      TMessage msg = iprot_.readMessageBegin();
1464
      if (msg.type == TMessageType.EXCEPTION) {
1465
        TApplicationException x = TApplicationException.read(iprot_);
1466
        iprot_.readMessageEnd();
1467
        throw x;
1468
      }
1469
      addItemToWidget_result result = new addItemToWidget_result();
1470
      result.read(iprot_);
1471
      iprot_.readMessageEnd();
1472
      if (result.scx != null) {
1473
        throw result.scx;
1474
      }
1475
      return;
1476
    }
1477
 
1478
    public void deleteItemFromWidget(long widget_id, long item_id) throws WidgetException, TException
1479
    {
1480
      send_deleteItemFromWidget(widget_id, item_id);
1481
      recv_deleteItemFromWidget();
1482
    }
1483
 
1484
    public void send_deleteItemFromWidget(long widget_id, long item_id) throws TException
1485
    {
1486
      oprot_.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.CALL, seqid_));
1487
      deleteItemFromWidget_args args = new deleteItemFromWidget_args();
1488
      args.widget_id = widget_id;
1489
      args.item_id = item_id;
1490
      args.write(oprot_);
1491
      oprot_.writeMessageEnd();
1492
      oprot_.getTransport().flush();
1493
    }
1494
 
1495
    public void recv_deleteItemFromWidget() throws WidgetException, TException
1496
    {
1497
      TMessage msg = iprot_.readMessageBegin();
1498
      if (msg.type == TMessageType.EXCEPTION) {
1499
        TApplicationException x = TApplicationException.read(iprot_);
1500
        iprot_.readMessageEnd();
1501
        throw x;
1502
      }
1503
      deleteItemFromWidget_result result = new deleteItemFromWidget_result();
1504
      result.read(iprot_);
1505
      iprot_.readMessageEnd();
1506
      if (result.scx != null) {
1507
        throw result.scx;
1508
      }
1509
      return;
1510
    }
1511
 
1512
    public void updateWidget(long widgetId, boolean enable) throws WidgetException, TException
1513
    {
1514
      send_updateWidget(widgetId, enable);
1515
      recv_updateWidget();
1516
    }
1517
 
1518
    public void send_updateWidget(long widgetId, boolean enable) throws TException
1519
    {
1520
      oprot_.writeMessageBegin(new TMessage("updateWidget", TMessageType.CALL, seqid_));
1521
      updateWidget_args args = new updateWidget_args();
1522
      args.widgetId = widgetId;
1523
      args.enable = enable;
1524
      args.write(oprot_);
1525
      oprot_.writeMessageEnd();
1526
      oprot_.getTransport().flush();
1527
    }
1528
 
1529
    public void recv_updateWidget() throws WidgetException, TException
1530
    {
1531
      TMessage msg = iprot_.readMessageBegin();
1532
      if (msg.type == TMessageType.EXCEPTION) {
1533
        TApplicationException x = TApplicationException.read(iprot_);
1534
        iprot_.readMessageEnd();
1535
        throw x;
1536
      }
1537
      updateWidget_result result = new updateWidget_result();
1538
      result.read(iprot_);
1539
      iprot_.readMessageEnd();
1540
      if (result.scx != null) {
1541
        throw result.scx;
1542
      }
1543
      return;
1544
    }
1545
 
1546
    public void updateWidgetItem(long widgetId, boolean enable) throws WidgetException, TException
1547
    {
1548
      send_updateWidgetItem(widgetId, enable);
1549
      recv_updateWidgetItem();
1550
    }
1551
 
1552
    public void send_updateWidgetItem(long widgetId, boolean enable) throws TException
1553
    {
1554
      oprot_.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.CALL, seqid_));
1555
      updateWidgetItem_args args = new updateWidgetItem_args();
1556
      args.widgetId = widgetId;
1557
      args.enable = enable;
1558
      args.write(oprot_);
1559
      oprot_.writeMessageEnd();
1560
      oprot_.getTransport().flush();
1561
    }
1562
 
1563
    public void recv_updateWidgetItem() throws WidgetException, TException
1564
    {
1565
      TMessage msg = iprot_.readMessageBegin();
1566
      if (msg.type == TMessageType.EXCEPTION) {
1567
        TApplicationException x = TApplicationException.read(iprot_);
1568
        iprot_.readMessageEnd();
1569
        throw x;
1570
      }
1571
      updateWidgetItem_result result = new updateWidgetItem_result();
1572
      result.read(iprot_);
1573
      iprot_.readMessageEnd();
1574
      if (result.scx != null) {
1575
        throw result.scx;
1576
      }
1577
      return;
1578
    }
1579
 
1580
    public Widget getWidget(WidgetType type, long userId, boolean onlyEnabled) throws WidgetException, TException
1581
    {
1582
      send_getWidget(type, userId, onlyEnabled);
1583
      return recv_getWidget();
1584
    }
1585
 
1586
    public void send_getWidget(WidgetType type, long userId, boolean onlyEnabled) throws TException
1587
    {
1588
      oprot_.writeMessageBegin(new TMessage("getWidget", TMessageType.CALL, seqid_));
1589
      getWidget_args args = new getWidget_args();
1590
      args.type = type;
1591
      args.userId = userId;
1592
      args.onlyEnabled = onlyEnabled;
1593
      args.write(oprot_);
1594
      oprot_.writeMessageEnd();
1595
      oprot_.getTransport().flush();
1596
    }
1597
 
1598
    public Widget recv_getWidget() throws WidgetException, TException
1599
    {
1600
      TMessage msg = iprot_.readMessageBegin();
1601
      if (msg.type == TMessageType.EXCEPTION) {
1602
        TApplicationException x = TApplicationException.read(iprot_);
1603
        iprot_.readMessageEnd();
1604
        throw x;
1605
      }
1606
      getWidget_result result = new getWidget_result();
1607
      result.read(iprot_);
1608
      iprot_.readMessageEnd();
1609
      if (result.isSetSuccess()) {
1610
        return result.success;
1611
      }
1612
      if (result.scx != null) {
1613
        throw result.scx;
1614
      }
1615
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getWidget failed: unknown result");
1616
    }
1617
 
1618
    public Widget getMyResearch(long user_id) throws WidgetException, TException
1619
    {
1620
      send_getMyResearch(user_id);
1621
      return recv_getMyResearch();
1622
    }
1623
 
1624
    public void send_getMyResearch(long user_id) throws TException
1625
    {
1626
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1627
      getMyResearch_args args = new getMyResearch_args();
1628
      args.user_id = user_id;
1629
      args.write(oprot_);
1630
      oprot_.writeMessageEnd();
1631
      oprot_.getTransport().flush();
1632
    }
1633
 
1634
    public Widget recv_getMyResearch() throws WidgetException, TException
1635
    {
1636
      TMessage msg = iprot_.readMessageBegin();
1637
      if (msg.type == TMessageType.EXCEPTION) {
1638
        TApplicationException x = TApplicationException.read(iprot_);
1639
        iprot_.readMessageEnd();
1640
        throw x;
1641
      }
1642
      getMyResearch_result result = new getMyResearch_result();
1643
      result.read(iprot_);
1644
      iprot_.readMessageEnd();
1645
      if (result.isSetSuccess()) {
1646
        return result.success;
1647
      }
1648
      if (result.scx != null) {
1649
        throw result.scx;
1650
      }
1651
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1652
    }
1653
 
1654
    public boolean updateMyResearch(long user_id, long item_id) throws WidgetException, TException
1655
    {
1656
      send_updateMyResearch(user_id, item_id);
1657
      return recv_updateMyResearch();
1658
    }
1659
 
1660
    public void send_updateMyResearch(long user_id, long item_id) throws TException
1661
    {
1662
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1663
      updateMyResearch_args args = new updateMyResearch_args();
1664
      args.user_id = user_id;
1665
      args.item_id = item_id;
1666
      args.write(oprot_);
1667
      oprot_.writeMessageEnd();
1668
      oprot_.getTransport().flush();
1669
    }
1670
 
1671
    public boolean recv_updateMyResearch() throws WidgetException, TException
1672
    {
1673
      TMessage msg = iprot_.readMessageBegin();
1674
      if (msg.type == TMessageType.EXCEPTION) {
1675
        TApplicationException x = TApplicationException.read(iprot_);
1676
        iprot_.readMessageEnd();
1677
        throw x;
1678
      }
1679
      updateMyResearch_result result = new updateMyResearch_result();
1680
      result.read(iprot_);
1681
      iprot_.readMessageEnd();
1682
      if (result.isSetSuccess()) {
1683
        return result.success;
1684
      }
1685
      if (result.scx != null) {
1686
        throw result.scx;
1687
      }
1688
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1689
    }
1690
 
1691
    public void deleteItemFromMyResearch(long user_id, long item_id) throws WidgetException, TException
1692
    {
1693
      send_deleteItemFromMyResearch(user_id, item_id);
1694
      recv_deleteItemFromMyResearch();
1695
    }
1696
 
1697
    public void send_deleteItemFromMyResearch(long user_id, long item_id) throws TException
1698
    {
1699
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1700
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
1701
      args.user_id = user_id;
1702
      args.item_id = item_id;
1703
      args.write(oprot_);
1704
      oprot_.writeMessageEnd();
1705
      oprot_.getTransport().flush();
1706
    }
1707
 
1708
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1709
    {
1710
      TMessage msg = iprot_.readMessageBegin();
1711
      if (msg.type == TMessageType.EXCEPTION) {
1712
        TApplicationException x = TApplicationException.read(iprot_);
1713
        iprot_.readMessageEnd();
1714
        throw x;
1715
      }
1716
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1717
      result.read(iprot_);
1718
      iprot_.readMessageEnd();
1719
      if (result.scx != null) {
1720
        throw result.scx;
1721
      }
1722
      return;
1723
    }
1724
 
1725
    public void updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1726
    {
1727
      send_updateRatings(item_id, type, rating, user_id);
1728
      recv_updateRatings();
1729
    }
1730
 
1731
    public void send_updateRatings(long item_id, RatingType type, double rating, long user_id) throws TException
1732
    {
1733
      oprot_.writeMessageBegin(new TMessage("updateRatings", TMessageType.CALL, seqid_));
1734
      updateRatings_args args = new updateRatings_args();
1735
      args.item_id = item_id;
1736
      args.type = type;
1737
      args.rating = rating;
1738
      args.user_id = user_id;
1739
      args.write(oprot_);
1740
      oprot_.writeMessageEnd();
1741
      oprot_.getTransport().flush();
1742
    }
1743
 
1744
    public void recv_updateRatings() throws TException
1745
    {
1746
      TMessage msg = iprot_.readMessageBegin();
1747
      if (msg.type == TMessageType.EXCEPTION) {
1748
        TApplicationException x = TApplicationException.read(iprot_);
1749
        iprot_.readMessageEnd();
1750
        throw x;
1751
      }
1752
      updateRatings_result result = new updateRatings_result();
1753
      result.read(iprot_);
1754
      iprot_.readMessageEnd();
1755
      return;
1756
    }
1757
 
1758
    public RatingsWidget getRatings(long item_id, long user_id) throws WidgetException, TException
1759
    {
1760
      send_getRatings(item_id, user_id);
1761
      return recv_getRatings();
1762
    }
1763
 
1764
    public void send_getRatings(long item_id, long user_id) throws TException
1765
    {
1766
      oprot_.writeMessageBegin(new TMessage("getRatings", TMessageType.CALL, seqid_));
1767
      getRatings_args args = new getRatings_args();
1768
      args.item_id = item_id;
1769
      args.user_id = user_id;
1770
      args.write(oprot_);
1771
      oprot_.writeMessageEnd();
1772
      oprot_.getTransport().flush();
1773
    }
1774
 
1775
    public RatingsWidget recv_getRatings() throws WidgetException, TException
1776
    {
1777
      TMessage msg = iprot_.readMessageBegin();
1778
      if (msg.type == TMessageType.EXCEPTION) {
1779
        TApplicationException x = TApplicationException.read(iprot_);
1780
        iprot_.readMessageEnd();
1781
        throw x;
1782
      }
1783
      getRatings_result result = new getRatings_result();
1784
      result.read(iprot_);
1785
      iprot_.readMessageEnd();
1786
      if (result.isSetSuccess()) {
1787
        return result.success;
1788
      }
1789
      if (result.scx != null) {
1790
        throw result.scx;
1791
      }
1792
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getRatings failed: unknown result");
1793
    }
1794
 
1795
    public void updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1796
    {
1797
      send_updateBrowseHistory(user_id, item_id, isSessionId);
1798
      recv_updateBrowseHistory();
1799
    }
1800
 
1801
    public void send_updateBrowseHistory(long user_id, long item_id, boolean isSessionId) throws TException
1802
    {
1803
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1804
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1805
      args.user_id = user_id;
1806
      args.item_id = item_id;
1807
      args.isSessionId = isSessionId;
1808
      args.write(oprot_);
1809
      oprot_.writeMessageEnd();
1810
      oprot_.getTransport().flush();
1811
    }
1812
 
1813
    public void recv_updateBrowseHistory() throws TException
1814
    {
1815
      TMessage msg = iprot_.readMessageBegin();
1816
      if (msg.type == TMessageType.EXCEPTION) {
1817
        TApplicationException x = TApplicationException.read(iprot_);
1818
        iprot_.readMessageEnd();
1819
        throw x;
1820
      }
1821
      updateBrowseHistory_result result = new updateBrowseHistory_result();
1822
      result.read(iprot_);
1823
      iprot_.readMessageEnd();
1824
      return;
1825
    }
1826
 
1827
    public Widget getBrowseHistory(long userId, boolean isSessionId) throws WidgetException, TException
1828
    {
1829
      send_getBrowseHistory(userId, isSessionId);
1830
      return recv_getBrowseHistory();
1831
    }
1832
 
1833
    public void send_getBrowseHistory(long userId, boolean isSessionId) throws TException
1834
    {
1835
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1836
      getBrowseHistory_args args = new getBrowseHistory_args();
1837
      args.userId = userId;
1838
      args.isSessionId = isSessionId;
1839
      args.write(oprot_);
1840
      oprot_.writeMessageEnd();
1841
      oprot_.getTransport().flush();
1842
    }
1843
 
1844
    public Widget recv_getBrowseHistory() throws WidgetException, TException
1845
    {
1846
      TMessage msg = iprot_.readMessageBegin();
1847
      if (msg.type == TMessageType.EXCEPTION) {
1848
        TApplicationException x = TApplicationException.read(iprot_);
1849
        iprot_.readMessageEnd();
1850
        throw x;
1851
      }
1852
      getBrowseHistory_result result = new getBrowseHistory_result();
1853
      result.read(iprot_);
1854
      iprot_.readMessageEnd();
1855
      if (result.isSetSuccess()) {
1856
        return result.success;
1857
      }
1858
      if (result.scx != null) {
1859
        throw result.scx;
1860
      }
1861
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
1862
    }
1863
 
48 ashish 1864
  }
1865
  public static class Processor implements TProcessor {
1866
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1867
    public Processor(Iface iface)
1868
    {
1869
      iface_ = iface;
553 chandransh 1870
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1871
      processMap_.put("getUserById", new getUserById());
1872
      processMap_.put("createUser", new createUser());
1873
      processMap_.put("updateUser", new updateUser());
1874
      processMap_.put("deleteUser", new deleteUser());
1875
      processMap_.put("getUserState", new getUserState());
123 ashish 1876
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1877
      processMap_.put("userExists", new userExists());
1878
      processMap_.put("addAddressForUser", new addAddressForUser());
1879
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1880
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1881
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1882
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1883
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1884
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1885
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1886
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
553 chandransh 1887
      processMap_.put("createCart", new createCart());
1888
      processMap_.put("getCurrentCart", new getCurrentCart());
1889
      processMap_.put("getCart", new getCart());
1890
      processMap_.put("getCartsForUser", new getCartsForUser());
1891
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1892
      processMap_.put("getCartsByTime", new getCartsByTime());
1893
      processMap_.put("changeCartStatus", new changeCartStatus());
1894
      processMap_.put("addItemToCart", new addItemToCart());
1895
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1896
      processMap_.put("changeQuantity", new changeQuantity());
1897
      processMap_.put("changeItemStatus", new changeItemStatus());
1898
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1899
      processMap_.put("createOrders", new createOrders());
553 chandransh 1900
      processMap_.put("validateCart", new validateCart());
1901
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1902
      processMap_.put("checkOut", new checkOut());
1903
      processMap_.put("resetCart", new resetCart());
553 chandransh 1904
      processMap_.put("addWidget", new addWidget());
1905
      processMap_.put("addItemToWidget", new addItemToWidget());
1906
      processMap_.put("deleteItemFromWidget", new deleteItemFromWidget());
1907
      processMap_.put("updateWidget", new updateWidget());
1908
      processMap_.put("updateWidgetItem", new updateWidgetItem());
1909
      processMap_.put("getWidget", new getWidget());
1910
      processMap_.put("getMyResearch", new getMyResearch());
1911
      processMap_.put("updateMyResearch", new updateMyResearch());
1912
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1913
      processMap_.put("updateRatings", new updateRatings());
1914
      processMap_.put("getRatings", new getRatings());
1915
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1916
      processMap_.put("getBrowseHistory", new getBrowseHistory());
48 ashish 1917
    }
1918
 
1919
    protected static interface ProcessFunction {
1920
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1921
    }
1922
 
1923
    private Iface iface_;
1924
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1925
 
1926
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1927
    {
1928
      TMessage msg = iprot.readMessageBegin();
1929
      ProcessFunction fn = processMap_.get(msg.name);
1930
      if (fn == null) {
1931
        TProtocolUtil.skip(iprot, TType.STRUCT);
1932
        iprot.readMessageEnd();
1933
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1934
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1935
        x.write(oprot);
1936
        oprot.writeMessageEnd();
1937
        oprot.getTransport().flush();
1938
        return true;
1939
      }
1940
      fn.process(msg.seqid, iprot, oprot);
1941
      return true;
1942
    }
1943
 
553 chandransh 1944
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1945
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1946
      {
553 chandransh 1947
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1948
        args.read(iprot);
1949
        iprot.readMessageEnd();
553 chandransh 1950
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1951
        try {
553 chandransh 1952
          result.success = iface_.createAnonymousUser(args.jsessionId);
1953
        } catch (UserContextException ucex) {
1954
          result.ucex = ucex;
48 ashish 1955
        } catch (Throwable th) {
553 chandransh 1956
          LOGGER.error("Internal error processing createAnonymousUser", th);
1957
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1958
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1959
          x.write(oprot);
1960
          oprot.writeMessageEnd();
1961
          oprot.getTransport().flush();
1962
          return;
1963
        }
553 chandransh 1964
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1965
        result.write(oprot);
1966
        oprot.writeMessageEnd();
1967
        oprot.getTransport().flush();
1968
      }
1969
 
1970
    }
1971
 
553 chandransh 1972
    private class getUserById implements ProcessFunction {
48 ashish 1973
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1974
      {
553 chandransh 1975
        getUserById_args args = new getUserById_args();
48 ashish 1976
        args.read(iprot);
1977
        iprot.readMessageEnd();
553 chandransh 1978
        getUserById_result result = new getUserById_result();
48 ashish 1979
        try {
553 chandransh 1980
          result.success = iface_.getUserById(args.userId);
1981
        } catch (UserContextException ucex) {
1982
          result.ucex = ucex;
48 ashish 1983
        } catch (Throwable th) {
553 chandransh 1984
          LOGGER.error("Internal error processing getUserById", th);
1985
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1986
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1987
          x.write(oprot);
1988
          oprot.writeMessageEnd();
1989
          oprot.getTransport().flush();
1990
          return;
1991
        }
553 chandransh 1992
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1993
        result.write(oprot);
1994
        oprot.writeMessageEnd();
1995
        oprot.getTransport().flush();
1996
      }
1997
 
1998
    }
1999
 
553 chandransh 2000
    private class createUser implements ProcessFunction {
48 ashish 2001
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2002
      {
553 chandransh 2003
        createUser_args args = new createUser_args();
48 ashish 2004
        args.read(iprot);
2005
        iprot.readMessageEnd();
553 chandransh 2006
        createUser_result result = new createUser_result();
48 ashish 2007
        try {
553 chandransh 2008
          result.success = iface_.createUser(args.user);
2009
        } catch (UserContextException ucex) {
2010
          result.ucex = ucex;
48 ashish 2011
        } catch (Throwable th) {
553 chandransh 2012
          LOGGER.error("Internal error processing createUser", th);
2013
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
2014
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 2015
          x.write(oprot);
2016
          oprot.writeMessageEnd();
2017
          oprot.getTransport().flush();
2018
          return;
2019
        }
553 chandransh 2020
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 2021
        result.write(oprot);
2022
        oprot.writeMessageEnd();
2023
        oprot.getTransport().flush();
2024
      }
2025
 
2026
    }
2027
 
553 chandransh 2028
    private class updateUser implements ProcessFunction {
48 ashish 2029
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2030
      {
553 chandransh 2031
        updateUser_args args = new updateUser_args();
48 ashish 2032
        args.read(iprot);
2033
        iprot.readMessageEnd();
553 chandransh 2034
        updateUser_result result = new updateUser_result();
48 ashish 2035
        try {
553 chandransh 2036
          result.success = iface_.updateUser(args.user);
2037
        } catch (UserContextException ucex) {
2038
          result.ucex = ucex;
48 ashish 2039
        } catch (Throwable th) {
553 chandransh 2040
          LOGGER.error("Internal error processing updateUser", th);
2041
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
2042
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 2043
          x.write(oprot);
2044
          oprot.writeMessageEnd();
2045
          oprot.getTransport().flush();
2046
          return;
2047
        }
553 chandransh 2048
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 2049
        result.write(oprot);
2050
        oprot.writeMessageEnd();
2051
        oprot.getTransport().flush();
2052
      }
2053
 
2054
    }
2055
 
553 chandransh 2056
    private class deleteUser implements ProcessFunction {
48 ashish 2057
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2058
      {
553 chandransh 2059
        deleteUser_args args = new deleteUser_args();
48 ashish 2060
        args.read(iprot);
2061
        iprot.readMessageEnd();
553 chandransh 2062
        deleteUser_result result = new deleteUser_result();
48 ashish 2063
        try {
553 chandransh 2064
          result.success = iface_.deleteUser(args.userId);
2065
          result.setSuccessIsSet(true);
2066
        } catch (UserContextException ucex) {
2067
          result.ucex = ucex;
48 ashish 2068
        } catch (Throwable th) {
553 chandransh 2069
          LOGGER.error("Internal error processing deleteUser", th);
2070
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
2071
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 2072
          x.write(oprot);
2073
          oprot.writeMessageEnd();
2074
          oprot.getTransport().flush();
2075
          return;
2076
        }
553 chandransh 2077
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 2078
        result.write(oprot);
2079
        oprot.writeMessageEnd();
2080
        oprot.getTransport().flush();
2081
      }
2082
 
2083
    }
2084
 
553 chandransh 2085
    private class getUserState implements ProcessFunction {
48 ashish 2086
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2087
      {
553 chandransh 2088
        getUserState_args args = new getUserState_args();
48 ashish 2089
        args.read(iprot);
2090
        iprot.readMessageEnd();
553 chandransh 2091
        getUserState_result result = new getUserState_result();
48 ashish 2092
        try {
553 chandransh 2093
          result.success = iface_.getUserState(args.userId);
2094
        } catch (UserContextException ucex) {
2095
          result.ucex = ucex;
48 ashish 2096
        } catch (Throwable th) {
553 chandransh 2097
          LOGGER.error("Internal error processing getUserState", th);
2098
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
2099
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 2100
          x.write(oprot);
2101
          oprot.writeMessageEnd();
2102
          oprot.getTransport().flush();
2103
          return;
2104
        }
553 chandransh 2105
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 2106
        result.write(oprot);
2107
        oprot.writeMessageEnd();
2108
        oprot.getTransport().flush();
2109
      }
2110
 
2111
    }
2112
 
123 ashish 2113
    private class authenticateUser implements ProcessFunction {
2114
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2115
      {
2116
        authenticateUser_args args = new authenticateUser_args();
2117
        args.read(iprot);
2118
        iprot.readMessageEnd();
2119
        authenticateUser_result result = new authenticateUser_result();
2120
        try {
553 chandransh 2121
          result.success = iface_.authenticateUser(args.email, args.password);
2122
        } catch (AuthenticationException auex) {
2123
          result.auex = auex;
123 ashish 2124
        } catch (Throwable th) {
2125
          LOGGER.error("Internal error processing authenticateUser", th);
2126
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
2127
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
2128
          x.write(oprot);
2129
          oprot.writeMessageEnd();
2130
          oprot.getTransport().flush();
2131
          return;
2132
        }
2133
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
2134
        result.write(oprot);
2135
        oprot.writeMessageEnd();
2136
        oprot.getTransport().flush();
2137
      }
2138
 
2139
    }
2140
 
48 ashish 2141
    private class userExists implements ProcessFunction {
2142
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2143
      {
2144
        userExists_args args = new userExists_args();
2145
        args.read(iprot);
2146
        iprot.readMessageEnd();
2147
        userExists_result result = new userExists_result();
2148
        try {
2149
          result.success = iface_.userExists(args.email);
2150
          result.setSuccessIsSet(true);
2151
        } catch (UserContextException ucx) {
2152
          result.ucx = ucx;
2153
        } catch (Throwable th) {
2154
          LOGGER.error("Internal error processing userExists", th);
2155
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2156
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2157
          x.write(oprot);
2158
          oprot.writeMessageEnd();
2159
          oprot.getTransport().flush();
2160
          return;
2161
        }
2162
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2163
        result.write(oprot);
2164
        oprot.writeMessageEnd();
2165
        oprot.getTransport().flush();
2166
      }
2167
 
2168
    }
2169
 
2170
    private class addAddressForUser implements ProcessFunction {
2171
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2172
      {
2173
        addAddressForUser_args args = new addAddressForUser_args();
2174
        args.read(iprot);
2175
        iprot.readMessageEnd();
2176
        addAddressForUser_result result = new addAddressForUser_result();
2177
        try {
571 rajveer 2178
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2179
          result.setSuccessIsSet(true);
2180
        } catch (UserContextException ucx) {
2181
          result.ucx = ucx;
2182
        } catch (Throwable th) {
2183
          LOGGER.error("Internal error processing addAddressForUser", th);
2184
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2185
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2186
          x.write(oprot);
2187
          oprot.writeMessageEnd();
2188
          oprot.getTransport().flush();
2189
          return;
2190
        }
2191
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2192
        result.write(oprot);
2193
        oprot.writeMessageEnd();
2194
        oprot.getTransport().flush();
2195
      }
2196
 
2197
    }
2198
 
2199
    private class removeAddressForUser implements ProcessFunction {
2200
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2201
      {
2202
        removeAddressForUser_args args = new removeAddressForUser_args();
2203
        args.read(iprot);
2204
        iprot.readMessageEnd();
2205
        removeAddressForUser_result result = new removeAddressForUser_result();
2206
        try {
2207
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2208
          result.setSuccessIsSet(true);
2209
        } catch (UserContextException ucx) {
2210
          result.ucx = ucx;
2211
        } catch (Throwable th) {
2212
          LOGGER.error("Internal error processing removeAddressForUser", th);
2213
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2214
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2215
          x.write(oprot);
2216
          oprot.writeMessageEnd();
2217
          oprot.getTransport().flush();
2218
          return;
2219
        }
2220
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2221
        result.write(oprot);
2222
        oprot.writeMessageEnd();
2223
        oprot.getTransport().flush();
2224
      }
2225
 
2226
    }
2227
 
2228
    private class setUserAsLoggedIn implements ProcessFunction {
2229
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2230
      {
2231
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2232
        args.read(iprot);
2233
        iprot.readMessageEnd();
2234
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2235
        try {
2236
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2237
          result.setSuccessIsSet(true);
2238
        } catch (UserContextException ucx) {
2239
          result.ucx = ucx;
2240
        } catch (Throwable th) {
2241
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2242
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2243
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2244
          x.write(oprot);
2245
          oprot.writeMessageEnd();
2246
          oprot.getTransport().flush();
2247
          return;
2248
        }
2249
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2250
        result.write(oprot);
2251
        oprot.writeMessageEnd();
2252
        oprot.getTransport().flush();
2253
      }
2254
 
2255
    }
2256
 
2257
    private class setUserAsLoggedOut implements ProcessFunction {
2258
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2259
      {
2260
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2261
        args.read(iprot);
2262
        iprot.readMessageEnd();
2263
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2264
        try {
2265
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2266
          result.setSuccessIsSet(true);
2267
        } catch (UserContextException ucx) {
2268
          result.ucx = ucx;
2269
        } catch (Throwable th) {
2270
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2271
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2272
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2273
          x.write(oprot);
2274
          oprot.writeMessageEnd();
2275
          oprot.getTransport().flush();
2276
          return;
2277
        }
2278
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2279
        result.write(oprot);
2280
        oprot.writeMessageEnd();
2281
        oprot.getTransport().flush();
2282
      }
2283
 
2284
    }
2285
 
506 rajveer 2286
    private class setDefaultAddress implements ProcessFunction {
2287
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2288
      {
2289
        setDefaultAddress_args args = new setDefaultAddress_args();
2290
        args.read(iprot);
2291
        iprot.readMessageEnd();
2292
        setDefaultAddress_result result = new setDefaultAddress_result();
2293
        try {
2294
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2295
          result.setSuccessIsSet(true);
2296
        } catch (UserContextException ucx) {
2297
          result.ucx = ucx;
2298
        } catch (Throwable th) {
2299
          LOGGER.error("Internal error processing setDefaultAddress", th);
2300
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2301
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2302
          x.write(oprot);
2303
          oprot.writeMessageEnd();
2304
          oprot.getTransport().flush();
2305
          return;
2306
        }
2307
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2308
        result.write(oprot);
2309
        oprot.writeMessageEnd();
2310
        oprot.getTransport().flush();
2311
      }
2312
 
2313
    }
2314
 
48 ashish 2315
    private class updatePassword implements ProcessFunction {
2316
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2317
      {
2318
        updatePassword_args args = new updatePassword_args();
2319
        args.read(iprot);
2320
        iprot.readMessageEnd();
2321
        updatePassword_result result = new updatePassword_result();
2322
        try {
593 rajveer 2323
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2324
          result.setSuccessIsSet(true);
2325
        } catch (UserContextException ucx) {
2326
          result.ucx = ucx;
2327
        } catch (Throwable th) {
2328
          LOGGER.error("Internal error processing updatePassword", th);
2329
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2330
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2331
          x.write(oprot);
2332
          oprot.writeMessageEnd();
2333
          oprot.getTransport().flush();
2334
          return;
2335
        }
2336
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2337
        result.write(oprot);
2338
        oprot.writeMessageEnd();
2339
        oprot.getTransport().flush();
2340
      }
2341
 
2342
    }
2343
 
582 rajveer 2344
    private class forgotPassword implements ProcessFunction {
2345
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2346
      {
2347
        forgotPassword_args args = new forgotPassword_args();
2348
        args.read(iprot);
2349
        iprot.readMessageEnd();
2350
        forgotPassword_result result = new forgotPassword_result();
2351
        try {
2352
          result.success = iface_.forgotPassword(args.email);
2353
          result.setSuccessIsSet(true);
2354
        } catch (UserContextException ucx) {
2355
          result.ucx = ucx;
2356
        } catch (Throwable th) {
2357
          LOGGER.error("Internal error processing forgotPassword", th);
2358
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2359
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2360
          x.write(oprot);
2361
          oprot.writeMessageEnd();
2362
          oprot.getTransport().flush();
2363
          return;
2364
        }
2365
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2366
        result.write(oprot);
2367
        oprot.writeMessageEnd();
2368
        oprot.getTransport().flush();
2369
      }
2370
 
2371
    }
2372
 
593 rajveer 2373
    private class getAllAddressesForUser implements ProcessFunction {
2374
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2375
      {
2376
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2377
        args.read(iprot);
2378
        iprot.readMessageEnd();
2379
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2380
        try {
2381
          result.success = iface_.getAllAddressesForUser(args.userId);
2382
        } catch (UserContextException ucx) {
2383
          result.ucx = ucx;
2384
        } catch (Throwable th) {
2385
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2386
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2387
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2388
          x.write(oprot);
2389
          oprot.writeMessageEnd();
2390
          oprot.getTransport().flush();
2391
          return;
2392
        }
2393
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2394
        result.write(oprot);
2395
        oprot.writeMessageEnd();
2396
        oprot.getTransport().flush();
2397
      }
2398
 
2399
    }
2400
 
2401
    private class getDefaultAddressId implements ProcessFunction {
2402
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2403
      {
2404
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2405
        args.read(iprot);
2406
        iprot.readMessageEnd();
2407
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2408
        try {
2409
          result.success = iface_.getDefaultAddressId(args.userId);
2410
          result.setSuccessIsSet(true);
2411
        } catch (UserContextException ucx) {
2412
          result.ucx = ucx;
2413
        } catch (Throwable th) {
2414
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2415
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2416
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2417
          x.write(oprot);
2418
          oprot.writeMessageEnd();
2419
          oprot.getTransport().flush();
2420
          return;
2421
        }
2422
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2423
        result.write(oprot);
2424
        oprot.writeMessageEnd();
2425
        oprot.getTransport().flush();
2426
      }
2427
 
2428
    }
2429
 
553 chandransh 2430
    private class createCart implements ProcessFunction {
48 ashish 2431
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2432
      {
553 chandransh 2433
        createCart_args args = new createCart_args();
48 ashish 2434
        args.read(iprot);
2435
        iprot.readMessageEnd();
553 chandransh 2436
        createCart_result result = new createCart_result();
48 ashish 2437
        try {
553 chandransh 2438
          result.success = iface_.createCart(args.userId);
48 ashish 2439
          result.setSuccessIsSet(true);
553 chandransh 2440
        } catch (ShoppingCartException scx) {
2441
          result.scx = scx;
48 ashish 2442
        } catch (Throwable th) {
553 chandransh 2443
          LOGGER.error("Internal error processing createCart", th);
2444
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2445
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2446
          x.write(oprot);
2447
          oprot.writeMessageEnd();
2448
          oprot.getTransport().flush();
2449
          return;
2450
        }
553 chandransh 2451
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2452
        result.write(oprot);
2453
        oprot.writeMessageEnd();
2454
        oprot.getTransport().flush();
2455
      }
2456
 
2457
    }
2458
 
553 chandransh 2459
    private class getCurrentCart implements ProcessFunction {
48 ashish 2460
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2461
      {
553 chandransh 2462
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2463
        args.read(iprot);
2464
        iprot.readMessageEnd();
553 chandransh 2465
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2466
        try {
553 chandransh 2467
          result.success = iface_.getCurrentCart(args.userId);
2468
        } catch (ShoppingCartException scx) {
2469
          result.scx = scx;
48 ashish 2470
        } catch (Throwable th) {
553 chandransh 2471
          LOGGER.error("Internal error processing getCurrentCart", th);
2472
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2473
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2474
          x.write(oprot);
2475
          oprot.writeMessageEnd();
2476
          oprot.getTransport().flush();
2477
          return;
2478
        }
553 chandransh 2479
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2480
        result.write(oprot);
2481
        oprot.writeMessageEnd();
2482
        oprot.getTransport().flush();
2483
      }
2484
 
2485
    }
2486
 
553 chandransh 2487
    private class getCart implements ProcessFunction {
48 ashish 2488
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2489
      {
553 chandransh 2490
        getCart_args args = new getCart_args();
48 ashish 2491
        args.read(iprot);
2492
        iprot.readMessageEnd();
553 chandransh 2493
        getCart_result result = new getCart_result();
48 ashish 2494
        try {
553 chandransh 2495
          result.success = iface_.getCart(args.cartId);
2496
        } catch (ShoppingCartException scx) {
2497
          result.scx = scx;
48 ashish 2498
        } catch (Throwable th) {
553 chandransh 2499
          LOGGER.error("Internal error processing getCart", th);
2500
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2501
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2502
          x.write(oprot);
2503
          oprot.writeMessageEnd();
2504
          oprot.getTransport().flush();
2505
          return;
2506
        }
553 chandransh 2507
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2508
        result.write(oprot);
2509
        oprot.writeMessageEnd();
2510
        oprot.getTransport().flush();
2511
      }
2512
 
2513
    }
2514
 
553 chandransh 2515
    private class getCartsForUser implements ProcessFunction {
48 ashish 2516
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2517
      {
553 chandransh 2518
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2519
        args.read(iprot);
2520
        iprot.readMessageEnd();
553 chandransh 2521
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2522
        try {
553 chandransh 2523
          result.success = iface_.getCartsForUser(args.userId, args.status);
2524
        } catch (ShoppingCartException scx) {
2525
          result.scx = scx;
48 ashish 2526
        } catch (Throwable th) {
553 chandransh 2527
          LOGGER.error("Internal error processing getCartsForUser", th);
2528
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2529
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2530
          x.write(oprot);
2531
          oprot.writeMessageEnd();
2532
          oprot.getTransport().flush();
2533
          return;
2534
        }
553 chandransh 2535
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2536
        result.write(oprot);
2537
        oprot.writeMessageEnd();
2538
        oprot.getTransport().flush();
2539
      }
2540
 
2541
    }
2542
 
553 chandransh 2543
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2544
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2545
      {
553 chandransh 2546
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2547
        args.read(iprot);
2548
        iprot.readMessageEnd();
553 chandransh 2549
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2550
        try {
553 chandransh 2551
          result.success = iface_.getCartsByStatus(args.status);
2552
        } catch (ShoppingCartException scx) {
2553
          result.scx = scx;
48 ashish 2554
        } catch (Throwable th) {
553 chandransh 2555
          LOGGER.error("Internal error processing getCartsByStatus", th);
2556
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2557
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2558
          x.write(oprot);
2559
          oprot.writeMessageEnd();
2560
          oprot.getTransport().flush();
2561
          return;
2562
        }
553 chandransh 2563
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2564
        result.write(oprot);
2565
        oprot.writeMessageEnd();
2566
        oprot.getTransport().flush();
2567
      }
2568
 
2569
    }
2570
 
553 chandransh 2571
    private class getCartsByTime implements ProcessFunction {
48 ashish 2572
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2573
      {
553 chandransh 2574
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2575
        args.read(iprot);
2576
        iprot.readMessageEnd();
553 chandransh 2577
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2578
        try {
553 chandransh 2579
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2580
        } catch (ShoppingCartException scx) {
2581
          result.scx = scx;
48 ashish 2582
        } catch (Throwable th) {
553 chandransh 2583
          LOGGER.error("Internal error processing getCartsByTime", th);
2584
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2585
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2586
          x.write(oprot);
2587
          oprot.writeMessageEnd();
2588
          oprot.getTransport().flush();
2589
          return;
2590
        }
553 chandransh 2591
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2592
        result.write(oprot);
2593
        oprot.writeMessageEnd();
2594
        oprot.getTransport().flush();
2595
      }
2596
 
2597
    }
2598
 
553 chandransh 2599
    private class changeCartStatus implements ProcessFunction {
130 ashish 2600
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2601
      {
553 chandransh 2602
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2603
        args.read(iprot);
2604
        iprot.readMessageEnd();
553 chandransh 2605
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2606
        try {
553 chandransh 2607
          iface_.changeCartStatus(args.cartId, args.status);
2608
        } catch (ShoppingCartException scx) {
2609
          result.scx = scx;
2610
        } catch (Throwable th) {
2611
          LOGGER.error("Internal error processing changeCartStatus", th);
2612
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2613
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2614
          x.write(oprot);
2615
          oprot.writeMessageEnd();
2616
          oprot.getTransport().flush();
2617
          return;
2618
        }
2619
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2620
        result.write(oprot);
2621
        oprot.writeMessageEnd();
2622
        oprot.getTransport().flush();
2623
      }
2624
 
2625
    }
2626
 
2627
    private class addItemToCart implements ProcessFunction {
2628
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2629
      {
2630
        addItemToCart_args args = new addItemToCart_args();
2631
        args.read(iprot);
2632
        iprot.readMessageEnd();
2633
        addItemToCart_result result = new addItemToCart_result();
2634
        try {
2635
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2636
        } catch (ShoppingCartException scx) {
2637
          result.scx = scx;
2638
        } catch (Throwable th) {
2639
          LOGGER.error("Internal error processing addItemToCart", th);
2640
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2641
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2642
          x.write(oprot);
2643
          oprot.writeMessageEnd();
2644
          oprot.getTransport().flush();
2645
          return;
2646
        }
2647
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2648
        result.write(oprot);
2649
        oprot.writeMessageEnd();
2650
        oprot.getTransport().flush();
2651
      }
2652
 
2653
    }
2654
 
2655
    private class deleteItemFromCart implements ProcessFunction {
2656
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2657
      {
2658
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2659
        args.read(iprot);
2660
        iprot.readMessageEnd();
2661
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2662
        try {
2663
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2664
        } catch (ShoppingCartException scx) {
2665
          result.scx = scx;
2666
        } catch (Throwable th) {
2667
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2668
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2669
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2670
          x.write(oprot);
2671
          oprot.writeMessageEnd();
2672
          oprot.getTransport().flush();
2673
          return;
2674
        }
2675
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2676
        result.write(oprot);
2677
        oprot.writeMessageEnd();
2678
        oprot.getTransport().flush();
2679
      }
2680
 
2681
    }
2682
 
2683
    private class changeQuantity implements ProcessFunction {
2684
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2685
      {
2686
        changeQuantity_args args = new changeQuantity_args();
2687
        args.read(iprot);
2688
        iprot.readMessageEnd();
2689
        changeQuantity_result result = new changeQuantity_result();
2690
        try {
2691
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2692
        } catch (ShoppingCartException scx) {
2693
          result.scx = scx;
2694
        } catch (Throwable th) {
2695
          LOGGER.error("Internal error processing changeQuantity", th);
2696
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2697
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2698
          x.write(oprot);
2699
          oprot.writeMessageEnd();
2700
          oprot.getTransport().flush();
2701
          return;
2702
        }
2703
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2704
        result.write(oprot);
2705
        oprot.writeMessageEnd();
2706
        oprot.getTransport().flush();
2707
      }
2708
 
2709
    }
2710
 
2711
    private class changeItemStatus implements ProcessFunction {
2712
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2713
      {
2714
        changeItemStatus_args args = new changeItemStatus_args();
2715
        args.read(iprot);
2716
        iprot.readMessageEnd();
2717
        changeItemStatus_result result = new changeItemStatus_result();
2718
        try {
2719
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2720
        } catch (ShoppingCartException scx) {
2721
          result.scx = scx;
2722
        } catch (Throwable th) {
2723
          LOGGER.error("Internal error processing changeItemStatus", th);
2724
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2725
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2726
          x.write(oprot);
2727
          oprot.writeMessageEnd();
2728
          oprot.getTransport().flush();
2729
          return;
2730
        }
2731
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2732
        result.write(oprot);
2733
        oprot.writeMessageEnd();
2734
        oprot.getTransport().flush();
2735
      }
2736
 
2737
    }
2738
 
2739
    private class addAddressToCart implements ProcessFunction {
2740
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2741
      {
2742
        addAddressToCart_args args = new addAddressToCart_args();
2743
        args.read(iprot);
2744
        iprot.readMessageEnd();
2745
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2746
        try {
2747
          iface_.addAddressToCart(args.cartId, args.addressId);
2748
        } catch (ShoppingCartException scx) {
2749
          result.scx = scx;
2750
        } catch (Throwable th) {
2751
          LOGGER.error("Internal error processing addAddressToCart", th);
2752
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2753
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2754
          x.write(oprot);
2755
          oprot.writeMessageEnd();
2756
          oprot.getTransport().flush();
2757
          return;
2758
        }
553 chandransh 2759
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2760
        result.write(oprot);
2761
        oprot.writeMessageEnd();
2762
        oprot.getTransport().flush();
2763
      }
2764
 
2765
    }
2766
 
688 chandransh 2767
    private class createOrders implements ProcessFunction {
553 chandransh 2768
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2769
      {
688 chandransh 2770
        createOrders_args args = new createOrders_args();
553 chandransh 2771
        args.read(iprot);
2772
        iprot.readMessageEnd();
688 chandransh 2773
        createOrders_result result = new createOrders_result();
553 chandransh 2774
        try {
688 chandransh 2775
          result.success = iface_.createOrders(args.cartId);
130 ashish 2776
          result.setSuccessIsSet(true);
553 chandransh 2777
        } catch (ShoppingCartException scx) {
2778
          result.scx = scx;
130 ashish 2779
        } catch (Throwable th) {
688 chandransh 2780
          LOGGER.error("Internal error processing createOrders", th);
2781
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2782
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2783
          x.write(oprot);
2784
          oprot.writeMessageEnd();
2785
          oprot.getTransport().flush();
2786
          return;
2787
        }
688 chandransh 2788
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2789
        result.write(oprot);
2790
        oprot.writeMessageEnd();
2791
        oprot.getTransport().flush();
2792
      }
2793
 
2794
    }
2795
 
553 chandransh 2796
    private class validateCart implements ProcessFunction {
130 ashish 2797
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2798
      {
553 chandransh 2799
        validateCart_args args = new validateCart_args();
130 ashish 2800
        args.read(iprot);
2801
        iprot.readMessageEnd();
553 chandransh 2802
        validateCart_result result = new validateCart_result();
578 chandransh 2803
        try {
2804
          result.success = iface_.validateCart(args.cartId);
2805
          result.setSuccessIsSet(true);
2806
        } catch (ShoppingCartException scex) {
2807
          result.scex = scex;
2808
        } catch (Throwable th) {
2809
          LOGGER.error("Internal error processing validateCart", th);
2810
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2811
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2812
          x.write(oprot);
2813
          oprot.writeMessageEnd();
2814
          oprot.getTransport().flush();
2815
          return;
2816
        }
553 chandransh 2817
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2818
        result.write(oprot);
2819
        oprot.writeMessageEnd();
2820
        oprot.getTransport().flush();
2821
      }
2822
 
2823
    }
2824
 
688 chandransh 2825
    private class mergeCart implements ProcessFunction {
578 chandransh 2826
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2827
      {
688 chandransh 2828
        mergeCart_args args = new mergeCart_args();
578 chandransh 2829
        args.read(iprot);
2830
        iprot.readMessageEnd();
688 chandransh 2831
        mergeCart_result result = new mergeCart_result();
2832
        iface_.mergeCart(args.fromCartId, args.toCartId);
2833
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2834
        result.write(oprot);
2835
        oprot.writeMessageEnd();
2836
        oprot.getTransport().flush();
2837
      }
2838
 
2839
    }
2840
 
2841
    private class checkOut implements ProcessFunction {
2842
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2843
      {
2844
        checkOut_args args = new checkOut_args();
2845
        args.read(iprot);
2846
        iprot.readMessageEnd();
2847
        checkOut_result result = new checkOut_result();
578 chandransh 2848
        try {
688 chandransh 2849
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2850
          result.setSuccessIsSet(true);
2851
        } catch (ShoppingCartException scex) {
2852
          result.scex = scex;
2853
        } catch (Throwable th) {
688 chandransh 2854
          LOGGER.error("Internal error processing checkOut", th);
2855
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2856
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2857
          x.write(oprot);
2858
          oprot.writeMessageEnd();
2859
          oprot.getTransport().flush();
2860
          return;
2861
        }
688 chandransh 2862
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2863
        result.write(oprot);
2864
        oprot.writeMessageEnd();
2865
        oprot.getTransport().flush();
2866
      }
2867
 
2868
    }
2869
 
688 chandransh 2870
    private class resetCart implements ProcessFunction {
553 chandransh 2871
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2872
      {
688 chandransh 2873
        resetCart_args args = new resetCart_args();
553 chandransh 2874
        args.read(iprot);
2875
        iprot.readMessageEnd();
688 chandransh 2876
        resetCart_result result = new resetCart_result();
2877
        try {
2878
          result.success = iface_.resetCart(args.cartId, args.items);
2879
          result.setSuccessIsSet(true);
2880
        } catch (ShoppingCartException scex) {
2881
          result.scex = scex;
2882
        } catch (Throwable th) {
2883
          LOGGER.error("Internal error processing resetCart", th);
2884
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2885
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2886
          x.write(oprot);
2887
          oprot.writeMessageEnd();
2888
          oprot.getTransport().flush();
2889
          return;
2890
        }
2891
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2892
        result.write(oprot);
2893
        oprot.writeMessageEnd();
2894
        oprot.getTransport().flush();
2895
      }
2896
 
2897
    }
2898
 
2899
    private class addWidget implements ProcessFunction {
2900
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2901
      {
2902
        addWidget_args args = new addWidget_args();
2903
        args.read(iprot);
2904
        iprot.readMessageEnd();
2905
        addWidget_result result = new addWidget_result();
130 ashish 2906
        try {
553 chandransh 2907
          iface_.addWidget(args.widget);
2908
        } catch (WidgetException scx) {
2909
          result.scx = scx;
2910
        } catch (Throwable th) {
2911
          LOGGER.error("Internal error processing addWidget", th);
2912
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addWidget");
2913
          oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.EXCEPTION, seqid));
2914
          x.write(oprot);
2915
          oprot.writeMessageEnd();
2916
          oprot.getTransport().flush();
2917
          return;
2918
        }
2919
        oprot.writeMessageBegin(new TMessage("addWidget", TMessageType.REPLY, seqid));
2920
        result.write(oprot);
2921
        oprot.writeMessageEnd();
2922
        oprot.getTransport().flush();
2923
      }
2924
 
2925
    }
2926
 
2927
    private class addItemToWidget implements ProcessFunction {
2928
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2929
      {
2930
        addItemToWidget_args args = new addItemToWidget_args();
2931
        args.read(iprot);
2932
        iprot.readMessageEnd();
2933
        addItemToWidget_result result = new addItemToWidget_result();
2934
        try {
2935
          iface_.addItemToWidget(args.widget_id, args.items);
2936
        } catch (WidgetException scx) {
2937
          result.scx = scx;
2938
        } catch (Throwable th) {
2939
          LOGGER.error("Internal error processing addItemToWidget", th);
2940
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToWidget");
2941
          oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.EXCEPTION, seqid));
2942
          x.write(oprot);
2943
          oprot.writeMessageEnd();
2944
          oprot.getTransport().flush();
2945
          return;
2946
        }
2947
        oprot.writeMessageBegin(new TMessage("addItemToWidget", TMessageType.REPLY, seqid));
2948
        result.write(oprot);
2949
        oprot.writeMessageEnd();
2950
        oprot.getTransport().flush();
2951
      }
2952
 
2953
    }
2954
 
2955
    private class deleteItemFromWidget implements ProcessFunction {
2956
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2957
      {
2958
        deleteItemFromWidget_args args = new deleteItemFromWidget_args();
2959
        args.read(iprot);
2960
        iprot.readMessageEnd();
2961
        deleteItemFromWidget_result result = new deleteItemFromWidget_result();
2962
        try {
2963
          iface_.deleteItemFromWidget(args.widget_id, args.item_id);
2964
        } catch (WidgetException scx) {
2965
          result.scx = scx;
2966
        } catch (Throwable th) {
2967
          LOGGER.error("Internal error processing deleteItemFromWidget", th);
2968
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromWidget");
2969
          oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.EXCEPTION, seqid));
2970
          x.write(oprot);
2971
          oprot.writeMessageEnd();
2972
          oprot.getTransport().flush();
2973
          return;
2974
        }
2975
        oprot.writeMessageBegin(new TMessage("deleteItemFromWidget", TMessageType.REPLY, seqid));
2976
        result.write(oprot);
2977
        oprot.writeMessageEnd();
2978
        oprot.getTransport().flush();
2979
      }
2980
 
2981
    }
2982
 
2983
    private class updateWidget implements ProcessFunction {
2984
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2985
      {
2986
        updateWidget_args args = new updateWidget_args();
2987
        args.read(iprot);
2988
        iprot.readMessageEnd();
2989
        updateWidget_result result = new updateWidget_result();
2990
        try {
2991
          iface_.updateWidget(args.widgetId, args.enable);
2992
        } catch (WidgetException scx) {
2993
          result.scx = scx;
2994
        } catch (Throwable th) {
2995
          LOGGER.error("Internal error processing updateWidget", th);
2996
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidget");
2997
          oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.EXCEPTION, seqid));
2998
          x.write(oprot);
2999
          oprot.writeMessageEnd();
3000
          oprot.getTransport().flush();
3001
          return;
3002
        }
3003
        oprot.writeMessageBegin(new TMessage("updateWidget", TMessageType.REPLY, seqid));
3004
        result.write(oprot);
3005
        oprot.writeMessageEnd();
3006
        oprot.getTransport().flush();
3007
      }
3008
 
3009
    }
3010
 
3011
    private class updateWidgetItem implements ProcessFunction {
3012
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3013
      {
3014
        updateWidgetItem_args args = new updateWidgetItem_args();
3015
        args.read(iprot);
3016
        iprot.readMessageEnd();
3017
        updateWidgetItem_result result = new updateWidgetItem_result();
3018
        try {
3019
          iface_.updateWidgetItem(args.widgetId, args.enable);
3020
        } catch (WidgetException scx) {
3021
          result.scx = scx;
3022
        } catch (Throwable th) {
3023
          LOGGER.error("Internal error processing updateWidgetItem", th);
3024
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateWidgetItem");
3025
          oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.EXCEPTION, seqid));
3026
          x.write(oprot);
3027
          oprot.writeMessageEnd();
3028
          oprot.getTransport().flush();
3029
          return;
3030
        }
3031
        oprot.writeMessageBegin(new TMessage("updateWidgetItem", TMessageType.REPLY, seqid));
3032
        result.write(oprot);
3033
        oprot.writeMessageEnd();
3034
        oprot.getTransport().flush();
3035
      }
3036
 
3037
    }
3038
 
3039
    private class getWidget implements ProcessFunction {
3040
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3041
      {
3042
        getWidget_args args = new getWidget_args();
3043
        args.read(iprot);
3044
        iprot.readMessageEnd();
3045
        getWidget_result result = new getWidget_result();
3046
        try {
3047
          result.success = iface_.getWidget(args.type, args.userId, args.onlyEnabled);
3048
        } catch (WidgetException scx) {
3049
          result.scx = scx;
3050
        } catch (Throwable th) {
3051
          LOGGER.error("Internal error processing getWidget", th);
3052
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getWidget");
3053
          oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.EXCEPTION, seqid));
3054
          x.write(oprot);
3055
          oprot.writeMessageEnd();
3056
          oprot.getTransport().flush();
3057
          return;
3058
        }
3059
        oprot.writeMessageBegin(new TMessage("getWidget", TMessageType.REPLY, seqid));
3060
        result.write(oprot);
3061
        oprot.writeMessageEnd();
3062
        oprot.getTransport().flush();
3063
      }
3064
 
3065
    }
3066
 
3067
    private class getMyResearch implements ProcessFunction {
3068
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3069
      {
3070
        getMyResearch_args args = new getMyResearch_args();
3071
        args.read(iprot);
3072
        iprot.readMessageEnd();
3073
        getMyResearch_result result = new getMyResearch_result();
3074
        try {
3075
          result.success = iface_.getMyResearch(args.user_id);
3076
        } catch (WidgetException scx) {
3077
          result.scx = scx;
3078
        } catch (Throwable th) {
3079
          LOGGER.error("Internal error processing getMyResearch", th);
3080
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
3081
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
3082
          x.write(oprot);
3083
          oprot.writeMessageEnd();
3084
          oprot.getTransport().flush();
3085
          return;
3086
        }
3087
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
3088
        result.write(oprot);
3089
        oprot.writeMessageEnd();
3090
        oprot.getTransport().flush();
3091
      }
3092
 
3093
    }
3094
 
3095
    private class updateMyResearch implements ProcessFunction {
3096
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3097
      {
3098
        updateMyResearch_args args = new updateMyResearch_args();
3099
        args.read(iprot);
3100
        iprot.readMessageEnd();
3101
        updateMyResearch_result result = new updateMyResearch_result();
3102
        try {
3103
          result.success = iface_.updateMyResearch(args.user_id, args.item_id);
130 ashish 3104
          result.setSuccessIsSet(true);
553 chandransh 3105
        } catch (WidgetException scx) {
3106
          result.scx = scx;
130 ashish 3107
        } catch (Throwable th) {
553 chandransh 3108
          LOGGER.error("Internal error processing updateMyResearch", th);
3109
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
3110
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 3111
          x.write(oprot);
3112
          oprot.writeMessageEnd();
3113
          oprot.getTransport().flush();
3114
          return;
3115
        }
553 chandransh 3116
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 3117
        result.write(oprot);
3118
        oprot.writeMessageEnd();
3119
        oprot.getTransport().flush();
3120
      }
3121
 
3122
    }
3123
 
553 chandransh 3124
    private class deleteItemFromMyResearch implements ProcessFunction {
3125
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3126
      {
3127
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
3128
        args.read(iprot);
3129
        iprot.readMessageEnd();
3130
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
3131
        try {
3132
          iface_.deleteItemFromMyResearch(args.user_id, args.item_id);
3133
        } catch (WidgetException scx) {
3134
          result.scx = scx;
3135
        } catch (Throwable th) {
3136
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
3137
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
3138
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
3139
          x.write(oprot);
3140
          oprot.writeMessageEnd();
3141
          oprot.getTransport().flush();
3142
          return;
3143
        }
3144
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
3145
        result.write(oprot);
3146
        oprot.writeMessageEnd();
3147
        oprot.getTransport().flush();
3148
      }
3149
 
3150
    }
3151
 
3152
    private class updateRatings implements ProcessFunction {
3153
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3154
      {
3155
        updateRatings_args args = new updateRatings_args();
3156
        args.read(iprot);
3157
        iprot.readMessageEnd();
3158
        updateRatings_result result = new updateRatings_result();
3159
        iface_.updateRatings(args.item_id, args.type, args.rating, args.user_id);
3160
        oprot.writeMessageBegin(new TMessage("updateRatings", TMessageType.REPLY, seqid));
3161
        result.write(oprot);
3162
        oprot.writeMessageEnd();
3163
        oprot.getTransport().flush();
3164
      }
3165
 
3166
    }
3167
 
3168
    private class getRatings implements ProcessFunction {
3169
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3170
      {
3171
        getRatings_args args = new getRatings_args();
3172
        args.read(iprot);
3173
        iprot.readMessageEnd();
3174
        getRatings_result result = new getRatings_result();
3175
        try {
3176
          result.success = iface_.getRatings(args.item_id, args.user_id);
3177
        } catch (WidgetException scx) {
3178
          result.scx = scx;
3179
        } catch (Throwable th) {
3180
          LOGGER.error("Internal error processing getRatings", th);
3181
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getRatings");
3182
          oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.EXCEPTION, seqid));
3183
          x.write(oprot);
3184
          oprot.writeMessageEnd();
3185
          oprot.getTransport().flush();
3186
          return;
3187
        }
3188
        oprot.writeMessageBegin(new TMessage("getRatings", TMessageType.REPLY, seqid));
3189
        result.write(oprot);
3190
        oprot.writeMessageEnd();
3191
        oprot.getTransport().flush();
3192
      }
3193
 
3194
    }
3195
 
3196
    private class updateBrowseHistory implements ProcessFunction {
3197
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3198
      {
3199
        updateBrowseHistory_args args = new updateBrowseHistory_args();
3200
        args.read(iprot);
3201
        iprot.readMessageEnd();
3202
        updateBrowseHistory_result result = new updateBrowseHistory_result();
3203
        iface_.updateBrowseHistory(args.user_id, args.item_id, args.isSessionId);
3204
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
3205
        result.write(oprot);
3206
        oprot.writeMessageEnd();
3207
        oprot.getTransport().flush();
3208
      }
3209
 
3210
    }
3211
 
3212
    private class getBrowseHistory implements ProcessFunction {
3213
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3214
      {
3215
        getBrowseHistory_args args = new getBrowseHistory_args();
3216
        args.read(iprot);
3217
        iprot.readMessageEnd();
3218
        getBrowseHistory_result result = new getBrowseHistory_result();
3219
        try {
3220
          result.success = iface_.getBrowseHistory(args.userId, args.isSessionId);
3221
        } catch (WidgetException scx) {
3222
          result.scx = scx;
3223
        } catch (Throwable th) {
3224
          LOGGER.error("Internal error processing getBrowseHistory", th);
3225
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
3226
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
3227
          x.write(oprot);
3228
          oprot.writeMessageEnd();
3229
          oprot.getTransport().flush();
3230
          return;
3231
        }
3232
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
3233
        result.write(oprot);
3234
        oprot.writeMessageEnd();
3235
        oprot.getTransport().flush();
3236
      }
3237
 
3238
    }
3239
 
48 ashish 3240
  }
3241
 
553 chandransh 3242
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3243
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3244
 
553 chandransh 3245
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3246
 
553 chandransh 3247
    private String jsessionId;
48 ashish 3248
 
3249
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3250
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3251
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3252
 
3253
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3254
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3255
 
3256
      static {
3257
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3258
          byId.put((int)field._thriftId, field);
3259
          byName.put(field.getFieldName(), field);
3260
        }
3261
      }
3262
 
3263
      /**
3264
       * Find the _Fields constant that matches fieldId, or null if its not found.
3265
       */
3266
      public static _Fields findByThriftId(int fieldId) {
3267
        return byId.get(fieldId);
3268
      }
3269
 
3270
      /**
3271
       * Find the _Fields constant that matches fieldId, throwing an exception
3272
       * if it is not found.
3273
       */
3274
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3275
        _Fields fields = findByThriftId(fieldId);
3276
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3277
        return fields;
3278
      }
3279
 
3280
      /**
3281
       * Find the _Fields constant that matches name, or null if its not found.
3282
       */
3283
      public static _Fields findByName(String name) {
3284
        return byName.get(name);
3285
      }
3286
 
3287
      private final short _thriftId;
3288
      private final String _fieldName;
3289
 
3290
      _Fields(short thriftId, String fieldName) {
3291
        _thriftId = thriftId;
3292
        _fieldName = fieldName;
3293
      }
3294
 
3295
      public short getThriftFieldId() {
3296
        return _thriftId;
3297
      }
3298
 
3299
      public String getFieldName() {
3300
        return _fieldName;
3301
      }
3302
    }
3303
 
3304
    // isset id assignments
3305
 
3306
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3307
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3308
          new FieldValueMetaData(TType.STRING)));
48 ashish 3309
    }});
3310
 
3311
    static {
553 chandransh 3312
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3313
    }
3314
 
553 chandransh 3315
    public createAnonymousUser_args() {
48 ashish 3316
    }
3317
 
553 chandransh 3318
    public createAnonymousUser_args(
3319
      String jsessionId)
48 ashish 3320
    {
3321
      this();
553 chandransh 3322
      this.jsessionId = jsessionId;
48 ashish 3323
    }
3324
 
3325
    /**
3326
     * Performs a deep copy on <i>other</i>.
3327
     */
553 chandransh 3328
    public createAnonymousUser_args(createAnonymousUser_args other) {
3329
      if (other.isSetJsessionId()) {
3330
        this.jsessionId = other.jsessionId;
48 ashish 3331
      }
3332
    }
3333
 
553 chandransh 3334
    public createAnonymousUser_args deepCopy() {
3335
      return new createAnonymousUser_args(this);
48 ashish 3336
    }
3337
 
3338
    @Deprecated
553 chandransh 3339
    public createAnonymousUser_args clone() {
3340
      return new createAnonymousUser_args(this);
48 ashish 3341
    }
3342
 
553 chandransh 3343
    public String getJsessionId() {
3344
      return this.jsessionId;
48 ashish 3345
    }
3346
 
553 chandransh 3347
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3348
      this.jsessionId = jsessionId;
48 ashish 3349
      return this;
3350
    }
3351
 
553 chandransh 3352
    public void unsetJsessionId() {
3353
      this.jsessionId = null;
48 ashish 3354
    }
3355
 
553 chandransh 3356
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3357
    public boolean isSetJsessionId() {
3358
      return this.jsessionId != null;
48 ashish 3359
    }
3360
 
553 chandransh 3361
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3362
      if (!value) {
553 chandransh 3363
        this.jsessionId = null;
48 ashish 3364
      }
3365
    }
3366
 
3367
    public void setFieldValue(_Fields field, Object value) {
3368
      switch (field) {
553 chandransh 3369
      case JSESSION_ID:
48 ashish 3370
        if (value == null) {
553 chandransh 3371
          unsetJsessionId();
48 ashish 3372
        } else {
553 chandransh 3373
          setJsessionId((String)value);
48 ashish 3374
        }
3375
        break;
3376
 
3377
      }
3378
    }
3379
 
3380
    public void setFieldValue(int fieldID, Object value) {
3381
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3382
    }
3383
 
3384
    public Object getFieldValue(_Fields field) {
3385
      switch (field) {
553 chandransh 3386
      case JSESSION_ID:
3387
        return getJsessionId();
48 ashish 3388
 
3389
      }
3390
      throw new IllegalStateException();
3391
    }
3392
 
3393
    public Object getFieldValue(int fieldId) {
3394
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3395
    }
3396
 
3397
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3398
    public boolean isSet(_Fields field) {
3399
      switch (field) {
553 chandransh 3400
      case JSESSION_ID:
3401
        return isSetJsessionId();
48 ashish 3402
      }
3403
      throw new IllegalStateException();
3404
    }
3405
 
3406
    public boolean isSet(int fieldID) {
3407
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3408
    }
3409
 
3410
    @Override
3411
    public boolean equals(Object that) {
3412
      if (that == null)
3413
        return false;
553 chandransh 3414
      if (that instanceof createAnonymousUser_args)
3415
        return this.equals((createAnonymousUser_args)that);
48 ashish 3416
      return false;
3417
    }
3418
 
553 chandransh 3419
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3420
      if (that == null)
3421
        return false;
3422
 
553 chandransh 3423
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3424
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3425
      if (this_present_jsessionId || that_present_jsessionId) {
3426
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3427
          return false;
553 chandransh 3428
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3429
          return false;
3430
      }
3431
 
3432
      return true;
3433
    }
3434
 
3435
    @Override
3436
    public int hashCode() {
3437
      return 0;
3438
    }
3439
 
553 chandransh 3440
    public int compareTo(createAnonymousUser_args other) {
3441
      if (!getClass().equals(other.getClass())) {
3442
        return getClass().getName().compareTo(other.getClass().getName());
3443
      }
3444
 
3445
      int lastComparison = 0;
3446
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3447
 
3448
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3449
      if (lastComparison != 0) {
3450
        return lastComparison;
3451
      }
3452
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3453
      if (lastComparison != 0) {
3454
        return lastComparison;
3455
      }
3456
      return 0;
3457
    }
3458
 
48 ashish 3459
    public void read(TProtocol iprot) throws TException {
3460
      TField field;
3461
      iprot.readStructBegin();
3462
      while (true)
3463
      {
3464
        field = iprot.readFieldBegin();
3465
        if (field.type == TType.STOP) { 
3466
          break;
3467
        }
3468
        _Fields fieldId = _Fields.findByThriftId(field.id);
3469
        if (fieldId == null) {
3470
          TProtocolUtil.skip(iprot, field.type);
3471
        } else {
3472
          switch (fieldId) {
553 chandransh 3473
            case JSESSION_ID:
3474
              if (field.type == TType.STRING) {
3475
                this.jsessionId = iprot.readString();
48 ashish 3476
              } else { 
3477
                TProtocolUtil.skip(iprot, field.type);
3478
              }
3479
              break;
3480
          }
3481
          iprot.readFieldEnd();
3482
        }
3483
      }
3484
      iprot.readStructEnd();
3485
      validate();
3486
    }
3487
 
3488
    public void write(TProtocol oprot) throws TException {
3489
      validate();
3490
 
3491
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3492
      if (this.jsessionId != null) {
3493
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3494
        oprot.writeString(this.jsessionId);
48 ashish 3495
        oprot.writeFieldEnd();
3496
      }
3497
      oprot.writeFieldStop();
3498
      oprot.writeStructEnd();
3499
    }
3500
 
3501
    @Override
3502
    public String toString() {
553 chandransh 3503
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3504
      boolean first = true;
3505
 
553 chandransh 3506
      sb.append("jsessionId:");
3507
      if (this.jsessionId == null) {
48 ashish 3508
        sb.append("null");
3509
      } else {
553 chandransh 3510
        sb.append(this.jsessionId);
48 ashish 3511
      }
3512
      first = false;
3513
      sb.append(")");
3514
      return sb.toString();
3515
    }
3516
 
3517
    public void validate() throws TException {
3518
      // check for required fields
3519
    }
3520
 
3521
  }
3522
 
571 rajveer 3523
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3524
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3525
 
3526
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3527
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3528
 
553 chandransh 3529
    private User success;
3530
    private UserContextException ucex;
48 ashish 3531
 
3532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3533
    public enum _Fields implements TFieldIdEnum {
3534
      SUCCESS((short)0, "success"),
553 chandransh 3535
      UCEX((short)1, "ucex");
48 ashish 3536
 
3537
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3538
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3539
 
3540
      static {
3541
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3542
          byId.put((int)field._thriftId, field);
3543
          byName.put(field.getFieldName(), field);
3544
        }
3545
      }
3546
 
3547
      /**
3548
       * Find the _Fields constant that matches fieldId, or null if its not found.
3549
       */
3550
      public static _Fields findByThriftId(int fieldId) {
3551
        return byId.get(fieldId);
3552
      }
3553
 
3554
      /**
3555
       * Find the _Fields constant that matches fieldId, throwing an exception
3556
       * if it is not found.
3557
       */
3558
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3559
        _Fields fields = findByThriftId(fieldId);
3560
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3561
        return fields;
3562
      }
3563
 
3564
      /**
3565
       * Find the _Fields constant that matches name, or null if its not found.
3566
       */
3567
      public static _Fields findByName(String name) {
3568
        return byName.get(name);
3569
      }
3570
 
3571
      private final short _thriftId;
3572
      private final String _fieldName;
3573
 
3574
      _Fields(short thriftId, String fieldName) {
3575
        _thriftId = thriftId;
3576
        _fieldName = fieldName;
3577
      }
3578
 
3579
      public short getThriftFieldId() {
3580
        return _thriftId;
3581
      }
3582
 
3583
      public String getFieldName() {
3584
        return _fieldName;
3585
      }
3586
    }
3587
 
3588
    // isset id assignments
3589
 
3590
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3591
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3592
          new StructMetaData(TType.STRUCT, User.class)));
3593
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3594
          new FieldValueMetaData(TType.STRUCT)));
3595
    }});
3596
 
3597
    static {
553 chandransh 3598
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3599
    }
3600
 
553 chandransh 3601
    public createAnonymousUser_result() {
48 ashish 3602
    }
3603
 
553 chandransh 3604
    public createAnonymousUser_result(
3605
      User success,
3606
      UserContextException ucex)
48 ashish 3607
    {
3608
      this();
3609
      this.success = success;
553 chandransh 3610
      this.ucex = ucex;
48 ashish 3611
    }
3612
 
3613
    /**
3614
     * Performs a deep copy on <i>other</i>.
3615
     */
553 chandransh 3616
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3617
      if (other.isSetSuccess()) {
553 chandransh 3618
        this.success = new User(other.success);
48 ashish 3619
      }
553 chandransh 3620
      if (other.isSetUcex()) {
3621
        this.ucex = new UserContextException(other.ucex);
48 ashish 3622
      }
3623
    }
3624
 
553 chandransh 3625
    public createAnonymousUser_result deepCopy() {
3626
      return new createAnonymousUser_result(this);
48 ashish 3627
    }
3628
 
3629
    @Deprecated
553 chandransh 3630
    public createAnonymousUser_result clone() {
3631
      return new createAnonymousUser_result(this);
48 ashish 3632
    }
3633
 
553 chandransh 3634
    public User getSuccess() {
48 ashish 3635
      return this.success;
3636
    }
3637
 
553 chandransh 3638
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3639
      this.success = success;
3640
      return this;
3641
    }
3642
 
3643
    public void unsetSuccess() {
3644
      this.success = null;
3645
    }
3646
 
3647
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3648
    public boolean isSetSuccess() {
3649
      return this.success != null;
3650
    }
3651
 
3652
    public void setSuccessIsSet(boolean value) {
3653
      if (!value) {
3654
        this.success = null;
3655
      }
3656
    }
3657
 
553 chandransh 3658
    public UserContextException getUcex() {
3659
      return this.ucex;
48 ashish 3660
    }
3661
 
553 chandransh 3662
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3663
      this.ucex = ucex;
48 ashish 3664
      return this;
3665
    }
3666
 
553 chandransh 3667
    public void unsetUcex() {
3668
      this.ucex = null;
48 ashish 3669
    }
3670
 
553 chandransh 3671
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3672
    public boolean isSetUcex() {
3673
      return this.ucex != null;
48 ashish 3674
    }
3675
 
553 chandransh 3676
    public void setUcexIsSet(boolean value) {
48 ashish 3677
      if (!value) {
553 chandransh 3678
        this.ucex = null;
48 ashish 3679
      }
3680
    }
3681
 
3682
    public void setFieldValue(_Fields field, Object value) {
3683
      switch (field) {
3684
      case SUCCESS:
3685
        if (value == null) {
3686
          unsetSuccess();
3687
        } else {
553 chandransh 3688
          setSuccess((User)value);
48 ashish 3689
        }
3690
        break;
3691
 
553 chandransh 3692
      case UCEX:
48 ashish 3693
        if (value == null) {
553 chandransh 3694
          unsetUcex();
48 ashish 3695
        } else {
553 chandransh 3696
          setUcex((UserContextException)value);
48 ashish 3697
        }
3698
        break;
3699
 
3700
      }
3701
    }
3702
 
3703
    public void setFieldValue(int fieldID, Object value) {
3704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3705
    }
3706
 
3707
    public Object getFieldValue(_Fields field) {
3708
      switch (field) {
3709
      case SUCCESS:
3710
        return getSuccess();
3711
 
553 chandransh 3712
      case UCEX:
3713
        return getUcex();
48 ashish 3714
 
3715
      }
3716
      throw new IllegalStateException();
3717
    }
3718
 
3719
    public Object getFieldValue(int fieldId) {
3720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3721
    }
3722
 
3723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3724
    public boolean isSet(_Fields field) {
3725
      switch (field) {
3726
      case SUCCESS:
3727
        return isSetSuccess();
553 chandransh 3728
      case UCEX:
3729
        return isSetUcex();
48 ashish 3730
      }
3731
      throw new IllegalStateException();
3732
    }
3733
 
3734
    public boolean isSet(int fieldID) {
3735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3736
    }
3737
 
3738
    @Override
3739
    public boolean equals(Object that) {
3740
      if (that == null)
3741
        return false;
553 chandransh 3742
      if (that instanceof createAnonymousUser_result)
3743
        return this.equals((createAnonymousUser_result)that);
48 ashish 3744
      return false;
3745
    }
3746
 
553 chandransh 3747
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3748
      if (that == null)
3749
        return false;
3750
 
3751
      boolean this_present_success = true && this.isSetSuccess();
3752
      boolean that_present_success = true && that.isSetSuccess();
3753
      if (this_present_success || that_present_success) {
3754
        if (!(this_present_success && that_present_success))
3755
          return false;
3756
        if (!this.success.equals(that.success))
3757
          return false;
3758
      }
3759
 
553 chandransh 3760
      boolean this_present_ucex = true && this.isSetUcex();
3761
      boolean that_present_ucex = true && that.isSetUcex();
3762
      if (this_present_ucex || that_present_ucex) {
3763
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3764
          return false;
553 chandransh 3765
        if (!this.ucex.equals(that.ucex))
48 ashish 3766
          return false;
3767
      }
3768
 
3769
      return true;
3770
    }
3771
 
3772
    @Override
3773
    public int hashCode() {
3774
      return 0;
3775
    }
3776
 
571 rajveer 3777
    public int compareTo(createAnonymousUser_result other) {
3778
      if (!getClass().equals(other.getClass())) {
3779
        return getClass().getName().compareTo(other.getClass().getName());
3780
      }
3781
 
3782
      int lastComparison = 0;
3783
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3784
 
3785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3786
      if (lastComparison != 0) {
3787
        return lastComparison;
3788
      }
3789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3790
      if (lastComparison != 0) {
3791
        return lastComparison;
3792
      }
3793
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3794
      if (lastComparison != 0) {
3795
        return lastComparison;
3796
      }
3797
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3798
      if (lastComparison != 0) {
3799
        return lastComparison;
3800
      }
3801
      return 0;
3802
    }
3803
 
48 ashish 3804
    public void read(TProtocol iprot) throws TException {
3805
      TField field;
3806
      iprot.readStructBegin();
3807
      while (true)
3808
      {
3809
        field = iprot.readFieldBegin();
3810
        if (field.type == TType.STOP) { 
3811
          break;
3812
        }
3813
        _Fields fieldId = _Fields.findByThriftId(field.id);
3814
        if (fieldId == null) {
3815
          TProtocolUtil.skip(iprot, field.type);
3816
        } else {
3817
          switch (fieldId) {
3818
            case SUCCESS:
3819
              if (field.type == TType.STRUCT) {
553 chandransh 3820
                this.success = new User();
48 ashish 3821
                this.success.read(iprot);
3822
              } else { 
3823
                TProtocolUtil.skip(iprot, field.type);
3824
              }
3825
              break;
553 chandransh 3826
            case UCEX:
48 ashish 3827
              if (field.type == TType.STRUCT) {
553 chandransh 3828
                this.ucex = new UserContextException();
3829
                this.ucex.read(iprot);
48 ashish 3830
              } else { 
3831
                TProtocolUtil.skip(iprot, field.type);
3832
              }
3833
              break;
3834
          }
3835
          iprot.readFieldEnd();
3836
        }
3837
      }
3838
      iprot.readStructEnd();
3839
      validate();
3840
    }
3841
 
3842
    public void write(TProtocol oprot) throws TException {
3843
      oprot.writeStructBegin(STRUCT_DESC);
3844
 
3845
      if (this.isSetSuccess()) {
3846
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3847
        this.success.write(oprot);
3848
        oprot.writeFieldEnd();
553 chandransh 3849
      } else if (this.isSetUcex()) {
3850
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3851
        this.ucex.write(oprot);
48 ashish 3852
        oprot.writeFieldEnd();
3853
      }
3854
      oprot.writeFieldStop();
3855
      oprot.writeStructEnd();
3856
    }
3857
 
3858
    @Override
3859
    public String toString() {
553 chandransh 3860
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3861
      boolean first = true;
3862
 
3863
      sb.append("success:");
3864
      if (this.success == null) {
3865
        sb.append("null");
3866
      } else {
3867
        sb.append(this.success);
3868
      }
3869
      first = false;
3870
      if (!first) sb.append(", ");
553 chandransh 3871
      sb.append("ucex:");
3872
      if (this.ucex == null) {
48 ashish 3873
        sb.append("null");
3874
      } else {
553 chandransh 3875
        sb.append(this.ucex);
48 ashish 3876
      }
3877
      first = false;
3878
      sb.append(")");
3879
      return sb.toString();
3880
    }
3881
 
3882
    public void validate() throws TException {
3883
      // check for required fields
3884
    }
3885
 
3886
  }
3887
 
553 chandransh 3888
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3889
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3890
 
3891
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3892
 
3893
    private long userId;
3894
 
3895
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3896
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3897
      USER_ID((short)1, "userId");
48 ashish 3898
 
3899
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3900
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3901
 
3902
      static {
3903
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3904
          byId.put((int)field._thriftId, field);
3905
          byName.put(field.getFieldName(), field);
3906
        }
3907
      }
3908
 
3909
      /**
3910
       * Find the _Fields constant that matches fieldId, or null if its not found.
3911
       */
3912
      public static _Fields findByThriftId(int fieldId) {
3913
        return byId.get(fieldId);
3914
      }
3915
 
3916
      /**
3917
       * Find the _Fields constant that matches fieldId, throwing an exception
3918
       * if it is not found.
3919
       */
3920
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3921
        _Fields fields = findByThriftId(fieldId);
3922
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3923
        return fields;
3924
      }
3925
 
3926
      /**
3927
       * Find the _Fields constant that matches name, or null if its not found.
3928
       */
3929
      public static _Fields findByName(String name) {
3930
        return byName.get(name);
3931
      }
3932
 
3933
      private final short _thriftId;
3934
      private final String _fieldName;
3935
 
3936
      _Fields(short thriftId, String fieldName) {
3937
        _thriftId = thriftId;
3938
        _fieldName = fieldName;
3939
      }
3940
 
3941
      public short getThriftFieldId() {
3942
        return _thriftId;
3943
      }
3944
 
3945
      public String getFieldName() {
3946
        return _fieldName;
3947
      }
3948
    }
3949
 
3950
    // isset id assignments
3951
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3952
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3953
 
3954
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3955
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3956
          new FieldValueMetaData(TType.I64)));
3957
    }});
3958
 
3959
    static {
553 chandransh 3960
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 3961
    }
3962
 
553 chandransh 3963
    public getUserById_args() {
48 ashish 3964
    }
3965
 
553 chandransh 3966
    public getUserById_args(
3967
      long userId)
48 ashish 3968
    {
3969
      this();
3970
      this.userId = userId;
3971
      setUserIdIsSet(true);
3972
    }
3973
 
3974
    /**
3975
     * Performs a deep copy on <i>other</i>.
3976
     */
553 chandransh 3977
    public getUserById_args(getUserById_args other) {
48 ashish 3978
      __isset_bit_vector.clear();
3979
      __isset_bit_vector.or(other.__isset_bit_vector);
3980
      this.userId = other.userId;
3981
    }
3982
 
553 chandransh 3983
    public getUserById_args deepCopy() {
3984
      return new getUserById_args(this);
48 ashish 3985
    }
3986
 
3987
    @Deprecated
553 chandransh 3988
    public getUserById_args clone() {
3989
      return new getUserById_args(this);
48 ashish 3990
    }
3991
 
3992
    public long getUserId() {
3993
      return this.userId;
3994
    }
3995
 
553 chandransh 3996
    public getUserById_args setUserId(long userId) {
48 ashish 3997
      this.userId = userId;
3998
      setUserIdIsSet(true);
3999
      return this;
4000
    }
4001
 
4002
    public void unsetUserId() {
4003
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4004
    }
4005
 
4006
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4007
    public boolean isSetUserId() {
4008
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4009
    }
4010
 
4011
    public void setUserIdIsSet(boolean value) {
4012
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4013
    }
4014
 
4015
    public void setFieldValue(_Fields field, Object value) {
4016
      switch (field) {
4017
      case USER_ID:
4018
        if (value == null) {
4019
          unsetUserId();
4020
        } else {
4021
          setUserId((Long)value);
4022
        }
4023
        break;
4024
 
4025
      }
4026
    }
4027
 
4028
    public void setFieldValue(int fieldID, Object value) {
4029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4030
    }
4031
 
4032
    public Object getFieldValue(_Fields field) {
4033
      switch (field) {
4034
      case USER_ID:
4035
        return new Long(getUserId());
4036
 
4037
      }
4038
      throw new IllegalStateException();
4039
    }
4040
 
4041
    public Object getFieldValue(int fieldId) {
4042
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4043
    }
4044
 
4045
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4046
    public boolean isSet(_Fields field) {
4047
      switch (field) {
4048
      case USER_ID:
4049
        return isSetUserId();
4050
      }
4051
      throw new IllegalStateException();
4052
    }
4053
 
4054
    public boolean isSet(int fieldID) {
4055
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4056
    }
4057
 
4058
    @Override
4059
    public boolean equals(Object that) {
4060
      if (that == null)
4061
        return false;
553 chandransh 4062
      if (that instanceof getUserById_args)
4063
        return this.equals((getUserById_args)that);
48 ashish 4064
      return false;
4065
    }
4066
 
553 chandransh 4067
    public boolean equals(getUserById_args that) {
48 ashish 4068
      if (that == null)
4069
        return false;
4070
 
4071
      boolean this_present_userId = true;
4072
      boolean that_present_userId = true;
4073
      if (this_present_userId || that_present_userId) {
4074
        if (!(this_present_userId && that_present_userId))
4075
          return false;
4076
        if (this.userId != that.userId)
4077
          return false;
4078
      }
4079
 
4080
      return true;
4081
    }
4082
 
4083
    @Override
4084
    public int hashCode() {
4085
      return 0;
4086
    }
4087
 
553 chandransh 4088
    public int compareTo(getUserById_args other) {
48 ashish 4089
      if (!getClass().equals(other.getClass())) {
4090
        return getClass().getName().compareTo(other.getClass().getName());
4091
      }
4092
 
4093
      int lastComparison = 0;
553 chandransh 4094
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4095
 
4096
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4097
      if (lastComparison != 0) {
4098
        return lastComparison;
4099
      }
4100
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4101
      if (lastComparison != 0) {
4102
        return lastComparison;
4103
      }
4104
      return 0;
4105
    }
4106
 
4107
    public void read(TProtocol iprot) throws TException {
4108
      TField field;
4109
      iprot.readStructBegin();
4110
      while (true)
4111
      {
4112
        field = iprot.readFieldBegin();
4113
        if (field.type == TType.STOP) { 
4114
          break;
4115
        }
4116
        _Fields fieldId = _Fields.findByThriftId(field.id);
4117
        if (fieldId == null) {
4118
          TProtocolUtil.skip(iprot, field.type);
4119
        } else {
4120
          switch (fieldId) {
4121
            case USER_ID:
4122
              if (field.type == TType.I64) {
4123
                this.userId = iprot.readI64();
4124
                setUserIdIsSet(true);
4125
              } else { 
4126
                TProtocolUtil.skip(iprot, field.type);
4127
              }
4128
              break;
4129
          }
4130
          iprot.readFieldEnd();
4131
        }
4132
      }
4133
      iprot.readStructEnd();
4134
      validate();
4135
    }
4136
 
4137
    public void write(TProtocol oprot) throws TException {
4138
      validate();
4139
 
4140
      oprot.writeStructBegin(STRUCT_DESC);
4141
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4142
      oprot.writeI64(this.userId);
4143
      oprot.writeFieldEnd();
4144
      oprot.writeFieldStop();
4145
      oprot.writeStructEnd();
4146
    }
4147
 
4148
    @Override
4149
    public String toString() {
553 chandransh 4150
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4151
      boolean first = true;
4152
 
4153
      sb.append("userId:");
4154
      sb.append(this.userId);
4155
      first = false;
4156
      sb.append(")");
4157
      return sb.toString();
4158
    }
4159
 
4160
    public void validate() throws TException {
4161
      // check for required fields
4162
    }
4163
 
4164
  }
4165
 
571 rajveer 4166
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4167
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4168
 
4169
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4170
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4171
 
553 chandransh 4172
    private User success;
4173
    private UserContextException ucex;
48 ashish 4174
 
4175
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4176
    public enum _Fields implements TFieldIdEnum {
4177
      SUCCESS((short)0, "success"),
553 chandransh 4178
      UCEX((short)1, "ucex");
48 ashish 4179
 
4180
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4181
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4182
 
4183
      static {
4184
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4185
          byId.put((int)field._thriftId, field);
4186
          byName.put(field.getFieldName(), field);
4187
        }
4188
      }
4189
 
4190
      /**
4191
       * Find the _Fields constant that matches fieldId, or null if its not found.
4192
       */
4193
      public static _Fields findByThriftId(int fieldId) {
4194
        return byId.get(fieldId);
4195
      }
4196
 
4197
      /**
4198
       * Find the _Fields constant that matches fieldId, throwing an exception
4199
       * if it is not found.
4200
       */
4201
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4202
        _Fields fields = findByThriftId(fieldId);
4203
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4204
        return fields;
4205
      }
4206
 
4207
      /**
4208
       * Find the _Fields constant that matches name, or null if its not found.
4209
       */
4210
      public static _Fields findByName(String name) {
4211
        return byName.get(name);
4212
      }
4213
 
4214
      private final short _thriftId;
4215
      private final String _fieldName;
4216
 
4217
      _Fields(short thriftId, String fieldName) {
4218
        _thriftId = thriftId;
4219
        _fieldName = fieldName;
4220
      }
4221
 
4222
      public short getThriftFieldId() {
4223
        return _thriftId;
4224
      }
4225
 
4226
      public String getFieldName() {
4227
        return _fieldName;
4228
      }
4229
    }
4230
 
4231
    // isset id assignments
4232
 
4233
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4234
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4235
          new StructMetaData(TType.STRUCT, User.class)));
4236
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4237
          new FieldValueMetaData(TType.STRUCT)));
4238
    }});
4239
 
4240
    static {
553 chandransh 4241
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4242
    }
4243
 
553 chandransh 4244
    public getUserById_result() {
48 ashish 4245
    }
4246
 
553 chandransh 4247
    public getUserById_result(
4248
      User success,
4249
      UserContextException ucex)
48 ashish 4250
    {
4251
      this();
4252
      this.success = success;
553 chandransh 4253
      this.ucex = ucex;
48 ashish 4254
    }
4255
 
4256
    /**
4257
     * Performs a deep copy on <i>other</i>.
4258
     */
553 chandransh 4259
    public getUserById_result(getUserById_result other) {
48 ashish 4260
      if (other.isSetSuccess()) {
553 chandransh 4261
        this.success = new User(other.success);
48 ashish 4262
      }
553 chandransh 4263
      if (other.isSetUcex()) {
4264
        this.ucex = new UserContextException(other.ucex);
48 ashish 4265
      }
4266
    }
4267
 
553 chandransh 4268
    public getUserById_result deepCopy() {
4269
      return new getUserById_result(this);
48 ashish 4270
    }
4271
 
4272
    @Deprecated
553 chandransh 4273
    public getUserById_result clone() {
4274
      return new getUserById_result(this);
48 ashish 4275
    }
4276
 
553 chandransh 4277
    public User getSuccess() {
48 ashish 4278
      return this.success;
4279
    }
4280
 
553 chandransh 4281
    public getUserById_result setSuccess(User success) {
48 ashish 4282
      this.success = success;
4283
      return this;
4284
    }
4285
 
4286
    public void unsetSuccess() {
4287
      this.success = null;
4288
    }
4289
 
4290
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4291
    public boolean isSetSuccess() {
4292
      return this.success != null;
4293
    }
4294
 
4295
    public void setSuccessIsSet(boolean value) {
4296
      if (!value) {
4297
        this.success = null;
4298
      }
4299
    }
4300
 
553 chandransh 4301
    public UserContextException getUcex() {
4302
      return this.ucex;
48 ashish 4303
    }
4304
 
553 chandransh 4305
    public getUserById_result setUcex(UserContextException ucex) {
4306
      this.ucex = ucex;
48 ashish 4307
      return this;
4308
    }
4309
 
553 chandransh 4310
    public void unsetUcex() {
4311
      this.ucex = null;
48 ashish 4312
    }
4313
 
553 chandransh 4314
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4315
    public boolean isSetUcex() {
4316
      return this.ucex != null;
48 ashish 4317
    }
4318
 
553 chandransh 4319
    public void setUcexIsSet(boolean value) {
48 ashish 4320
      if (!value) {
553 chandransh 4321
        this.ucex = null;
48 ashish 4322
      }
4323
    }
4324
 
4325
    public void setFieldValue(_Fields field, Object value) {
4326
      switch (field) {
4327
      case SUCCESS:
4328
        if (value == null) {
4329
          unsetSuccess();
4330
        } else {
553 chandransh 4331
          setSuccess((User)value);
48 ashish 4332
        }
4333
        break;
4334
 
553 chandransh 4335
      case UCEX:
48 ashish 4336
        if (value == null) {
553 chandransh 4337
          unsetUcex();
48 ashish 4338
        } else {
553 chandransh 4339
          setUcex((UserContextException)value);
48 ashish 4340
        }
4341
        break;
4342
 
4343
      }
4344
    }
4345
 
4346
    public void setFieldValue(int fieldID, Object value) {
4347
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4348
    }
4349
 
4350
    public Object getFieldValue(_Fields field) {
4351
      switch (field) {
4352
      case SUCCESS:
4353
        return getSuccess();
4354
 
553 chandransh 4355
      case UCEX:
4356
        return getUcex();
48 ashish 4357
 
4358
      }
4359
      throw new IllegalStateException();
4360
    }
4361
 
4362
    public Object getFieldValue(int fieldId) {
4363
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4364
    }
4365
 
4366
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4367
    public boolean isSet(_Fields field) {
4368
      switch (field) {
4369
      case SUCCESS:
4370
        return isSetSuccess();
553 chandransh 4371
      case UCEX:
4372
        return isSetUcex();
48 ashish 4373
      }
4374
      throw new IllegalStateException();
4375
    }
4376
 
4377
    public boolean isSet(int fieldID) {
4378
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4379
    }
4380
 
4381
    @Override
4382
    public boolean equals(Object that) {
4383
      if (that == null)
4384
        return false;
553 chandransh 4385
      if (that instanceof getUserById_result)
4386
        return this.equals((getUserById_result)that);
48 ashish 4387
      return false;
4388
    }
4389
 
553 chandransh 4390
    public boolean equals(getUserById_result that) {
48 ashish 4391
      if (that == null)
4392
        return false;
4393
 
4394
      boolean this_present_success = true && this.isSetSuccess();
4395
      boolean that_present_success = true && that.isSetSuccess();
4396
      if (this_present_success || that_present_success) {
4397
        if (!(this_present_success && that_present_success))
4398
          return false;
4399
        if (!this.success.equals(that.success))
4400
          return false;
4401
      }
4402
 
553 chandransh 4403
      boolean this_present_ucex = true && this.isSetUcex();
4404
      boolean that_present_ucex = true && that.isSetUcex();
4405
      if (this_present_ucex || that_present_ucex) {
4406
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4407
          return false;
553 chandransh 4408
        if (!this.ucex.equals(that.ucex))
48 ashish 4409
          return false;
4410
      }
4411
 
4412
      return true;
4413
    }
4414
 
4415
    @Override
4416
    public int hashCode() {
4417
      return 0;
4418
    }
4419
 
571 rajveer 4420
    public int compareTo(getUserById_result other) {
4421
      if (!getClass().equals(other.getClass())) {
4422
        return getClass().getName().compareTo(other.getClass().getName());
4423
      }
4424
 
4425
      int lastComparison = 0;
4426
      getUserById_result typedOther = (getUserById_result)other;
4427
 
4428
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4429
      if (lastComparison != 0) {
4430
        return lastComparison;
4431
      }
4432
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4433
      if (lastComparison != 0) {
4434
        return lastComparison;
4435
      }
4436
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4437
      if (lastComparison != 0) {
4438
        return lastComparison;
4439
      }
4440
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4441
      if (lastComparison != 0) {
4442
        return lastComparison;
4443
      }
4444
      return 0;
4445
    }
4446
 
48 ashish 4447
    public void read(TProtocol iprot) throws TException {
4448
      TField field;
4449
      iprot.readStructBegin();
4450
      while (true)
4451
      {
4452
        field = iprot.readFieldBegin();
4453
        if (field.type == TType.STOP) { 
4454
          break;
4455
        }
4456
        _Fields fieldId = _Fields.findByThriftId(field.id);
4457
        if (fieldId == null) {
4458
          TProtocolUtil.skip(iprot, field.type);
4459
        } else {
4460
          switch (fieldId) {
4461
            case SUCCESS:
4462
              if (field.type == TType.STRUCT) {
553 chandransh 4463
                this.success = new User();
48 ashish 4464
                this.success.read(iprot);
4465
              } else { 
4466
                TProtocolUtil.skip(iprot, field.type);
4467
              }
4468
              break;
553 chandransh 4469
            case UCEX:
48 ashish 4470
              if (field.type == TType.STRUCT) {
553 chandransh 4471
                this.ucex = new UserContextException();
4472
                this.ucex.read(iprot);
48 ashish 4473
              } else { 
4474
                TProtocolUtil.skip(iprot, field.type);
4475
              }
4476
              break;
4477
          }
4478
          iprot.readFieldEnd();
4479
        }
4480
      }
4481
      iprot.readStructEnd();
4482
      validate();
4483
    }
4484
 
4485
    public void write(TProtocol oprot) throws TException {
4486
      oprot.writeStructBegin(STRUCT_DESC);
4487
 
4488
      if (this.isSetSuccess()) {
4489
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4490
        this.success.write(oprot);
4491
        oprot.writeFieldEnd();
553 chandransh 4492
      } else if (this.isSetUcex()) {
4493
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4494
        this.ucex.write(oprot);
48 ashish 4495
        oprot.writeFieldEnd();
4496
      }
4497
      oprot.writeFieldStop();
4498
      oprot.writeStructEnd();
4499
    }
4500
 
4501
    @Override
4502
    public String toString() {
553 chandransh 4503
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4504
      boolean first = true;
4505
 
4506
      sb.append("success:");
4507
      if (this.success == null) {
4508
        sb.append("null");
4509
      } else {
4510
        sb.append(this.success);
4511
      }
4512
      first = false;
4513
      if (!first) sb.append(", ");
553 chandransh 4514
      sb.append("ucex:");
4515
      if (this.ucex == null) {
48 ashish 4516
        sb.append("null");
4517
      } else {
553 chandransh 4518
        sb.append(this.ucex);
48 ashish 4519
      }
4520
      first = false;
4521
      sb.append(")");
4522
      return sb.toString();
4523
    }
4524
 
4525
    public void validate() throws TException {
4526
      // check for required fields
4527
    }
4528
 
4529
  }
4530
 
571 rajveer 4531
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4532
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4533
 
553 chandransh 4534
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4535
 
553 chandransh 4536
    private User user;
48 ashish 4537
 
4538
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4539
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4540
      USER((short)1, "user");
48 ashish 4541
 
4542
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4543
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4544
 
4545
      static {
4546
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4547
          byId.put((int)field._thriftId, field);
4548
          byName.put(field.getFieldName(), field);
4549
        }
4550
      }
4551
 
4552
      /**
4553
       * Find the _Fields constant that matches fieldId, or null if its not found.
4554
       */
4555
      public static _Fields findByThriftId(int fieldId) {
4556
        return byId.get(fieldId);
4557
      }
4558
 
4559
      /**
4560
       * Find the _Fields constant that matches fieldId, throwing an exception
4561
       * if it is not found.
4562
       */
4563
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4564
        _Fields fields = findByThriftId(fieldId);
4565
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4566
        return fields;
4567
      }
4568
 
4569
      /**
4570
       * Find the _Fields constant that matches name, or null if its not found.
4571
       */
4572
      public static _Fields findByName(String name) {
4573
        return byName.get(name);
4574
      }
4575
 
4576
      private final short _thriftId;
4577
      private final String _fieldName;
4578
 
4579
      _Fields(short thriftId, String fieldName) {
4580
        _thriftId = thriftId;
4581
        _fieldName = fieldName;
4582
      }
4583
 
4584
      public short getThriftFieldId() {
4585
        return _thriftId;
4586
      }
4587
 
4588
      public String getFieldName() {
4589
        return _fieldName;
4590
      }
4591
    }
4592
 
4593
    // isset id assignments
4594
 
4595
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4596
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4597
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4598
    }});
4599
 
4600
    static {
553 chandransh 4601
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4602
    }
4603
 
553 chandransh 4604
    public createUser_args() {
48 ashish 4605
    }
4606
 
553 chandransh 4607
    public createUser_args(
4608
      User user)
48 ashish 4609
    {
4610
      this();
553 chandransh 4611
      this.user = user;
48 ashish 4612
    }
4613
 
4614
    /**
4615
     * Performs a deep copy on <i>other</i>.
4616
     */
553 chandransh 4617
    public createUser_args(createUser_args other) {
4618
      if (other.isSetUser()) {
4619
        this.user = new User(other.user);
48 ashish 4620
      }
4621
    }
4622
 
553 chandransh 4623
    public createUser_args deepCopy() {
4624
      return new createUser_args(this);
48 ashish 4625
    }
4626
 
4627
    @Deprecated
553 chandransh 4628
    public createUser_args clone() {
4629
      return new createUser_args(this);
48 ashish 4630
    }
4631
 
553 chandransh 4632
    public User getUser() {
4633
      return this.user;
48 ashish 4634
    }
4635
 
553 chandransh 4636
    public createUser_args setUser(User user) {
4637
      this.user = user;
48 ashish 4638
      return this;
4639
    }
4640
 
553 chandransh 4641
    public void unsetUser() {
4642
      this.user = null;
48 ashish 4643
    }
4644
 
553 chandransh 4645
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4646
    public boolean isSetUser() {
4647
      return this.user != null;
48 ashish 4648
    }
4649
 
553 chandransh 4650
    public void setUserIsSet(boolean value) {
48 ashish 4651
      if (!value) {
553 chandransh 4652
        this.user = null;
48 ashish 4653
      }
4654
    }
4655
 
4656
    public void setFieldValue(_Fields field, Object value) {
4657
      switch (field) {
553 chandransh 4658
      case USER:
48 ashish 4659
        if (value == null) {
553 chandransh 4660
          unsetUser();
48 ashish 4661
        } else {
553 chandransh 4662
          setUser((User)value);
48 ashish 4663
        }
4664
        break;
4665
 
4666
      }
4667
    }
4668
 
4669
    public void setFieldValue(int fieldID, Object value) {
4670
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4671
    }
4672
 
4673
    public Object getFieldValue(_Fields field) {
4674
      switch (field) {
553 chandransh 4675
      case USER:
4676
        return getUser();
48 ashish 4677
 
4678
      }
4679
      throw new IllegalStateException();
4680
    }
4681
 
4682
    public Object getFieldValue(int fieldId) {
4683
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4684
    }
4685
 
4686
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4687
    public boolean isSet(_Fields field) {
4688
      switch (field) {
553 chandransh 4689
      case USER:
4690
        return isSetUser();
48 ashish 4691
      }
4692
      throw new IllegalStateException();
4693
    }
4694
 
4695
    public boolean isSet(int fieldID) {
4696
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4697
    }
4698
 
4699
    @Override
4700
    public boolean equals(Object that) {
4701
      if (that == null)
4702
        return false;
553 chandransh 4703
      if (that instanceof createUser_args)
4704
        return this.equals((createUser_args)that);
48 ashish 4705
      return false;
4706
    }
4707
 
553 chandransh 4708
    public boolean equals(createUser_args that) {
48 ashish 4709
      if (that == null)
4710
        return false;
4711
 
553 chandransh 4712
      boolean this_present_user = true && this.isSetUser();
4713
      boolean that_present_user = true && that.isSetUser();
4714
      if (this_present_user || that_present_user) {
4715
        if (!(this_present_user && that_present_user))
48 ashish 4716
          return false;
553 chandransh 4717
        if (!this.user.equals(that.user))
48 ashish 4718
          return false;
4719
      }
4720
 
4721
      return true;
4722
    }
4723
 
4724
    @Override
4725
    public int hashCode() {
4726
      return 0;
4727
    }
4728
 
571 rajveer 4729
    public int compareTo(createUser_args other) {
4730
      if (!getClass().equals(other.getClass())) {
4731
        return getClass().getName().compareTo(other.getClass().getName());
4732
      }
4733
 
4734
      int lastComparison = 0;
4735
      createUser_args typedOther = (createUser_args)other;
4736
 
4737
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4738
      if (lastComparison != 0) {
4739
        return lastComparison;
4740
      }
4741
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4742
      if (lastComparison != 0) {
4743
        return lastComparison;
4744
      }
4745
      return 0;
4746
    }
4747
 
48 ashish 4748
    public void read(TProtocol iprot) throws TException {
4749
      TField field;
4750
      iprot.readStructBegin();
4751
      while (true)
4752
      {
4753
        field = iprot.readFieldBegin();
4754
        if (field.type == TType.STOP) { 
4755
          break;
4756
        }
4757
        _Fields fieldId = _Fields.findByThriftId(field.id);
4758
        if (fieldId == null) {
4759
          TProtocolUtil.skip(iprot, field.type);
4760
        } else {
4761
          switch (fieldId) {
553 chandransh 4762
            case USER:
4763
              if (field.type == TType.STRUCT) {
4764
                this.user = new User();
4765
                this.user.read(iprot);
48 ashish 4766
              } else { 
4767
                TProtocolUtil.skip(iprot, field.type);
4768
              }
4769
              break;
4770
          }
4771
          iprot.readFieldEnd();
4772
        }
4773
      }
4774
      iprot.readStructEnd();
4775
      validate();
4776
    }
4777
 
4778
    public void write(TProtocol oprot) throws TException {
4779
      validate();
4780
 
4781
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4782
      if (this.user != null) {
4783
        oprot.writeFieldBegin(USER_FIELD_DESC);
4784
        this.user.write(oprot);
48 ashish 4785
        oprot.writeFieldEnd();
4786
      }
4787
      oprot.writeFieldStop();
4788
      oprot.writeStructEnd();
4789
    }
4790
 
4791
    @Override
4792
    public String toString() {
553 chandransh 4793
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4794
      boolean first = true;
4795
 
553 chandransh 4796
      sb.append("user:");
4797
      if (this.user == null) {
48 ashish 4798
        sb.append("null");
4799
      } else {
553 chandransh 4800
        sb.append(this.user);
48 ashish 4801
      }
4802
      first = false;
4803
      sb.append(")");
4804
      return sb.toString();
4805
    }
4806
 
4807
    public void validate() throws TException {
4808
      // check for required fields
4809
    }
4810
 
4811
  }
4812
 
571 rajveer 4813
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4814
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4815
 
4816
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4817
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4818
 
553 chandransh 4819
    private User success;
4820
    private UserContextException ucex;
48 ashish 4821
 
4822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4823
    public enum _Fields implements TFieldIdEnum {
4824
      SUCCESS((short)0, "success"),
553 chandransh 4825
      UCEX((short)1, "ucex");
48 ashish 4826
 
4827
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4828
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4829
 
4830
      static {
4831
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4832
          byId.put((int)field._thriftId, field);
4833
          byName.put(field.getFieldName(), field);
4834
        }
4835
      }
4836
 
4837
      /**
4838
       * Find the _Fields constant that matches fieldId, or null if its not found.
4839
       */
4840
      public static _Fields findByThriftId(int fieldId) {
4841
        return byId.get(fieldId);
4842
      }
4843
 
4844
      /**
4845
       * Find the _Fields constant that matches fieldId, throwing an exception
4846
       * if it is not found.
4847
       */
4848
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4849
        _Fields fields = findByThriftId(fieldId);
4850
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4851
        return fields;
4852
      }
4853
 
4854
      /**
4855
       * Find the _Fields constant that matches name, or null if its not found.
4856
       */
4857
      public static _Fields findByName(String name) {
4858
        return byName.get(name);
4859
      }
4860
 
4861
      private final short _thriftId;
4862
      private final String _fieldName;
4863
 
4864
      _Fields(short thriftId, String fieldName) {
4865
        _thriftId = thriftId;
4866
        _fieldName = fieldName;
4867
      }
4868
 
4869
      public short getThriftFieldId() {
4870
        return _thriftId;
4871
      }
4872
 
4873
      public String getFieldName() {
4874
        return _fieldName;
4875
      }
4876
    }
4877
 
4878
    // isset id assignments
4879
 
4880
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4881
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4882
          new StructMetaData(TType.STRUCT, User.class)));
4883
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4884
          new FieldValueMetaData(TType.STRUCT)));
4885
    }});
4886
 
4887
    static {
553 chandransh 4888
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4889
    }
4890
 
553 chandransh 4891
    public createUser_result() {
48 ashish 4892
    }
4893
 
553 chandransh 4894
    public createUser_result(
4895
      User success,
4896
      UserContextException ucex)
48 ashish 4897
    {
4898
      this();
4899
      this.success = success;
553 chandransh 4900
      this.ucex = ucex;
48 ashish 4901
    }
4902
 
4903
    /**
4904
     * Performs a deep copy on <i>other</i>.
4905
     */
553 chandransh 4906
    public createUser_result(createUser_result other) {
48 ashish 4907
      if (other.isSetSuccess()) {
553 chandransh 4908
        this.success = new User(other.success);
48 ashish 4909
      }
553 chandransh 4910
      if (other.isSetUcex()) {
4911
        this.ucex = new UserContextException(other.ucex);
48 ashish 4912
      }
4913
    }
4914
 
553 chandransh 4915
    public createUser_result deepCopy() {
4916
      return new createUser_result(this);
48 ashish 4917
    }
4918
 
4919
    @Deprecated
553 chandransh 4920
    public createUser_result clone() {
4921
      return new createUser_result(this);
48 ashish 4922
    }
4923
 
553 chandransh 4924
    public User getSuccess() {
48 ashish 4925
      return this.success;
4926
    }
4927
 
553 chandransh 4928
    public createUser_result setSuccess(User success) {
48 ashish 4929
      this.success = success;
4930
      return this;
4931
    }
4932
 
4933
    public void unsetSuccess() {
4934
      this.success = null;
4935
    }
4936
 
4937
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4938
    public boolean isSetSuccess() {
4939
      return this.success != null;
4940
    }
4941
 
4942
    public void setSuccessIsSet(boolean value) {
4943
      if (!value) {
4944
        this.success = null;
4945
      }
4946
    }
4947
 
553 chandransh 4948
    public UserContextException getUcex() {
4949
      return this.ucex;
48 ashish 4950
    }
4951
 
553 chandransh 4952
    public createUser_result setUcex(UserContextException ucex) {
4953
      this.ucex = ucex;
48 ashish 4954
      return this;
4955
    }
4956
 
553 chandransh 4957
    public void unsetUcex() {
4958
      this.ucex = null;
48 ashish 4959
    }
4960
 
553 chandransh 4961
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4962
    public boolean isSetUcex() {
4963
      return this.ucex != null;
48 ashish 4964
    }
4965
 
553 chandransh 4966
    public void setUcexIsSet(boolean value) {
48 ashish 4967
      if (!value) {
553 chandransh 4968
        this.ucex = null;
48 ashish 4969
      }
4970
    }
4971
 
4972
    public void setFieldValue(_Fields field, Object value) {
4973
      switch (field) {
4974
      case SUCCESS:
4975
        if (value == null) {
4976
          unsetSuccess();
4977
        } else {
553 chandransh 4978
          setSuccess((User)value);
48 ashish 4979
        }
4980
        break;
4981
 
553 chandransh 4982
      case UCEX:
48 ashish 4983
        if (value == null) {
553 chandransh 4984
          unsetUcex();
48 ashish 4985
        } else {
553 chandransh 4986
          setUcex((UserContextException)value);
48 ashish 4987
        }
4988
        break;
4989
 
4990
      }
4991
    }
4992
 
4993
    public void setFieldValue(int fieldID, Object value) {
4994
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4995
    }
4996
 
4997
    public Object getFieldValue(_Fields field) {
4998
      switch (field) {
4999
      case SUCCESS:
5000
        return getSuccess();
5001
 
553 chandransh 5002
      case UCEX:
5003
        return getUcex();
48 ashish 5004
 
5005
      }
5006
      throw new IllegalStateException();
5007
    }
5008
 
5009
    public Object getFieldValue(int fieldId) {
5010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5011
    }
5012
 
5013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5014
    public boolean isSet(_Fields field) {
5015
      switch (field) {
5016
      case SUCCESS:
5017
        return isSetSuccess();
553 chandransh 5018
      case UCEX:
5019
        return isSetUcex();
48 ashish 5020
      }
5021
      throw new IllegalStateException();
5022
    }
5023
 
5024
    public boolean isSet(int fieldID) {
5025
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5026
    }
5027
 
5028
    @Override
5029
    public boolean equals(Object that) {
5030
      if (that == null)
5031
        return false;
553 chandransh 5032
      if (that instanceof createUser_result)
5033
        return this.equals((createUser_result)that);
48 ashish 5034
      return false;
5035
    }
5036
 
553 chandransh 5037
    public boolean equals(createUser_result that) {
48 ashish 5038
      if (that == null)
5039
        return false;
5040
 
5041
      boolean this_present_success = true && this.isSetSuccess();
5042
      boolean that_present_success = true && that.isSetSuccess();
5043
      if (this_present_success || that_present_success) {
5044
        if (!(this_present_success && that_present_success))
5045
          return false;
5046
        if (!this.success.equals(that.success))
5047
          return false;
5048
      }
5049
 
553 chandransh 5050
      boolean this_present_ucex = true && this.isSetUcex();
5051
      boolean that_present_ucex = true && that.isSetUcex();
5052
      if (this_present_ucex || that_present_ucex) {
5053
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5054
          return false;
553 chandransh 5055
        if (!this.ucex.equals(that.ucex))
48 ashish 5056
          return false;
5057
      }
5058
 
5059
      return true;
5060
    }
5061
 
5062
    @Override
5063
    public int hashCode() {
5064
      return 0;
5065
    }
5066
 
571 rajveer 5067
    public int compareTo(createUser_result other) {
5068
      if (!getClass().equals(other.getClass())) {
5069
        return getClass().getName().compareTo(other.getClass().getName());
5070
      }
5071
 
5072
      int lastComparison = 0;
5073
      createUser_result typedOther = (createUser_result)other;
5074
 
5075
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5076
      if (lastComparison != 0) {
5077
        return lastComparison;
5078
      }
5079
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5080
      if (lastComparison != 0) {
5081
        return lastComparison;
5082
      }
5083
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5084
      if (lastComparison != 0) {
5085
        return lastComparison;
5086
      }
5087
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5088
      if (lastComparison != 0) {
5089
        return lastComparison;
5090
      }
5091
      return 0;
5092
    }
5093
 
48 ashish 5094
    public void read(TProtocol iprot) throws TException {
5095
      TField field;
5096
      iprot.readStructBegin();
5097
      while (true)
5098
      {
5099
        field = iprot.readFieldBegin();
5100
        if (field.type == TType.STOP) { 
5101
          break;
5102
        }
5103
        _Fields fieldId = _Fields.findByThriftId(field.id);
5104
        if (fieldId == null) {
5105
          TProtocolUtil.skip(iprot, field.type);
5106
        } else {
5107
          switch (fieldId) {
5108
            case SUCCESS:
5109
              if (field.type == TType.STRUCT) {
553 chandransh 5110
                this.success = new User();
48 ashish 5111
                this.success.read(iprot);
5112
              } else { 
5113
                TProtocolUtil.skip(iprot, field.type);
5114
              }
5115
              break;
553 chandransh 5116
            case UCEX:
48 ashish 5117
              if (field.type == TType.STRUCT) {
553 chandransh 5118
                this.ucex = new UserContextException();
5119
                this.ucex.read(iprot);
48 ashish 5120
              } else { 
5121
                TProtocolUtil.skip(iprot, field.type);
5122
              }
5123
              break;
5124
          }
5125
          iprot.readFieldEnd();
5126
        }
5127
      }
5128
      iprot.readStructEnd();
5129
      validate();
5130
    }
5131
 
5132
    public void write(TProtocol oprot) throws TException {
5133
      oprot.writeStructBegin(STRUCT_DESC);
5134
 
5135
      if (this.isSetSuccess()) {
5136
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5137
        this.success.write(oprot);
5138
        oprot.writeFieldEnd();
553 chandransh 5139
      } else if (this.isSetUcex()) {
5140
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5141
        this.ucex.write(oprot);
48 ashish 5142
        oprot.writeFieldEnd();
5143
      }
5144
      oprot.writeFieldStop();
5145
      oprot.writeStructEnd();
5146
    }
5147
 
5148
    @Override
5149
    public String toString() {
553 chandransh 5150
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5151
      boolean first = true;
5152
 
5153
      sb.append("success:");
5154
      if (this.success == null) {
5155
        sb.append("null");
5156
      } else {
5157
        sb.append(this.success);
5158
      }
5159
      first = false;
5160
      if (!first) sb.append(", ");
553 chandransh 5161
      sb.append("ucex:");
5162
      if (this.ucex == null) {
48 ashish 5163
        sb.append("null");
5164
      } else {
553 chandransh 5165
        sb.append(this.ucex);
48 ashish 5166
      }
5167
      first = false;
5168
      sb.append(")");
5169
      return sb.toString();
5170
    }
5171
 
5172
    public void validate() throws TException {
5173
      // check for required fields
5174
    }
5175
 
5176
  }
5177
 
571 rajveer 5178
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5179
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5180
 
553 chandransh 5181
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5182
 
553 chandransh 5183
    private User user;
48 ashish 5184
 
5185
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5186
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5187
      USER((short)1, "user");
48 ashish 5188
 
5189
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5190
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5191
 
5192
      static {
5193
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5194
          byId.put((int)field._thriftId, field);
5195
          byName.put(field.getFieldName(), field);
5196
        }
5197
      }
5198
 
5199
      /**
5200
       * Find the _Fields constant that matches fieldId, or null if its not found.
5201
       */
5202
      public static _Fields findByThriftId(int fieldId) {
5203
        return byId.get(fieldId);
5204
      }
5205
 
5206
      /**
5207
       * Find the _Fields constant that matches fieldId, throwing an exception
5208
       * if it is not found.
5209
       */
5210
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5211
        _Fields fields = findByThriftId(fieldId);
5212
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5213
        return fields;
5214
      }
5215
 
5216
      /**
5217
       * Find the _Fields constant that matches name, or null if its not found.
5218
       */
5219
      public static _Fields findByName(String name) {
5220
        return byName.get(name);
5221
      }
5222
 
5223
      private final short _thriftId;
5224
      private final String _fieldName;
5225
 
5226
      _Fields(short thriftId, String fieldName) {
5227
        _thriftId = thriftId;
5228
        _fieldName = fieldName;
5229
      }
5230
 
5231
      public short getThriftFieldId() {
5232
        return _thriftId;
5233
      }
5234
 
5235
      public String getFieldName() {
5236
        return _fieldName;
5237
      }
5238
    }
5239
 
5240
    // isset id assignments
5241
 
5242
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5243
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5244
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5245
    }});
5246
 
5247
    static {
553 chandransh 5248
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5249
    }
5250
 
553 chandransh 5251
    public updateUser_args() {
48 ashish 5252
    }
5253
 
553 chandransh 5254
    public updateUser_args(
5255
      User user)
48 ashish 5256
    {
5257
      this();
553 chandransh 5258
      this.user = user;
48 ashish 5259
    }
5260
 
5261
    /**
5262
     * Performs a deep copy on <i>other</i>.
5263
     */
553 chandransh 5264
    public updateUser_args(updateUser_args other) {
5265
      if (other.isSetUser()) {
5266
        this.user = new User(other.user);
5267
      }
48 ashish 5268
    }
5269
 
553 chandransh 5270
    public updateUser_args deepCopy() {
5271
      return new updateUser_args(this);
48 ashish 5272
    }
5273
 
5274
    @Deprecated
553 chandransh 5275
    public updateUser_args clone() {
5276
      return new updateUser_args(this);
48 ashish 5277
    }
5278
 
553 chandransh 5279
    public User getUser() {
5280
      return this.user;
48 ashish 5281
    }
5282
 
553 chandransh 5283
    public updateUser_args setUser(User user) {
5284
      this.user = user;
48 ashish 5285
      return this;
5286
    }
5287
 
553 chandransh 5288
    public void unsetUser() {
5289
      this.user = null;
48 ashish 5290
    }
5291
 
553 chandransh 5292
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5293
    public boolean isSetUser() {
5294
      return this.user != null;
48 ashish 5295
    }
5296
 
553 chandransh 5297
    public void setUserIsSet(boolean value) {
5298
      if (!value) {
5299
        this.user = null;
5300
      }
48 ashish 5301
    }
5302
 
5303
    public void setFieldValue(_Fields field, Object value) {
5304
      switch (field) {
553 chandransh 5305
      case USER:
48 ashish 5306
        if (value == null) {
553 chandransh 5307
          unsetUser();
48 ashish 5308
        } else {
553 chandransh 5309
          setUser((User)value);
48 ashish 5310
        }
5311
        break;
5312
 
5313
      }
5314
    }
5315
 
5316
    public void setFieldValue(int fieldID, Object value) {
5317
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5318
    }
5319
 
5320
    public Object getFieldValue(_Fields field) {
5321
      switch (field) {
553 chandransh 5322
      case USER:
5323
        return getUser();
48 ashish 5324
 
5325
      }
5326
      throw new IllegalStateException();
5327
    }
5328
 
5329
    public Object getFieldValue(int fieldId) {
5330
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5331
    }
5332
 
5333
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5334
    public boolean isSet(_Fields field) {
5335
      switch (field) {
553 chandransh 5336
      case USER:
5337
        return isSetUser();
48 ashish 5338
      }
5339
      throw new IllegalStateException();
5340
    }
5341
 
5342
    public boolean isSet(int fieldID) {
5343
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5344
    }
5345
 
5346
    @Override
5347
    public boolean equals(Object that) {
5348
      if (that == null)
5349
        return false;
553 chandransh 5350
      if (that instanceof updateUser_args)
5351
        return this.equals((updateUser_args)that);
48 ashish 5352
      return false;
5353
    }
5354
 
553 chandransh 5355
    public boolean equals(updateUser_args that) {
48 ashish 5356
      if (that == null)
5357
        return false;
5358
 
553 chandransh 5359
      boolean this_present_user = true && this.isSetUser();
5360
      boolean that_present_user = true && that.isSetUser();
5361
      if (this_present_user || that_present_user) {
5362
        if (!(this_present_user && that_present_user))
48 ashish 5363
          return false;
553 chandransh 5364
        if (!this.user.equals(that.user))
48 ashish 5365
          return false;
5366
      }
5367
 
5368
      return true;
5369
    }
5370
 
5371
    @Override
5372
    public int hashCode() {
5373
      return 0;
5374
    }
5375
 
571 rajveer 5376
    public int compareTo(updateUser_args other) {
5377
      if (!getClass().equals(other.getClass())) {
5378
        return getClass().getName().compareTo(other.getClass().getName());
5379
      }
5380
 
5381
      int lastComparison = 0;
5382
      updateUser_args typedOther = (updateUser_args)other;
5383
 
5384
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5385
      if (lastComparison != 0) {
5386
        return lastComparison;
5387
      }
5388
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5389
      if (lastComparison != 0) {
5390
        return lastComparison;
5391
      }
5392
      return 0;
5393
    }
5394
 
48 ashish 5395
    public void read(TProtocol iprot) throws TException {
5396
      TField field;
5397
      iprot.readStructBegin();
5398
      while (true)
5399
      {
5400
        field = iprot.readFieldBegin();
5401
        if (field.type == TType.STOP) { 
5402
          break;
5403
        }
5404
        _Fields fieldId = _Fields.findByThriftId(field.id);
5405
        if (fieldId == null) {
5406
          TProtocolUtil.skip(iprot, field.type);
5407
        } else {
5408
          switch (fieldId) {
553 chandransh 5409
            case USER:
5410
              if (field.type == TType.STRUCT) {
5411
                this.user = new User();
5412
                this.user.read(iprot);
48 ashish 5413
              } else { 
5414
                TProtocolUtil.skip(iprot, field.type);
5415
              }
5416
              break;
5417
          }
5418
          iprot.readFieldEnd();
5419
        }
5420
      }
5421
      iprot.readStructEnd();
5422
      validate();
5423
    }
5424
 
5425
    public void write(TProtocol oprot) throws TException {
5426
      validate();
5427
 
5428
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5429
      if (this.user != null) {
5430
        oprot.writeFieldBegin(USER_FIELD_DESC);
5431
        this.user.write(oprot);
5432
        oprot.writeFieldEnd();
5433
      }
48 ashish 5434
      oprot.writeFieldStop();
5435
      oprot.writeStructEnd();
5436
    }
5437
 
5438
    @Override
5439
    public String toString() {
553 chandransh 5440
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5441
      boolean first = true;
5442
 
553 chandransh 5443
      sb.append("user:");
5444
      if (this.user == null) {
5445
        sb.append("null");
5446
      } else {
5447
        sb.append(this.user);
5448
      }
48 ashish 5449
      first = false;
5450
      sb.append(")");
5451
      return sb.toString();
5452
    }
5453
 
5454
    public void validate() throws TException {
5455
      // check for required fields
5456
    }
5457
 
5458
  }
5459
 
571 rajveer 5460
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5461
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5462
 
5463
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5464
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5465
 
553 chandransh 5466
    private User success;
5467
    private UserContextException ucex;
48 ashish 5468
 
5469
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5470
    public enum _Fields implements TFieldIdEnum {
5471
      SUCCESS((short)0, "success"),
553 chandransh 5472
      UCEX((short)1, "ucex");
48 ashish 5473
 
5474
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5475
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5476
 
5477
      static {
5478
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5479
          byId.put((int)field._thriftId, field);
5480
          byName.put(field.getFieldName(), field);
5481
        }
5482
      }
5483
 
5484
      /**
5485
       * Find the _Fields constant that matches fieldId, or null if its not found.
5486
       */
5487
      public static _Fields findByThriftId(int fieldId) {
5488
        return byId.get(fieldId);
5489
      }
5490
 
5491
      /**
5492
       * Find the _Fields constant that matches fieldId, throwing an exception
5493
       * if it is not found.
5494
       */
5495
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5496
        _Fields fields = findByThriftId(fieldId);
5497
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5498
        return fields;
5499
      }
5500
 
5501
      /**
5502
       * Find the _Fields constant that matches name, or null if its not found.
5503
       */
5504
      public static _Fields findByName(String name) {
5505
        return byName.get(name);
5506
      }
5507
 
5508
      private final short _thriftId;
5509
      private final String _fieldName;
5510
 
5511
      _Fields(short thriftId, String fieldName) {
5512
        _thriftId = thriftId;
5513
        _fieldName = fieldName;
5514
      }
5515
 
5516
      public short getThriftFieldId() {
5517
        return _thriftId;
5518
      }
5519
 
5520
      public String getFieldName() {
5521
        return _fieldName;
5522
      }
5523
    }
5524
 
5525
    // isset id assignments
5526
 
5527
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5528
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5529
          new StructMetaData(TType.STRUCT, User.class)));
5530
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5531
          new FieldValueMetaData(TType.STRUCT)));
5532
    }});
5533
 
5534
    static {
553 chandransh 5535
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5536
    }
5537
 
553 chandransh 5538
    public updateUser_result() {
48 ashish 5539
    }
5540
 
553 chandransh 5541
    public updateUser_result(
5542
      User success,
5543
      UserContextException ucex)
48 ashish 5544
    {
5545
      this();
5546
      this.success = success;
553 chandransh 5547
      this.ucex = ucex;
48 ashish 5548
    }
5549
 
5550
    /**
5551
     * Performs a deep copy on <i>other</i>.
5552
     */
553 chandransh 5553
    public updateUser_result(updateUser_result other) {
48 ashish 5554
      if (other.isSetSuccess()) {
553 chandransh 5555
        this.success = new User(other.success);
48 ashish 5556
      }
553 chandransh 5557
      if (other.isSetUcex()) {
5558
        this.ucex = new UserContextException(other.ucex);
48 ashish 5559
      }
5560
    }
5561
 
553 chandransh 5562
    public updateUser_result deepCopy() {
5563
      return new updateUser_result(this);
48 ashish 5564
    }
5565
 
5566
    @Deprecated
553 chandransh 5567
    public updateUser_result clone() {
5568
      return new updateUser_result(this);
48 ashish 5569
    }
5570
 
553 chandransh 5571
    public User getSuccess() {
48 ashish 5572
      return this.success;
5573
    }
5574
 
553 chandransh 5575
    public updateUser_result setSuccess(User success) {
48 ashish 5576
      this.success = success;
5577
      return this;
5578
    }
5579
 
5580
    public void unsetSuccess() {
5581
      this.success = null;
5582
    }
5583
 
5584
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5585
    public boolean isSetSuccess() {
5586
      return this.success != null;
5587
    }
5588
 
5589
    public void setSuccessIsSet(boolean value) {
5590
      if (!value) {
5591
        this.success = null;
5592
      }
5593
    }
5594
 
553 chandransh 5595
    public UserContextException getUcex() {
5596
      return this.ucex;
48 ashish 5597
    }
5598
 
553 chandransh 5599
    public updateUser_result setUcex(UserContextException ucex) {
5600
      this.ucex = ucex;
48 ashish 5601
      return this;
5602
    }
5603
 
553 chandransh 5604
    public void unsetUcex() {
5605
      this.ucex = null;
48 ashish 5606
    }
5607
 
553 chandransh 5608
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5609
    public boolean isSetUcex() {
5610
      return this.ucex != null;
48 ashish 5611
    }
5612
 
553 chandransh 5613
    public void setUcexIsSet(boolean value) {
48 ashish 5614
      if (!value) {
553 chandransh 5615
        this.ucex = null;
48 ashish 5616
      }
5617
    }
5618
 
5619
    public void setFieldValue(_Fields field, Object value) {
5620
      switch (field) {
5621
      case SUCCESS:
5622
        if (value == null) {
5623
          unsetSuccess();
5624
        } else {
553 chandransh 5625
          setSuccess((User)value);
48 ashish 5626
        }
5627
        break;
5628
 
553 chandransh 5629
      case UCEX:
48 ashish 5630
        if (value == null) {
553 chandransh 5631
          unsetUcex();
48 ashish 5632
        } else {
553 chandransh 5633
          setUcex((UserContextException)value);
48 ashish 5634
        }
5635
        break;
5636
 
5637
      }
5638
    }
5639
 
5640
    public void setFieldValue(int fieldID, Object value) {
5641
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5642
    }
5643
 
5644
    public Object getFieldValue(_Fields field) {
5645
      switch (field) {
5646
      case SUCCESS:
5647
        return getSuccess();
5648
 
553 chandransh 5649
      case UCEX:
5650
        return getUcex();
48 ashish 5651
 
5652
      }
5653
      throw new IllegalStateException();
5654
    }
5655
 
5656
    public Object getFieldValue(int fieldId) {
5657
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5658
    }
5659
 
5660
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5661
    public boolean isSet(_Fields field) {
5662
      switch (field) {
5663
      case SUCCESS:
5664
        return isSetSuccess();
553 chandransh 5665
      case UCEX:
5666
        return isSetUcex();
48 ashish 5667
      }
5668
      throw new IllegalStateException();
5669
    }
5670
 
5671
    public boolean isSet(int fieldID) {
5672
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5673
    }
5674
 
5675
    @Override
5676
    public boolean equals(Object that) {
5677
      if (that == null)
5678
        return false;
553 chandransh 5679
      if (that instanceof updateUser_result)
5680
        return this.equals((updateUser_result)that);
48 ashish 5681
      return false;
5682
    }
5683
 
553 chandransh 5684
    public boolean equals(updateUser_result that) {
48 ashish 5685
      if (that == null)
5686
        return false;
5687
 
5688
      boolean this_present_success = true && this.isSetSuccess();
5689
      boolean that_present_success = true && that.isSetSuccess();
5690
      if (this_present_success || that_present_success) {
5691
        if (!(this_present_success && that_present_success))
5692
          return false;
5693
        if (!this.success.equals(that.success))
5694
          return false;
5695
      }
5696
 
553 chandransh 5697
      boolean this_present_ucex = true && this.isSetUcex();
5698
      boolean that_present_ucex = true && that.isSetUcex();
5699
      if (this_present_ucex || that_present_ucex) {
5700
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5701
          return false;
553 chandransh 5702
        if (!this.ucex.equals(that.ucex))
48 ashish 5703
          return false;
5704
      }
5705
 
5706
      return true;
5707
    }
5708
 
5709
    @Override
5710
    public int hashCode() {
5711
      return 0;
5712
    }
5713
 
571 rajveer 5714
    public int compareTo(updateUser_result other) {
5715
      if (!getClass().equals(other.getClass())) {
5716
        return getClass().getName().compareTo(other.getClass().getName());
5717
      }
5718
 
5719
      int lastComparison = 0;
5720
      updateUser_result typedOther = (updateUser_result)other;
5721
 
5722
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5723
      if (lastComparison != 0) {
5724
        return lastComparison;
5725
      }
5726
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5727
      if (lastComparison != 0) {
5728
        return lastComparison;
5729
      }
5730
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5731
      if (lastComparison != 0) {
5732
        return lastComparison;
5733
      }
5734
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5735
      if (lastComparison != 0) {
5736
        return lastComparison;
5737
      }
5738
      return 0;
5739
    }
5740
 
48 ashish 5741
    public void read(TProtocol iprot) throws TException {
5742
      TField field;
5743
      iprot.readStructBegin();
5744
      while (true)
5745
      {
5746
        field = iprot.readFieldBegin();
5747
        if (field.type == TType.STOP) { 
5748
          break;
5749
        }
5750
        _Fields fieldId = _Fields.findByThriftId(field.id);
5751
        if (fieldId == null) {
5752
          TProtocolUtil.skip(iprot, field.type);
5753
        } else {
5754
          switch (fieldId) {
5755
            case SUCCESS:
5756
              if (field.type == TType.STRUCT) {
553 chandransh 5757
                this.success = new User();
48 ashish 5758
                this.success.read(iprot);
5759
              } else { 
5760
                TProtocolUtil.skip(iprot, field.type);
5761
              }
5762
              break;
553 chandransh 5763
            case UCEX:
48 ashish 5764
              if (field.type == TType.STRUCT) {
553 chandransh 5765
                this.ucex = new UserContextException();
5766
                this.ucex.read(iprot);
48 ashish 5767
              } else { 
5768
                TProtocolUtil.skip(iprot, field.type);
5769
              }
5770
              break;
5771
          }
5772
          iprot.readFieldEnd();
5773
        }
5774
      }
5775
      iprot.readStructEnd();
5776
      validate();
5777
    }
5778
 
5779
    public void write(TProtocol oprot) throws TException {
5780
      oprot.writeStructBegin(STRUCT_DESC);
5781
 
5782
      if (this.isSetSuccess()) {
5783
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5784
        this.success.write(oprot);
5785
        oprot.writeFieldEnd();
553 chandransh 5786
      } else if (this.isSetUcex()) {
5787
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5788
        this.ucex.write(oprot);
48 ashish 5789
        oprot.writeFieldEnd();
5790
      }
5791
      oprot.writeFieldStop();
5792
      oprot.writeStructEnd();
5793
    }
5794
 
5795
    @Override
5796
    public String toString() {
553 chandransh 5797
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5798
      boolean first = true;
5799
 
5800
      sb.append("success:");
5801
      if (this.success == null) {
5802
        sb.append("null");
5803
      } else {
5804
        sb.append(this.success);
5805
      }
5806
      first = false;
5807
      if (!first) sb.append(", ");
553 chandransh 5808
      sb.append("ucex:");
5809
      if (this.ucex == null) {
48 ashish 5810
        sb.append("null");
5811
      } else {
553 chandransh 5812
        sb.append(this.ucex);
48 ashish 5813
      }
5814
      first = false;
5815
      sb.append(")");
5816
      return sb.toString();
5817
    }
5818
 
5819
    public void validate() throws TException {
5820
      // check for required fields
5821
    }
5822
 
5823
  }
5824
 
553 chandransh 5825
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5826
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5827
 
5828
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5829
 
5830
    private long userId;
5831
 
5832
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5833
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5834
      USER_ID((short)1, "userId");
48 ashish 5835
 
5836
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5837
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5838
 
5839
      static {
5840
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5841
          byId.put((int)field._thriftId, field);
5842
          byName.put(field.getFieldName(), field);
5843
        }
5844
      }
5845
 
5846
      /**
5847
       * Find the _Fields constant that matches fieldId, or null if its not found.
5848
       */
5849
      public static _Fields findByThriftId(int fieldId) {
5850
        return byId.get(fieldId);
5851
      }
5852
 
5853
      /**
5854
       * Find the _Fields constant that matches fieldId, throwing an exception
5855
       * if it is not found.
5856
       */
5857
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5858
        _Fields fields = findByThriftId(fieldId);
5859
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5860
        return fields;
5861
      }
5862
 
5863
      /**
5864
       * Find the _Fields constant that matches name, or null if its not found.
5865
       */
5866
      public static _Fields findByName(String name) {
5867
        return byName.get(name);
5868
      }
5869
 
5870
      private final short _thriftId;
5871
      private final String _fieldName;
5872
 
5873
      _Fields(short thriftId, String fieldName) {
5874
        _thriftId = thriftId;
5875
        _fieldName = fieldName;
5876
      }
5877
 
5878
      public short getThriftFieldId() {
5879
        return _thriftId;
5880
      }
5881
 
5882
      public String getFieldName() {
5883
        return _fieldName;
5884
      }
5885
    }
5886
 
5887
    // isset id assignments
5888
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5889
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5890
 
5891
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5892
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5893
          new FieldValueMetaData(TType.I64)));
5894
    }});
5895
 
5896
    static {
553 chandransh 5897
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5898
    }
5899
 
553 chandransh 5900
    public deleteUser_args() {
48 ashish 5901
    }
5902
 
553 chandransh 5903
    public deleteUser_args(
5904
      long userId)
48 ashish 5905
    {
5906
      this();
5907
      this.userId = userId;
5908
      setUserIdIsSet(true);
5909
    }
5910
 
5911
    /**
5912
     * Performs a deep copy on <i>other</i>.
5913
     */
553 chandransh 5914
    public deleteUser_args(deleteUser_args other) {
48 ashish 5915
      __isset_bit_vector.clear();
5916
      __isset_bit_vector.or(other.__isset_bit_vector);
5917
      this.userId = other.userId;
5918
    }
5919
 
553 chandransh 5920
    public deleteUser_args deepCopy() {
5921
      return new deleteUser_args(this);
48 ashish 5922
    }
5923
 
5924
    @Deprecated
553 chandransh 5925
    public deleteUser_args clone() {
5926
      return new deleteUser_args(this);
48 ashish 5927
    }
5928
 
5929
    public long getUserId() {
5930
      return this.userId;
5931
    }
5932
 
553 chandransh 5933
    public deleteUser_args setUserId(long userId) {
48 ashish 5934
      this.userId = userId;
5935
      setUserIdIsSet(true);
5936
      return this;
5937
    }
5938
 
5939
    public void unsetUserId() {
5940
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5941
    }
5942
 
5943
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5944
    public boolean isSetUserId() {
5945
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5946
    }
5947
 
5948
    public void setUserIdIsSet(boolean value) {
5949
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5950
    }
5951
 
5952
    public void setFieldValue(_Fields field, Object value) {
5953
      switch (field) {
5954
      case USER_ID:
5955
        if (value == null) {
5956
          unsetUserId();
5957
        } else {
5958
          setUserId((Long)value);
5959
        }
5960
        break;
5961
 
5962
      }
5963
    }
5964
 
5965
    public void setFieldValue(int fieldID, Object value) {
5966
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5967
    }
5968
 
5969
    public Object getFieldValue(_Fields field) {
5970
      switch (field) {
5971
      case USER_ID:
5972
        return new Long(getUserId());
5973
 
5974
      }
5975
      throw new IllegalStateException();
5976
    }
5977
 
5978
    public Object getFieldValue(int fieldId) {
5979
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5980
    }
5981
 
5982
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5983
    public boolean isSet(_Fields field) {
5984
      switch (field) {
5985
      case USER_ID:
5986
        return isSetUserId();
5987
      }
5988
      throw new IllegalStateException();
5989
    }
5990
 
5991
    public boolean isSet(int fieldID) {
5992
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5993
    }
5994
 
5995
    @Override
5996
    public boolean equals(Object that) {
5997
      if (that == null)
5998
        return false;
553 chandransh 5999
      if (that instanceof deleteUser_args)
6000
        return this.equals((deleteUser_args)that);
48 ashish 6001
      return false;
6002
    }
6003
 
553 chandransh 6004
    public boolean equals(deleteUser_args that) {
48 ashish 6005
      if (that == null)
6006
        return false;
6007
 
6008
      boolean this_present_userId = true;
6009
      boolean that_present_userId = true;
6010
      if (this_present_userId || that_present_userId) {
6011
        if (!(this_present_userId && that_present_userId))
6012
          return false;
6013
        if (this.userId != that.userId)
6014
          return false;
6015
      }
6016
 
6017
      return true;
6018
    }
6019
 
6020
    @Override
6021
    public int hashCode() {
6022
      return 0;
6023
    }
6024
 
553 chandransh 6025
    public int compareTo(deleteUser_args other) {
48 ashish 6026
      if (!getClass().equals(other.getClass())) {
6027
        return getClass().getName().compareTo(other.getClass().getName());
6028
      }
6029
 
6030
      int lastComparison = 0;
553 chandransh 6031
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6032
 
6033
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6034
      if (lastComparison != 0) {
6035
        return lastComparison;
6036
      }
6037
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6038
      if (lastComparison != 0) {
6039
        return lastComparison;
6040
      }
6041
      return 0;
6042
    }
6043
 
6044
    public void read(TProtocol iprot) throws TException {
6045
      TField field;
6046
      iprot.readStructBegin();
6047
      while (true)
6048
      {
6049
        field = iprot.readFieldBegin();
6050
        if (field.type == TType.STOP) { 
6051
          break;
6052
        }
6053
        _Fields fieldId = _Fields.findByThriftId(field.id);
6054
        if (fieldId == null) {
6055
          TProtocolUtil.skip(iprot, field.type);
6056
        } else {
6057
          switch (fieldId) {
6058
            case USER_ID:
6059
              if (field.type == TType.I64) {
6060
                this.userId = iprot.readI64();
6061
                setUserIdIsSet(true);
6062
              } else { 
6063
                TProtocolUtil.skip(iprot, field.type);
6064
              }
6065
              break;
6066
          }
6067
          iprot.readFieldEnd();
6068
        }
6069
      }
6070
      iprot.readStructEnd();
6071
      validate();
6072
    }
6073
 
6074
    public void write(TProtocol oprot) throws TException {
6075
      validate();
6076
 
6077
      oprot.writeStructBegin(STRUCT_DESC);
6078
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6079
      oprot.writeI64(this.userId);
6080
      oprot.writeFieldEnd();
6081
      oprot.writeFieldStop();
6082
      oprot.writeStructEnd();
6083
    }
6084
 
6085
    @Override
6086
    public String toString() {
553 chandransh 6087
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6088
      boolean first = true;
6089
 
6090
      sb.append("userId:");
6091
      sb.append(this.userId);
6092
      first = false;
6093
      sb.append(")");
6094
      return sb.toString();
6095
    }
6096
 
6097
    public void validate() throws TException {
6098
      // check for required fields
6099
    }
6100
 
6101
  }
6102
 
553 chandransh 6103
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6104
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6105
 
553 chandransh 6106
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6107
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6108
 
553 chandransh 6109
    private boolean success;
6110
    private UserContextException ucex;
48 ashish 6111
 
6112
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6113
    public enum _Fields implements TFieldIdEnum {
6114
      SUCCESS((short)0, "success"),
553 chandransh 6115
      UCEX((short)1, "ucex");
48 ashish 6116
 
6117
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6118
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6119
 
6120
      static {
6121
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6122
          byId.put((int)field._thriftId, field);
6123
          byName.put(field.getFieldName(), field);
6124
        }
6125
      }
6126
 
6127
      /**
6128
       * Find the _Fields constant that matches fieldId, or null if its not found.
6129
       */
6130
      public static _Fields findByThriftId(int fieldId) {
6131
        return byId.get(fieldId);
6132
      }
6133
 
6134
      /**
6135
       * Find the _Fields constant that matches fieldId, throwing an exception
6136
       * if it is not found.
6137
       */
6138
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6139
        _Fields fields = findByThriftId(fieldId);
6140
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6141
        return fields;
6142
      }
6143
 
6144
      /**
6145
       * Find the _Fields constant that matches name, or null if its not found.
6146
       */
6147
      public static _Fields findByName(String name) {
6148
        return byName.get(name);
6149
      }
6150
 
6151
      private final short _thriftId;
6152
      private final String _fieldName;
6153
 
6154
      _Fields(short thriftId, String fieldName) {
6155
        _thriftId = thriftId;
6156
        _fieldName = fieldName;
6157
      }
6158
 
6159
      public short getThriftFieldId() {
6160
        return _thriftId;
6161
      }
6162
 
6163
      public String getFieldName() {
6164
        return _fieldName;
6165
      }
6166
    }
6167
 
6168
    // isset id assignments
553 chandransh 6169
    private static final int __SUCCESS_ISSET_ID = 0;
6170
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6171
 
6172
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6173
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6174
          new FieldValueMetaData(TType.BOOL)));
6175
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6176
          new FieldValueMetaData(TType.STRUCT)));
6177
    }});
6178
 
6179
    static {
553 chandransh 6180
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6181
    }
6182
 
553 chandransh 6183
    public deleteUser_result() {
48 ashish 6184
    }
6185
 
553 chandransh 6186
    public deleteUser_result(
6187
      boolean success,
6188
      UserContextException ucex)
48 ashish 6189
    {
6190
      this();
6191
      this.success = success;
553 chandransh 6192
      setSuccessIsSet(true);
6193
      this.ucex = ucex;
48 ashish 6194
    }
6195
 
6196
    /**
6197
     * Performs a deep copy on <i>other</i>.
6198
     */
553 chandransh 6199
    public deleteUser_result(deleteUser_result other) {
6200
      __isset_bit_vector.clear();
6201
      __isset_bit_vector.or(other.__isset_bit_vector);
6202
      this.success = other.success;
6203
      if (other.isSetUcex()) {
6204
        this.ucex = new UserContextException(other.ucex);
48 ashish 6205
      }
6206
    }
6207
 
553 chandransh 6208
    public deleteUser_result deepCopy() {
6209
      return new deleteUser_result(this);
48 ashish 6210
    }
6211
 
6212
    @Deprecated
553 chandransh 6213
    public deleteUser_result clone() {
6214
      return new deleteUser_result(this);
48 ashish 6215
    }
6216
 
553 chandransh 6217
    public boolean isSuccess() {
48 ashish 6218
      return this.success;
6219
    }
6220
 
553 chandransh 6221
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6222
      this.success = success;
553 chandransh 6223
      setSuccessIsSet(true);
48 ashish 6224
      return this;
6225
    }
6226
 
6227
    public void unsetSuccess() {
553 chandransh 6228
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6229
    }
6230
 
6231
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6232
    public boolean isSetSuccess() {
553 chandransh 6233
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6234
    }
6235
 
6236
    public void setSuccessIsSet(boolean value) {
553 chandransh 6237
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6238
    }
6239
 
553 chandransh 6240
    public UserContextException getUcex() {
6241
      return this.ucex;
48 ashish 6242
    }
6243
 
553 chandransh 6244
    public deleteUser_result setUcex(UserContextException ucex) {
6245
      this.ucex = ucex;
48 ashish 6246
      return this;
6247
    }
6248
 
553 chandransh 6249
    public void unsetUcex() {
6250
      this.ucex = null;
48 ashish 6251
    }
6252
 
553 chandransh 6253
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6254
    public boolean isSetUcex() {
6255
      return this.ucex != null;
48 ashish 6256
    }
6257
 
553 chandransh 6258
    public void setUcexIsSet(boolean value) {
48 ashish 6259
      if (!value) {
553 chandransh 6260
        this.ucex = null;
48 ashish 6261
      }
6262
    }
6263
 
6264
    public void setFieldValue(_Fields field, Object value) {
6265
      switch (field) {
6266
      case SUCCESS:
6267
        if (value == null) {
6268
          unsetSuccess();
6269
        } else {
553 chandransh 6270
          setSuccess((Boolean)value);
48 ashish 6271
        }
6272
        break;
6273
 
553 chandransh 6274
      case UCEX:
48 ashish 6275
        if (value == null) {
553 chandransh 6276
          unsetUcex();
48 ashish 6277
        } else {
553 chandransh 6278
          setUcex((UserContextException)value);
48 ashish 6279
        }
6280
        break;
6281
 
6282
      }
6283
    }
6284
 
6285
    public void setFieldValue(int fieldID, Object value) {
6286
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6287
    }
6288
 
6289
    public Object getFieldValue(_Fields field) {
6290
      switch (field) {
6291
      case SUCCESS:
553 chandransh 6292
        return new Boolean(isSuccess());
48 ashish 6293
 
553 chandransh 6294
      case UCEX:
6295
        return getUcex();
48 ashish 6296
 
6297
      }
6298
      throw new IllegalStateException();
6299
    }
6300
 
6301
    public Object getFieldValue(int fieldId) {
6302
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6303
    }
6304
 
6305
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6306
    public boolean isSet(_Fields field) {
6307
      switch (field) {
6308
      case SUCCESS:
6309
        return isSetSuccess();
553 chandransh 6310
      case UCEX:
6311
        return isSetUcex();
48 ashish 6312
      }
6313
      throw new IllegalStateException();
6314
    }
6315
 
6316
    public boolean isSet(int fieldID) {
6317
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6318
    }
6319
 
6320
    @Override
6321
    public boolean equals(Object that) {
6322
      if (that == null)
6323
        return false;
553 chandransh 6324
      if (that instanceof deleteUser_result)
6325
        return this.equals((deleteUser_result)that);
48 ashish 6326
      return false;
6327
    }
6328
 
553 chandransh 6329
    public boolean equals(deleteUser_result that) {
48 ashish 6330
      if (that == null)
6331
        return false;
6332
 
553 chandransh 6333
      boolean this_present_success = true;
6334
      boolean that_present_success = true;
48 ashish 6335
      if (this_present_success || that_present_success) {
6336
        if (!(this_present_success && that_present_success))
6337
          return false;
553 chandransh 6338
        if (this.success != that.success)
48 ashish 6339
          return false;
6340
      }
6341
 
553 chandransh 6342
      boolean this_present_ucex = true && this.isSetUcex();
6343
      boolean that_present_ucex = true && that.isSetUcex();
6344
      if (this_present_ucex || that_present_ucex) {
6345
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6346
          return false;
553 chandransh 6347
        if (!this.ucex.equals(that.ucex))
48 ashish 6348
          return false;
6349
      }
6350
 
6351
      return true;
6352
    }
6353
 
6354
    @Override
6355
    public int hashCode() {
6356
      return 0;
6357
    }
6358
 
553 chandransh 6359
    public int compareTo(deleteUser_result other) {
6360
      if (!getClass().equals(other.getClass())) {
6361
        return getClass().getName().compareTo(other.getClass().getName());
6362
      }
6363
 
6364
      int lastComparison = 0;
6365
      deleteUser_result typedOther = (deleteUser_result)other;
6366
 
6367
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6368
      if (lastComparison != 0) {
6369
        return lastComparison;
6370
      }
6371
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6372
      if (lastComparison != 0) {
6373
        return lastComparison;
6374
      }
6375
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6376
      if (lastComparison != 0) {
6377
        return lastComparison;
6378
      }
6379
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6380
      if (lastComparison != 0) {
6381
        return lastComparison;
6382
      }
6383
      return 0;
6384
    }
6385
 
48 ashish 6386
    public void read(TProtocol iprot) throws TException {
6387
      TField field;
6388
      iprot.readStructBegin();
6389
      while (true)
6390
      {
6391
        field = iprot.readFieldBegin();
6392
        if (field.type == TType.STOP) { 
6393
          break;
6394
        }
6395
        _Fields fieldId = _Fields.findByThriftId(field.id);
6396
        if (fieldId == null) {
6397
          TProtocolUtil.skip(iprot, field.type);
6398
        } else {
6399
          switch (fieldId) {
6400
            case SUCCESS:
553 chandransh 6401
              if (field.type == TType.BOOL) {
6402
                this.success = iprot.readBool();
6403
                setSuccessIsSet(true);
48 ashish 6404
              } else { 
6405
                TProtocolUtil.skip(iprot, field.type);
6406
              }
6407
              break;
553 chandransh 6408
            case UCEX:
48 ashish 6409
              if (field.type == TType.STRUCT) {
553 chandransh 6410
                this.ucex = new UserContextException();
6411
                this.ucex.read(iprot);
48 ashish 6412
              } else { 
6413
                TProtocolUtil.skip(iprot, field.type);
6414
              }
6415
              break;
6416
          }
6417
          iprot.readFieldEnd();
6418
        }
6419
      }
6420
      iprot.readStructEnd();
6421
      validate();
6422
    }
6423
 
6424
    public void write(TProtocol oprot) throws TException {
6425
      oprot.writeStructBegin(STRUCT_DESC);
6426
 
6427
      if (this.isSetSuccess()) {
6428
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6429
        oprot.writeBool(this.success);
48 ashish 6430
        oprot.writeFieldEnd();
553 chandransh 6431
      } else if (this.isSetUcex()) {
6432
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6433
        this.ucex.write(oprot);
48 ashish 6434
        oprot.writeFieldEnd();
6435
      }
6436
      oprot.writeFieldStop();
6437
      oprot.writeStructEnd();
6438
    }
6439
 
6440
    @Override
6441
    public String toString() {
553 chandransh 6442
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6443
      boolean first = true;
6444
 
6445
      sb.append("success:");
553 chandransh 6446
      sb.append(this.success);
48 ashish 6447
      first = false;
6448
      if (!first) sb.append(", ");
553 chandransh 6449
      sb.append("ucex:");
6450
      if (this.ucex == null) {
48 ashish 6451
        sb.append("null");
6452
      } else {
553 chandransh 6453
        sb.append(this.ucex);
48 ashish 6454
      }
6455
      first = false;
6456
      sb.append(")");
6457
      return sb.toString();
6458
    }
6459
 
6460
    public void validate() throws TException {
6461
      // check for required fields
6462
    }
6463
 
6464
  }
6465
 
553 chandransh 6466
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6467
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6468
 
6469
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6470
 
6471
    private long userId;
6472
 
6473
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6474
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6475
      USER_ID((short)1, "userId");
48 ashish 6476
 
6477
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6478
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6479
 
6480
      static {
6481
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6482
          byId.put((int)field._thriftId, field);
6483
          byName.put(field.getFieldName(), field);
6484
        }
6485
      }
6486
 
6487
      /**
6488
       * Find the _Fields constant that matches fieldId, or null if its not found.
6489
       */
6490
      public static _Fields findByThriftId(int fieldId) {
6491
        return byId.get(fieldId);
6492
      }
6493
 
6494
      /**
6495
       * Find the _Fields constant that matches fieldId, throwing an exception
6496
       * if it is not found.
6497
       */
6498
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6499
        _Fields fields = findByThriftId(fieldId);
6500
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6501
        return fields;
6502
      }
6503
 
6504
      /**
6505
       * Find the _Fields constant that matches name, or null if its not found.
6506
       */
6507
      public static _Fields findByName(String name) {
6508
        return byName.get(name);
6509
      }
6510
 
6511
      private final short _thriftId;
6512
      private final String _fieldName;
6513
 
6514
      _Fields(short thriftId, String fieldName) {
6515
        _thriftId = thriftId;
6516
        _fieldName = fieldName;
6517
      }
6518
 
6519
      public short getThriftFieldId() {
6520
        return _thriftId;
6521
      }
6522
 
6523
      public String getFieldName() {
6524
        return _fieldName;
6525
      }
6526
    }
6527
 
6528
    // isset id assignments
6529
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6530
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6531
 
6532
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6533
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6534
          new FieldValueMetaData(TType.I64)));
6535
    }});
6536
 
6537
    static {
553 chandransh 6538
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6539
    }
6540
 
553 chandransh 6541
    public getUserState_args() {
48 ashish 6542
    }
6543
 
553 chandransh 6544
    public getUserState_args(
6545
      long userId)
48 ashish 6546
    {
6547
      this();
6548
      this.userId = userId;
6549
      setUserIdIsSet(true);
6550
    }
6551
 
6552
    /**
6553
     * Performs a deep copy on <i>other</i>.
6554
     */
553 chandransh 6555
    public getUserState_args(getUserState_args other) {
48 ashish 6556
      __isset_bit_vector.clear();
6557
      __isset_bit_vector.or(other.__isset_bit_vector);
6558
      this.userId = other.userId;
6559
    }
6560
 
553 chandransh 6561
    public getUserState_args deepCopy() {
6562
      return new getUserState_args(this);
48 ashish 6563
    }
6564
 
6565
    @Deprecated
553 chandransh 6566
    public getUserState_args clone() {
6567
      return new getUserState_args(this);
48 ashish 6568
    }
6569
 
6570
    public long getUserId() {
6571
      return this.userId;
6572
    }
6573
 
553 chandransh 6574
    public getUserState_args setUserId(long userId) {
48 ashish 6575
      this.userId = userId;
6576
      setUserIdIsSet(true);
6577
      return this;
6578
    }
6579
 
6580
    public void unsetUserId() {
6581
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6582
    }
6583
 
6584
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6585
    public boolean isSetUserId() {
6586
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6587
    }
6588
 
6589
    public void setUserIdIsSet(boolean value) {
6590
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6591
    }
6592
 
6593
    public void setFieldValue(_Fields field, Object value) {
6594
      switch (field) {
6595
      case USER_ID:
6596
        if (value == null) {
6597
          unsetUserId();
6598
        } else {
6599
          setUserId((Long)value);
6600
        }
6601
        break;
6602
 
6603
      }
6604
    }
6605
 
6606
    public void setFieldValue(int fieldID, Object value) {
6607
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6608
    }
6609
 
6610
    public Object getFieldValue(_Fields field) {
6611
      switch (field) {
6612
      case USER_ID:
6613
        return new Long(getUserId());
6614
 
6615
      }
6616
      throw new IllegalStateException();
6617
    }
6618
 
6619
    public Object getFieldValue(int fieldId) {
6620
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6621
    }
6622
 
6623
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6624
    public boolean isSet(_Fields field) {
6625
      switch (field) {
6626
      case USER_ID:
6627
        return isSetUserId();
6628
      }
6629
      throw new IllegalStateException();
6630
    }
6631
 
6632
    public boolean isSet(int fieldID) {
6633
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6634
    }
6635
 
6636
    @Override
6637
    public boolean equals(Object that) {
6638
      if (that == null)
6639
        return false;
553 chandransh 6640
      if (that instanceof getUserState_args)
6641
        return this.equals((getUserState_args)that);
48 ashish 6642
      return false;
6643
    }
6644
 
553 chandransh 6645
    public boolean equals(getUserState_args that) {
48 ashish 6646
      if (that == null)
6647
        return false;
6648
 
6649
      boolean this_present_userId = true;
6650
      boolean that_present_userId = true;
6651
      if (this_present_userId || that_present_userId) {
6652
        if (!(this_present_userId && that_present_userId))
6653
          return false;
6654
        if (this.userId != that.userId)
6655
          return false;
6656
      }
6657
 
6658
      return true;
6659
    }
6660
 
6661
    @Override
6662
    public int hashCode() {
6663
      return 0;
6664
    }
6665
 
553 chandransh 6666
    public int compareTo(getUserState_args other) {
48 ashish 6667
      if (!getClass().equals(other.getClass())) {
6668
        return getClass().getName().compareTo(other.getClass().getName());
6669
      }
6670
 
6671
      int lastComparison = 0;
553 chandransh 6672
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6673
 
6674
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6675
      if (lastComparison != 0) {
6676
        return lastComparison;
6677
      }
6678
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6679
      if (lastComparison != 0) {
6680
        return lastComparison;
6681
      }
6682
      return 0;
6683
    }
6684
 
6685
    public void read(TProtocol iprot) throws TException {
6686
      TField field;
6687
      iprot.readStructBegin();
6688
      while (true)
6689
      {
6690
        field = iprot.readFieldBegin();
6691
        if (field.type == TType.STOP) { 
6692
          break;
6693
        }
6694
        _Fields fieldId = _Fields.findByThriftId(field.id);
6695
        if (fieldId == null) {
6696
          TProtocolUtil.skip(iprot, field.type);
6697
        } else {
6698
          switch (fieldId) {
6699
            case USER_ID:
6700
              if (field.type == TType.I64) {
6701
                this.userId = iprot.readI64();
6702
                setUserIdIsSet(true);
6703
              } else { 
6704
                TProtocolUtil.skip(iprot, field.type);
6705
              }
6706
              break;
6707
          }
6708
          iprot.readFieldEnd();
6709
        }
6710
      }
6711
      iprot.readStructEnd();
6712
      validate();
6713
    }
6714
 
6715
    public void write(TProtocol oprot) throws TException {
6716
      validate();
6717
 
6718
      oprot.writeStructBegin(STRUCT_DESC);
6719
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6720
      oprot.writeI64(this.userId);
6721
      oprot.writeFieldEnd();
6722
      oprot.writeFieldStop();
6723
      oprot.writeStructEnd();
6724
    }
6725
 
6726
    @Override
6727
    public String toString() {
553 chandransh 6728
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6729
      boolean first = true;
6730
 
6731
      sb.append("userId:");
6732
      sb.append(this.userId);
6733
      first = false;
6734
      sb.append(")");
6735
      return sb.toString();
6736
    }
6737
 
6738
    public void validate() throws TException {
6739
      // check for required fields
6740
    }
6741
 
6742
  }
6743
 
553 chandransh 6744
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6745
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6746
 
6747
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6748
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6749
 
553 chandransh 6750
    private UserState success;
6751
    private UserContextException ucex;
48 ashish 6752
 
6753
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6754
    public enum _Fields implements TFieldIdEnum {
6755
      SUCCESS((short)0, "success"),
553 chandransh 6756
      UCEX((short)1, "ucex");
48 ashish 6757
 
6758
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6759
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6760
 
6761
      static {
6762
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6763
          byId.put((int)field._thriftId, field);
6764
          byName.put(field.getFieldName(), field);
6765
        }
6766
      }
6767
 
6768
      /**
6769
       * Find the _Fields constant that matches fieldId, or null if its not found.
6770
       */
6771
      public static _Fields findByThriftId(int fieldId) {
6772
        return byId.get(fieldId);
6773
      }
6774
 
6775
      /**
6776
       * Find the _Fields constant that matches fieldId, throwing an exception
6777
       * if it is not found.
6778
       */
6779
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6780
        _Fields fields = findByThriftId(fieldId);
6781
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6782
        return fields;
6783
      }
6784
 
6785
      /**
6786
       * Find the _Fields constant that matches name, or null if its not found.
6787
       */
6788
      public static _Fields findByName(String name) {
6789
        return byName.get(name);
6790
      }
6791
 
6792
      private final short _thriftId;
6793
      private final String _fieldName;
6794
 
6795
      _Fields(short thriftId, String fieldName) {
6796
        _thriftId = thriftId;
6797
        _fieldName = fieldName;
6798
      }
6799
 
6800
      public short getThriftFieldId() {
6801
        return _thriftId;
6802
      }
6803
 
6804
      public String getFieldName() {
6805
        return _fieldName;
6806
      }
6807
    }
6808
 
6809
    // isset id assignments
6810
 
6811
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6812
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6813
          new StructMetaData(TType.STRUCT, UserState.class)));
6814
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6815
          new FieldValueMetaData(TType.STRUCT)));
6816
    }});
6817
 
6818
    static {
553 chandransh 6819
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6820
    }
6821
 
553 chandransh 6822
    public getUserState_result() {
48 ashish 6823
    }
6824
 
553 chandransh 6825
    public getUserState_result(
6826
      UserState success,
6827
      UserContextException ucex)
48 ashish 6828
    {
6829
      this();
6830
      this.success = success;
553 chandransh 6831
      this.ucex = ucex;
48 ashish 6832
    }
6833
 
6834
    /**
6835
     * Performs a deep copy on <i>other</i>.
6836
     */
553 chandransh 6837
    public getUserState_result(getUserState_result other) {
48 ashish 6838
      if (other.isSetSuccess()) {
553 chandransh 6839
        this.success = new UserState(other.success);
48 ashish 6840
      }
553 chandransh 6841
      if (other.isSetUcex()) {
6842
        this.ucex = new UserContextException(other.ucex);
48 ashish 6843
      }
6844
    }
6845
 
553 chandransh 6846
    public getUserState_result deepCopy() {
6847
      return new getUserState_result(this);
48 ashish 6848
    }
6849
 
6850
    @Deprecated
553 chandransh 6851
    public getUserState_result clone() {
6852
      return new getUserState_result(this);
48 ashish 6853
    }
6854
 
553 chandransh 6855
    public UserState getSuccess() {
48 ashish 6856
      return this.success;
6857
    }
6858
 
553 chandransh 6859
    public getUserState_result setSuccess(UserState success) {
48 ashish 6860
      this.success = success;
6861
      return this;
6862
    }
6863
 
6864
    public void unsetSuccess() {
6865
      this.success = null;
6866
    }
6867
 
6868
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6869
    public boolean isSetSuccess() {
6870
      return this.success != null;
6871
    }
6872
 
6873
    public void setSuccessIsSet(boolean value) {
6874
      if (!value) {
6875
        this.success = null;
6876
      }
6877
    }
6878
 
553 chandransh 6879
    public UserContextException getUcex() {
6880
      return this.ucex;
48 ashish 6881
    }
6882
 
553 chandransh 6883
    public getUserState_result setUcex(UserContextException ucex) {
6884
      this.ucex = ucex;
48 ashish 6885
      return this;
6886
    }
6887
 
553 chandransh 6888
    public void unsetUcex() {
6889
      this.ucex = null;
48 ashish 6890
    }
6891
 
553 chandransh 6892
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6893
    public boolean isSetUcex() {
6894
      return this.ucex != null;
48 ashish 6895
    }
6896
 
553 chandransh 6897
    public void setUcexIsSet(boolean value) {
48 ashish 6898
      if (!value) {
553 chandransh 6899
        this.ucex = null;
48 ashish 6900
      }
6901
    }
6902
 
6903
    public void setFieldValue(_Fields field, Object value) {
6904
      switch (field) {
6905
      case SUCCESS:
6906
        if (value == null) {
6907
          unsetSuccess();
6908
        } else {
553 chandransh 6909
          setSuccess((UserState)value);
48 ashish 6910
        }
6911
        break;
6912
 
553 chandransh 6913
      case UCEX:
48 ashish 6914
        if (value == null) {
553 chandransh 6915
          unsetUcex();
48 ashish 6916
        } else {
553 chandransh 6917
          setUcex((UserContextException)value);
48 ashish 6918
        }
6919
        break;
6920
 
6921
      }
6922
    }
6923
 
6924
    public void setFieldValue(int fieldID, Object value) {
6925
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6926
    }
6927
 
6928
    public Object getFieldValue(_Fields field) {
6929
      switch (field) {
6930
      case SUCCESS:
6931
        return getSuccess();
6932
 
553 chandransh 6933
      case UCEX:
6934
        return getUcex();
48 ashish 6935
 
6936
      }
6937
      throw new IllegalStateException();
6938
    }
6939
 
6940
    public Object getFieldValue(int fieldId) {
6941
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6942
    }
6943
 
6944
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6945
    public boolean isSet(_Fields field) {
6946
      switch (field) {
6947
      case SUCCESS:
6948
        return isSetSuccess();
553 chandransh 6949
      case UCEX:
6950
        return isSetUcex();
48 ashish 6951
      }
6952
      throw new IllegalStateException();
6953
    }
6954
 
6955
    public boolean isSet(int fieldID) {
6956
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6957
    }
6958
 
6959
    @Override
6960
    public boolean equals(Object that) {
6961
      if (that == null)
6962
        return false;
553 chandransh 6963
      if (that instanceof getUserState_result)
6964
        return this.equals((getUserState_result)that);
48 ashish 6965
      return false;
6966
    }
6967
 
553 chandransh 6968
    public boolean equals(getUserState_result that) {
48 ashish 6969
      if (that == null)
6970
        return false;
6971
 
6972
      boolean this_present_success = true && this.isSetSuccess();
6973
      boolean that_present_success = true && that.isSetSuccess();
6974
      if (this_present_success || that_present_success) {
6975
        if (!(this_present_success && that_present_success))
6976
          return false;
6977
        if (!this.success.equals(that.success))
6978
          return false;
6979
      }
6980
 
553 chandransh 6981
      boolean this_present_ucex = true && this.isSetUcex();
6982
      boolean that_present_ucex = true && that.isSetUcex();
6983
      if (this_present_ucex || that_present_ucex) {
6984
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6985
          return false;
553 chandransh 6986
        if (!this.ucex.equals(that.ucex))
48 ashish 6987
          return false;
6988
      }
6989
 
6990
      return true;
6991
    }
6992
 
6993
    @Override
6994
    public int hashCode() {
6995
      return 0;
6996
    }
6997
 
553 chandransh 6998
    public int compareTo(getUserState_result other) {
48 ashish 6999
      if (!getClass().equals(other.getClass())) {
7000
        return getClass().getName().compareTo(other.getClass().getName());
7001
      }
7002
 
7003
      int lastComparison = 0;
553 chandransh 7004
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 7005
 
7006
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7007
      if (lastComparison != 0) {
7008
        return lastComparison;
7009
      }
7010
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7011
      if (lastComparison != 0) {
7012
        return lastComparison;
7013
      }
553 chandransh 7014
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 7015
      if (lastComparison != 0) {
7016
        return lastComparison;
7017
      }
553 chandransh 7018
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 7019
      if (lastComparison != 0) {
7020
        return lastComparison;
7021
      }
7022
      return 0;
7023
    }
7024
 
7025
    public void read(TProtocol iprot) throws TException {
7026
      TField field;
7027
      iprot.readStructBegin();
7028
      while (true)
7029
      {
7030
        field = iprot.readFieldBegin();
7031
        if (field.type == TType.STOP) { 
7032
          break;
7033
        }
7034
        _Fields fieldId = _Fields.findByThriftId(field.id);
7035
        if (fieldId == null) {
7036
          TProtocolUtil.skip(iprot, field.type);
7037
        } else {
7038
          switch (fieldId) {
7039
            case SUCCESS:
7040
              if (field.type == TType.STRUCT) {
553 chandransh 7041
                this.success = new UserState();
48 ashish 7042
                this.success.read(iprot);
7043
              } else { 
7044
                TProtocolUtil.skip(iprot, field.type);
7045
              }
7046
              break;
553 chandransh 7047
            case UCEX:
48 ashish 7048
              if (field.type == TType.STRUCT) {
553 chandransh 7049
                this.ucex = new UserContextException();
7050
                this.ucex.read(iprot);
48 ashish 7051
              } else { 
7052
                TProtocolUtil.skip(iprot, field.type);
7053
              }
7054
              break;
7055
          }
7056
          iprot.readFieldEnd();
7057
        }
7058
      }
7059
      iprot.readStructEnd();
7060
      validate();
7061
    }
7062
 
7063
    public void write(TProtocol oprot) throws TException {
7064
      oprot.writeStructBegin(STRUCT_DESC);
7065
 
7066
      if (this.isSetSuccess()) {
7067
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7068
        this.success.write(oprot);
7069
        oprot.writeFieldEnd();
553 chandransh 7070
      } else if (this.isSetUcex()) {
7071
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7072
        this.ucex.write(oprot);
48 ashish 7073
        oprot.writeFieldEnd();
7074
      }
7075
      oprot.writeFieldStop();
7076
      oprot.writeStructEnd();
7077
    }
7078
 
7079
    @Override
7080
    public String toString() {
553 chandransh 7081
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7082
      boolean first = true;
7083
 
7084
      sb.append("success:");
7085
      if (this.success == null) {
7086
        sb.append("null");
7087
      } else {
7088
        sb.append(this.success);
7089
      }
7090
      first = false;
7091
      if (!first) sb.append(", ");
553 chandransh 7092
      sb.append("ucex:");
7093
      if (this.ucex == null) {
48 ashish 7094
        sb.append("null");
7095
      } else {
553 chandransh 7096
        sb.append(this.ucex);
48 ashish 7097
      }
7098
      first = false;
7099
      sb.append(")");
7100
      return sb.toString();
7101
    }
7102
 
7103
    public void validate() throws TException {
7104
      // check for required fields
7105
    }
7106
 
7107
  }
7108
 
553 chandransh 7109
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7110
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7111
 
7112
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7113
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7114
 
7115
    private String email;
7116
    private String password;
7117
 
7118
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7119
    public enum _Fields implements TFieldIdEnum {
7120
      EMAIL((short)1, "email"),
7121
      PASSWORD((short)2, "password");
7122
 
7123
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7124
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7125
 
7126
      static {
7127
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7128
          byId.put((int)field._thriftId, field);
7129
          byName.put(field.getFieldName(), field);
7130
        }
7131
      }
7132
 
7133
      /**
7134
       * Find the _Fields constant that matches fieldId, or null if its not found.
7135
       */
7136
      public static _Fields findByThriftId(int fieldId) {
7137
        return byId.get(fieldId);
7138
      }
7139
 
7140
      /**
7141
       * Find the _Fields constant that matches fieldId, throwing an exception
7142
       * if it is not found.
7143
       */
7144
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7145
        _Fields fields = findByThriftId(fieldId);
7146
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7147
        return fields;
7148
      }
7149
 
7150
      /**
7151
       * Find the _Fields constant that matches name, or null if its not found.
7152
       */
7153
      public static _Fields findByName(String name) {
7154
        return byName.get(name);
7155
      }
7156
 
7157
      private final short _thriftId;
7158
      private final String _fieldName;
7159
 
7160
      _Fields(short thriftId, String fieldName) {
7161
        _thriftId = thriftId;
7162
        _fieldName = fieldName;
7163
      }
7164
 
7165
      public short getThriftFieldId() {
7166
        return _thriftId;
7167
      }
7168
 
7169
      public String getFieldName() {
7170
        return _fieldName;
7171
      }
7172
    }
7173
 
7174
    // isset id assignments
7175
 
7176
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7177
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7178
          new FieldValueMetaData(TType.STRING)));
7179
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7180
          new FieldValueMetaData(TType.STRING)));
7181
    }});
7182
 
7183
    static {
553 chandransh 7184
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7185
    }
7186
 
553 chandransh 7187
    public authenticateUser_args() {
48 ashish 7188
    }
7189
 
553 chandransh 7190
    public authenticateUser_args(
48 ashish 7191
      String email,
7192
      String password)
7193
    {
7194
      this();
7195
      this.email = email;
7196
      this.password = password;
7197
    }
7198
 
7199
    /**
7200
     * Performs a deep copy on <i>other</i>.
7201
     */
553 chandransh 7202
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7203
      if (other.isSetEmail()) {
7204
        this.email = other.email;
7205
      }
7206
      if (other.isSetPassword()) {
7207
        this.password = other.password;
7208
      }
7209
    }
7210
 
553 chandransh 7211
    public authenticateUser_args deepCopy() {
7212
      return new authenticateUser_args(this);
48 ashish 7213
    }
7214
 
7215
    @Deprecated
553 chandransh 7216
    public authenticateUser_args clone() {
7217
      return new authenticateUser_args(this);
48 ashish 7218
    }
7219
 
7220
    public String getEmail() {
7221
      return this.email;
7222
    }
7223
 
553 chandransh 7224
    public authenticateUser_args setEmail(String email) {
48 ashish 7225
      this.email = email;
7226
      return this;
7227
    }
7228
 
7229
    public void unsetEmail() {
7230
      this.email = null;
7231
    }
7232
 
7233
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7234
    public boolean isSetEmail() {
7235
      return this.email != null;
7236
    }
7237
 
7238
    public void setEmailIsSet(boolean value) {
7239
      if (!value) {
7240
        this.email = null;
7241
      }
7242
    }
7243
 
7244
    public String getPassword() {
7245
      return this.password;
7246
    }
7247
 
553 chandransh 7248
    public authenticateUser_args setPassword(String password) {
48 ashish 7249
      this.password = password;
7250
      return this;
7251
    }
7252
 
7253
    public void unsetPassword() {
7254
      this.password = null;
7255
    }
7256
 
7257
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7258
    public boolean isSetPassword() {
7259
      return this.password != null;
7260
    }
7261
 
7262
    public void setPasswordIsSet(boolean value) {
7263
      if (!value) {
7264
        this.password = null;
7265
      }
7266
    }
7267
 
7268
    public void setFieldValue(_Fields field, Object value) {
7269
      switch (field) {
7270
      case EMAIL:
7271
        if (value == null) {
7272
          unsetEmail();
7273
        } else {
7274
          setEmail((String)value);
7275
        }
7276
        break;
7277
 
7278
      case PASSWORD:
7279
        if (value == null) {
7280
          unsetPassword();
7281
        } else {
7282
          setPassword((String)value);
7283
        }
7284
        break;
7285
 
7286
      }
7287
    }
7288
 
7289
    public void setFieldValue(int fieldID, Object value) {
7290
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7291
    }
7292
 
7293
    public Object getFieldValue(_Fields field) {
7294
      switch (field) {
7295
      case EMAIL:
7296
        return getEmail();
7297
 
7298
      case PASSWORD:
7299
        return getPassword();
7300
 
7301
      }
7302
      throw new IllegalStateException();
7303
    }
7304
 
7305
    public Object getFieldValue(int fieldId) {
7306
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7307
    }
7308
 
7309
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7310
    public boolean isSet(_Fields field) {
7311
      switch (field) {
7312
      case EMAIL:
7313
        return isSetEmail();
7314
      case PASSWORD:
7315
        return isSetPassword();
7316
      }
7317
      throw new IllegalStateException();
7318
    }
7319
 
7320
    public boolean isSet(int fieldID) {
7321
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7322
    }
7323
 
7324
    @Override
7325
    public boolean equals(Object that) {
7326
      if (that == null)
7327
        return false;
553 chandransh 7328
      if (that instanceof authenticateUser_args)
7329
        return this.equals((authenticateUser_args)that);
48 ashish 7330
      return false;
7331
    }
7332
 
553 chandransh 7333
    public boolean equals(authenticateUser_args that) {
48 ashish 7334
      if (that == null)
7335
        return false;
7336
 
7337
      boolean this_present_email = true && this.isSetEmail();
7338
      boolean that_present_email = true && that.isSetEmail();
7339
      if (this_present_email || that_present_email) {
7340
        if (!(this_present_email && that_present_email))
7341
          return false;
7342
        if (!this.email.equals(that.email))
7343
          return false;
7344
      }
7345
 
7346
      boolean this_present_password = true && this.isSetPassword();
7347
      boolean that_present_password = true && that.isSetPassword();
7348
      if (this_present_password || that_present_password) {
7349
        if (!(this_present_password && that_present_password))
7350
          return false;
7351
        if (!this.password.equals(that.password))
7352
          return false;
7353
      }
7354
 
7355
      return true;
7356
    }
7357
 
7358
    @Override
7359
    public int hashCode() {
7360
      return 0;
7361
    }
7362
 
553 chandransh 7363
    public int compareTo(authenticateUser_args other) {
48 ashish 7364
      if (!getClass().equals(other.getClass())) {
7365
        return getClass().getName().compareTo(other.getClass().getName());
7366
      }
7367
 
7368
      int lastComparison = 0;
553 chandransh 7369
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7370
 
7371
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7372
      if (lastComparison != 0) {
7373
        return lastComparison;
7374
      }
7375
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7376
      if (lastComparison != 0) {
7377
        return lastComparison;
7378
      }
7379
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7380
      if (lastComparison != 0) {
7381
        return lastComparison;
7382
      }
7383
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7384
      if (lastComparison != 0) {
7385
        return lastComparison;
7386
      }
7387
      return 0;
7388
    }
7389
 
7390
    public void read(TProtocol iprot) throws TException {
7391
      TField field;
7392
      iprot.readStructBegin();
7393
      while (true)
7394
      {
7395
        field = iprot.readFieldBegin();
7396
        if (field.type == TType.STOP) { 
7397
          break;
7398
        }
7399
        _Fields fieldId = _Fields.findByThriftId(field.id);
7400
        if (fieldId == null) {
7401
          TProtocolUtil.skip(iprot, field.type);
7402
        } else {
7403
          switch (fieldId) {
7404
            case EMAIL:
7405
              if (field.type == TType.STRING) {
7406
                this.email = iprot.readString();
7407
              } else { 
7408
                TProtocolUtil.skip(iprot, field.type);
7409
              }
7410
              break;
7411
            case PASSWORD:
7412
              if (field.type == TType.STRING) {
7413
                this.password = iprot.readString();
7414
              } else { 
7415
                TProtocolUtil.skip(iprot, field.type);
7416
              }
7417
              break;
7418
          }
7419
          iprot.readFieldEnd();
7420
        }
7421
      }
7422
      iprot.readStructEnd();
7423
      validate();
7424
    }
7425
 
7426
    public void write(TProtocol oprot) throws TException {
7427
      validate();
7428
 
7429
      oprot.writeStructBegin(STRUCT_DESC);
7430
      if (this.email != null) {
7431
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7432
        oprot.writeString(this.email);
7433
        oprot.writeFieldEnd();
7434
      }
7435
      if (this.password != null) {
7436
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7437
        oprot.writeString(this.password);
7438
        oprot.writeFieldEnd();
7439
      }
7440
      oprot.writeFieldStop();
7441
      oprot.writeStructEnd();
7442
    }
7443
 
7444
    @Override
7445
    public String toString() {
553 chandransh 7446
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7447
      boolean first = true;
7448
 
7449
      sb.append("email:");
7450
      if (this.email == null) {
7451
        sb.append("null");
7452
      } else {
7453
        sb.append(this.email);
7454
      }
7455
      first = false;
7456
      if (!first) sb.append(", ");
7457
      sb.append("password:");
7458
      if (this.password == null) {
7459
        sb.append("null");
7460
      } else {
7461
        sb.append(this.password);
7462
      }
7463
      first = false;
7464
      sb.append(")");
7465
      return sb.toString();
7466
    }
7467
 
7468
    public void validate() throws TException {
7469
      // check for required fields
7470
    }
7471
 
7472
  }
7473
 
571 rajveer 7474
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7475
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7476
 
7477
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7478
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7479
 
553 chandransh 7480
    private User success;
7481
    private AuthenticationException auex;
48 ashish 7482
 
7483
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7484
    public enum _Fields implements TFieldIdEnum {
7485
      SUCCESS((short)0, "success"),
553 chandransh 7486
      AUEX((short)1, "auex");
48 ashish 7487
 
7488
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7489
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7490
 
7491
      static {
7492
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7493
          byId.put((int)field._thriftId, field);
7494
          byName.put(field.getFieldName(), field);
7495
        }
7496
      }
7497
 
7498
      /**
7499
       * Find the _Fields constant that matches fieldId, or null if its not found.
7500
       */
7501
      public static _Fields findByThriftId(int fieldId) {
7502
        return byId.get(fieldId);
7503
      }
7504
 
7505
      /**
7506
       * Find the _Fields constant that matches fieldId, throwing an exception
7507
       * if it is not found.
7508
       */
7509
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7510
        _Fields fields = findByThriftId(fieldId);
7511
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7512
        return fields;
7513
      }
7514
 
7515
      /**
7516
       * Find the _Fields constant that matches name, or null if its not found.
7517
       */
7518
      public static _Fields findByName(String name) {
7519
        return byName.get(name);
7520
      }
7521
 
7522
      private final short _thriftId;
7523
      private final String _fieldName;
7524
 
7525
      _Fields(short thriftId, String fieldName) {
7526
        _thriftId = thriftId;
7527
        _fieldName = fieldName;
7528
      }
7529
 
7530
      public short getThriftFieldId() {
7531
        return _thriftId;
7532
      }
7533
 
7534
      public String getFieldName() {
7535
        return _fieldName;
7536
      }
7537
    }
7538
 
7539
    // isset id assignments
7540
 
7541
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7542
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7543
          new StructMetaData(TType.STRUCT, User.class)));
7544
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7545
          new FieldValueMetaData(TType.STRUCT)));
7546
    }});
7547
 
7548
    static {
553 chandransh 7549
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7550
    }
7551
 
553 chandransh 7552
    public authenticateUser_result() {
48 ashish 7553
    }
7554
 
553 chandransh 7555
    public authenticateUser_result(
7556
      User success,
7557
      AuthenticationException auex)
48 ashish 7558
    {
7559
      this();
7560
      this.success = success;
553 chandransh 7561
      this.auex = auex;
48 ashish 7562
    }
7563
 
7564
    /**
7565
     * Performs a deep copy on <i>other</i>.
7566
     */
553 chandransh 7567
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7568
      if (other.isSetSuccess()) {
553 chandransh 7569
        this.success = new User(other.success);
48 ashish 7570
      }
553 chandransh 7571
      if (other.isSetAuex()) {
7572
        this.auex = new AuthenticationException(other.auex);
48 ashish 7573
      }
7574
    }
7575
 
553 chandransh 7576
    public authenticateUser_result deepCopy() {
7577
      return new authenticateUser_result(this);
48 ashish 7578
    }
7579
 
7580
    @Deprecated
553 chandransh 7581
    public authenticateUser_result clone() {
7582
      return new authenticateUser_result(this);
48 ashish 7583
    }
7584
 
553 chandransh 7585
    public User getSuccess() {
48 ashish 7586
      return this.success;
7587
    }
7588
 
553 chandransh 7589
    public authenticateUser_result setSuccess(User success) {
48 ashish 7590
      this.success = success;
7591
      return this;
7592
    }
7593
 
7594
    public void unsetSuccess() {
7595
      this.success = null;
7596
    }
7597
 
7598
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7599
    public boolean isSetSuccess() {
7600
      return this.success != null;
7601
    }
7602
 
7603
    public void setSuccessIsSet(boolean value) {
7604
      if (!value) {
7605
        this.success = null;
7606
      }
7607
    }
7608
 
553 chandransh 7609
    public AuthenticationException getAuex() {
7610
      return this.auex;
48 ashish 7611
    }
7612
 
553 chandransh 7613
    public authenticateUser_result setAuex(AuthenticationException auex) {
7614
      this.auex = auex;
48 ashish 7615
      return this;
7616
    }
7617
 
553 chandransh 7618
    public void unsetAuex() {
7619
      this.auex = null;
48 ashish 7620
    }
7621
 
553 chandransh 7622
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7623
    public boolean isSetAuex() {
7624
      return this.auex != null;
48 ashish 7625
    }
7626
 
553 chandransh 7627
    public void setAuexIsSet(boolean value) {
48 ashish 7628
      if (!value) {
553 chandransh 7629
        this.auex = null;
48 ashish 7630
      }
7631
    }
7632
 
7633
    public void setFieldValue(_Fields field, Object value) {
7634
      switch (field) {
7635
      case SUCCESS:
7636
        if (value == null) {
7637
          unsetSuccess();
7638
        } else {
553 chandransh 7639
          setSuccess((User)value);
48 ashish 7640
        }
7641
        break;
7642
 
553 chandransh 7643
      case AUEX:
48 ashish 7644
        if (value == null) {
553 chandransh 7645
          unsetAuex();
48 ashish 7646
        } else {
553 chandransh 7647
          setAuex((AuthenticationException)value);
48 ashish 7648
        }
7649
        break;
7650
 
7651
      }
7652
    }
7653
 
7654
    public void setFieldValue(int fieldID, Object value) {
7655
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7656
    }
7657
 
7658
    public Object getFieldValue(_Fields field) {
7659
      switch (field) {
7660
      case SUCCESS:
7661
        return getSuccess();
7662
 
553 chandransh 7663
      case AUEX:
7664
        return getAuex();
48 ashish 7665
 
7666
      }
7667
      throw new IllegalStateException();
7668
    }
7669
 
7670
    public Object getFieldValue(int fieldId) {
7671
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7672
    }
7673
 
7674
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7675
    public boolean isSet(_Fields field) {
7676
      switch (field) {
7677
      case SUCCESS:
7678
        return isSetSuccess();
553 chandransh 7679
      case AUEX:
7680
        return isSetAuex();
48 ashish 7681
      }
7682
      throw new IllegalStateException();
7683
    }
7684
 
7685
    public boolean isSet(int fieldID) {
7686
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7687
    }
7688
 
7689
    @Override
7690
    public boolean equals(Object that) {
7691
      if (that == null)
7692
        return false;
553 chandransh 7693
      if (that instanceof authenticateUser_result)
7694
        return this.equals((authenticateUser_result)that);
48 ashish 7695
      return false;
7696
    }
7697
 
553 chandransh 7698
    public boolean equals(authenticateUser_result that) {
48 ashish 7699
      if (that == null)
7700
        return false;
7701
 
7702
      boolean this_present_success = true && this.isSetSuccess();
7703
      boolean that_present_success = true && that.isSetSuccess();
7704
      if (this_present_success || that_present_success) {
7705
        if (!(this_present_success && that_present_success))
7706
          return false;
7707
        if (!this.success.equals(that.success))
7708
          return false;
7709
      }
7710
 
553 chandransh 7711
      boolean this_present_auex = true && this.isSetAuex();
7712
      boolean that_present_auex = true && that.isSetAuex();
7713
      if (this_present_auex || that_present_auex) {
7714
        if (!(this_present_auex && that_present_auex))
48 ashish 7715
          return false;
553 chandransh 7716
        if (!this.auex.equals(that.auex))
48 ashish 7717
          return false;
7718
      }
7719
 
7720
      return true;
7721
    }
7722
 
7723
    @Override
7724
    public int hashCode() {
7725
      return 0;
7726
    }
7727
 
571 rajveer 7728
    public int compareTo(authenticateUser_result other) {
7729
      if (!getClass().equals(other.getClass())) {
7730
        return getClass().getName().compareTo(other.getClass().getName());
7731
      }
7732
 
7733
      int lastComparison = 0;
7734
      authenticateUser_result typedOther = (authenticateUser_result)other;
7735
 
7736
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7737
      if (lastComparison != 0) {
7738
        return lastComparison;
7739
      }
7740
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7741
      if (lastComparison != 0) {
7742
        return lastComparison;
7743
      }
7744
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7745
      if (lastComparison != 0) {
7746
        return lastComparison;
7747
      }
7748
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7749
      if (lastComparison != 0) {
7750
        return lastComparison;
7751
      }
7752
      return 0;
7753
    }
7754
 
48 ashish 7755
    public void read(TProtocol iprot) throws TException {
7756
      TField field;
7757
      iprot.readStructBegin();
7758
      while (true)
7759
      {
7760
        field = iprot.readFieldBegin();
7761
        if (field.type == TType.STOP) { 
7762
          break;
7763
        }
7764
        _Fields fieldId = _Fields.findByThriftId(field.id);
7765
        if (fieldId == null) {
7766
          TProtocolUtil.skip(iprot, field.type);
7767
        } else {
7768
          switch (fieldId) {
7769
            case SUCCESS:
7770
              if (field.type == TType.STRUCT) {
553 chandransh 7771
                this.success = new User();
48 ashish 7772
                this.success.read(iprot);
7773
              } else { 
7774
                TProtocolUtil.skip(iprot, field.type);
7775
              }
7776
              break;
553 chandransh 7777
            case AUEX:
48 ashish 7778
              if (field.type == TType.STRUCT) {
553 chandransh 7779
                this.auex = new AuthenticationException();
7780
                this.auex.read(iprot);
48 ashish 7781
              } else { 
7782
                TProtocolUtil.skip(iprot, field.type);
7783
              }
7784
              break;
7785
          }
7786
          iprot.readFieldEnd();
7787
        }
7788
      }
7789
      iprot.readStructEnd();
7790
      validate();
7791
    }
7792
 
7793
    public void write(TProtocol oprot) throws TException {
7794
      oprot.writeStructBegin(STRUCT_DESC);
7795
 
7796
      if (this.isSetSuccess()) {
7797
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7798
        this.success.write(oprot);
7799
        oprot.writeFieldEnd();
553 chandransh 7800
      } else if (this.isSetAuex()) {
7801
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7802
        this.auex.write(oprot);
48 ashish 7803
        oprot.writeFieldEnd();
7804
      }
7805
      oprot.writeFieldStop();
7806
      oprot.writeStructEnd();
7807
    }
7808
 
7809
    @Override
7810
    public String toString() {
553 chandransh 7811
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7812
      boolean first = true;
7813
 
7814
      sb.append("success:");
7815
      if (this.success == null) {
7816
        sb.append("null");
7817
      } else {
7818
        sb.append(this.success);
7819
      }
7820
      first = false;
7821
      if (!first) sb.append(", ");
553 chandransh 7822
      sb.append("auex:");
7823
      if (this.auex == null) {
48 ashish 7824
        sb.append("null");
7825
      } else {
553 chandransh 7826
        sb.append(this.auex);
48 ashish 7827
      }
7828
      first = false;
7829
      sb.append(")");
7830
      return sb.toString();
7831
    }
7832
 
7833
    public void validate() throws TException {
7834
      // check for required fields
7835
    }
7836
 
7837
  }
7838
 
553 chandransh 7839
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7840
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7841
 
553 chandransh 7842
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7843
 
553 chandransh 7844
    private String email;
123 ashish 7845
 
7846
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7847
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7848
      EMAIL((short)1, "email");
123 ashish 7849
 
7850
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7851
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7852
 
7853
      static {
7854
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7855
          byId.put((int)field._thriftId, field);
7856
          byName.put(field.getFieldName(), field);
7857
        }
7858
      }
7859
 
7860
      /**
7861
       * Find the _Fields constant that matches fieldId, or null if its not found.
7862
       */
7863
      public static _Fields findByThriftId(int fieldId) {
7864
        return byId.get(fieldId);
7865
      }
7866
 
7867
      /**
7868
       * Find the _Fields constant that matches fieldId, throwing an exception
7869
       * if it is not found.
7870
       */
7871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7872
        _Fields fields = findByThriftId(fieldId);
7873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7874
        return fields;
7875
      }
7876
 
7877
      /**
7878
       * Find the _Fields constant that matches name, or null if its not found.
7879
       */
7880
      public static _Fields findByName(String name) {
7881
        return byName.get(name);
7882
      }
7883
 
7884
      private final short _thriftId;
7885
      private final String _fieldName;
7886
 
7887
      _Fields(short thriftId, String fieldName) {
7888
        _thriftId = thriftId;
7889
        _fieldName = fieldName;
7890
      }
7891
 
7892
      public short getThriftFieldId() {
7893
        return _thriftId;
7894
      }
7895
 
7896
      public String getFieldName() {
7897
        return _fieldName;
7898
      }
7899
    }
7900
 
7901
    // isset id assignments
553 chandransh 7902
 
7903
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7904
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7905
          new FieldValueMetaData(TType.STRING)));
7906
    }});
7907
 
7908
    static {
7909
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7910
    }
7911
 
7912
    public userExists_args() {
7913
    }
7914
 
7915
    public userExists_args(
7916
      String email)
7917
    {
7918
      this();
7919
      this.email = email;
7920
    }
7921
 
7922
    /**
7923
     * Performs a deep copy on <i>other</i>.
7924
     */
7925
    public userExists_args(userExists_args other) {
7926
      if (other.isSetEmail()) {
7927
        this.email = other.email;
7928
      }
7929
    }
7930
 
7931
    public userExists_args deepCopy() {
7932
      return new userExists_args(this);
7933
    }
7934
 
7935
    @Deprecated
7936
    public userExists_args clone() {
7937
      return new userExists_args(this);
7938
    }
7939
 
7940
    public String getEmail() {
7941
      return this.email;
7942
    }
7943
 
7944
    public userExists_args setEmail(String email) {
7945
      this.email = email;
7946
      return this;
7947
    }
7948
 
7949
    public void unsetEmail() {
7950
      this.email = null;
7951
    }
7952
 
7953
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7954
    public boolean isSetEmail() {
7955
      return this.email != null;
7956
    }
7957
 
7958
    public void setEmailIsSet(boolean value) {
7959
      if (!value) {
7960
        this.email = null;
7961
      }
7962
    }
7963
 
7964
    public void setFieldValue(_Fields field, Object value) {
7965
      switch (field) {
7966
      case EMAIL:
7967
        if (value == null) {
7968
          unsetEmail();
7969
        } else {
7970
          setEmail((String)value);
7971
        }
7972
        break;
7973
 
7974
      }
7975
    }
7976
 
7977
    public void setFieldValue(int fieldID, Object value) {
7978
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7979
    }
7980
 
7981
    public Object getFieldValue(_Fields field) {
7982
      switch (field) {
7983
      case EMAIL:
7984
        return getEmail();
7985
 
7986
      }
7987
      throw new IllegalStateException();
7988
    }
7989
 
7990
    public Object getFieldValue(int fieldId) {
7991
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7992
    }
7993
 
7994
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7995
    public boolean isSet(_Fields field) {
7996
      switch (field) {
7997
      case EMAIL:
7998
        return isSetEmail();
7999
      }
8000
      throw new IllegalStateException();
8001
    }
8002
 
8003
    public boolean isSet(int fieldID) {
8004
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8005
    }
8006
 
8007
    @Override
8008
    public boolean equals(Object that) {
8009
      if (that == null)
8010
        return false;
8011
      if (that instanceof userExists_args)
8012
        return this.equals((userExists_args)that);
8013
      return false;
8014
    }
8015
 
8016
    public boolean equals(userExists_args that) {
8017
      if (that == null)
8018
        return false;
8019
 
8020
      boolean this_present_email = true && this.isSetEmail();
8021
      boolean that_present_email = true && that.isSetEmail();
8022
      if (this_present_email || that_present_email) {
8023
        if (!(this_present_email && that_present_email))
8024
          return false;
8025
        if (!this.email.equals(that.email))
8026
          return false;
8027
      }
8028
 
8029
      return true;
8030
    }
8031
 
8032
    @Override
8033
    public int hashCode() {
8034
      return 0;
8035
    }
8036
 
8037
    public int compareTo(userExists_args other) {
8038
      if (!getClass().equals(other.getClass())) {
8039
        return getClass().getName().compareTo(other.getClass().getName());
8040
      }
8041
 
8042
      int lastComparison = 0;
8043
      userExists_args typedOther = (userExists_args)other;
8044
 
8045
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8046
      if (lastComparison != 0) {
8047
        return lastComparison;
8048
      }
8049
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8050
      if (lastComparison != 0) {
8051
        return lastComparison;
8052
      }
8053
      return 0;
8054
    }
8055
 
8056
    public void read(TProtocol iprot) throws TException {
8057
      TField field;
8058
      iprot.readStructBegin();
8059
      while (true)
8060
      {
8061
        field = iprot.readFieldBegin();
8062
        if (field.type == TType.STOP) { 
8063
          break;
8064
        }
8065
        _Fields fieldId = _Fields.findByThriftId(field.id);
8066
        if (fieldId == null) {
8067
          TProtocolUtil.skip(iprot, field.type);
8068
        } else {
8069
          switch (fieldId) {
8070
            case EMAIL:
8071
              if (field.type == TType.STRING) {
8072
                this.email = iprot.readString();
8073
              } else { 
8074
                TProtocolUtil.skip(iprot, field.type);
8075
              }
8076
              break;
8077
          }
8078
          iprot.readFieldEnd();
8079
        }
8080
      }
8081
      iprot.readStructEnd();
8082
      validate();
8083
    }
8084
 
8085
    public void write(TProtocol oprot) throws TException {
8086
      validate();
8087
 
8088
      oprot.writeStructBegin(STRUCT_DESC);
8089
      if (this.email != null) {
8090
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8091
        oprot.writeString(this.email);
8092
        oprot.writeFieldEnd();
8093
      }
8094
      oprot.writeFieldStop();
8095
      oprot.writeStructEnd();
8096
    }
8097
 
8098
    @Override
8099
    public String toString() {
8100
      StringBuilder sb = new StringBuilder("userExists_args(");
8101
      boolean first = true;
8102
 
8103
      sb.append("email:");
8104
      if (this.email == null) {
8105
        sb.append("null");
8106
      } else {
8107
        sb.append(this.email);
8108
      }
8109
      first = false;
8110
      sb.append(")");
8111
      return sb.toString();
8112
    }
8113
 
8114
    public void validate() throws TException {
8115
      // check for required fields
8116
    }
8117
 
8118
  }
8119
 
8120
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8121
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8122
 
8123
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8124
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8125
 
8126
    private boolean success;
8127
    private UserContextException ucx;
8128
 
8129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8130
    public enum _Fields implements TFieldIdEnum {
8131
      SUCCESS((short)0, "success"),
8132
      UCX((short)1, "ucx");
8133
 
8134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8136
 
8137
      static {
8138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8139
          byId.put((int)field._thriftId, field);
8140
          byName.put(field.getFieldName(), field);
8141
        }
8142
      }
8143
 
8144
      /**
8145
       * Find the _Fields constant that matches fieldId, or null if its not found.
8146
       */
8147
      public static _Fields findByThriftId(int fieldId) {
8148
        return byId.get(fieldId);
8149
      }
8150
 
8151
      /**
8152
       * Find the _Fields constant that matches fieldId, throwing an exception
8153
       * if it is not found.
8154
       */
8155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8156
        _Fields fields = findByThriftId(fieldId);
8157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8158
        return fields;
8159
      }
8160
 
8161
      /**
8162
       * Find the _Fields constant that matches name, or null if its not found.
8163
       */
8164
      public static _Fields findByName(String name) {
8165
        return byName.get(name);
8166
      }
8167
 
8168
      private final short _thriftId;
8169
      private final String _fieldName;
8170
 
8171
      _Fields(short thriftId, String fieldName) {
8172
        _thriftId = thriftId;
8173
        _fieldName = fieldName;
8174
      }
8175
 
8176
      public short getThriftFieldId() {
8177
        return _thriftId;
8178
      }
8179
 
8180
      public String getFieldName() {
8181
        return _fieldName;
8182
      }
8183
    }
8184
 
8185
    // isset id assignments
8186
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8187
    private BitSet __isset_bit_vector = new BitSet(1);
8188
 
8189
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8190
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8191
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8192
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8193
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8194
    }});
8195
 
8196
    static {
553 chandransh 8197
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8198
    }
8199
 
553 chandransh 8200
    public userExists_result() {
123 ashish 8201
    }
8202
 
553 chandransh 8203
    public userExists_result(
8204
      boolean success,
8205
      UserContextException ucx)
123 ashish 8206
    {
8207
      this();
553 chandransh 8208
      this.success = success;
8209
      setSuccessIsSet(true);
8210
      this.ucx = ucx;
123 ashish 8211
    }
8212
 
8213
    /**
8214
     * Performs a deep copy on <i>other</i>.
8215
     */
553 chandransh 8216
    public userExists_result(userExists_result other) {
123 ashish 8217
      __isset_bit_vector.clear();
8218
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8219
      this.success = other.success;
8220
      if (other.isSetUcx()) {
8221
        this.ucx = new UserContextException(other.ucx);
123 ashish 8222
      }
8223
    }
8224
 
553 chandransh 8225
    public userExists_result deepCopy() {
8226
      return new userExists_result(this);
123 ashish 8227
    }
8228
 
8229
    @Deprecated
553 chandransh 8230
    public userExists_result clone() {
8231
      return new userExists_result(this);
123 ashish 8232
    }
8233
 
553 chandransh 8234
    public boolean isSuccess() {
8235
      return this.success;
123 ashish 8236
    }
8237
 
553 chandransh 8238
    public userExists_result setSuccess(boolean success) {
8239
      this.success = success;
8240
      setSuccessIsSet(true);
123 ashish 8241
      return this;
8242
    }
8243
 
553 chandransh 8244
    public void unsetSuccess() {
8245
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8246
    }
8247
 
553 chandransh 8248
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8249
    public boolean isSetSuccess() {
8250
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8251
    }
8252
 
553 chandransh 8253
    public void setSuccessIsSet(boolean value) {
8254
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8255
    }
8256
 
8257
    public UserContextException getUcx() {
8258
      return this.ucx;
8259
    }
8260
 
8261
    public userExists_result setUcx(UserContextException ucx) {
8262
      this.ucx = ucx;
8263
      return this;
8264
    }
8265
 
8266
    public void unsetUcx() {
8267
      this.ucx = null;
8268
    }
8269
 
8270
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8271
    public boolean isSetUcx() {
8272
      return this.ucx != null;
8273
    }
8274
 
8275
    public void setUcxIsSet(boolean value) {
123 ashish 8276
      if (!value) {
553 chandransh 8277
        this.ucx = null;
123 ashish 8278
      }
8279
    }
8280
 
553 chandransh 8281
    public void setFieldValue(_Fields field, Object value) {
8282
      switch (field) {
8283
      case SUCCESS:
8284
        if (value == null) {
8285
          unsetSuccess();
8286
        } else {
8287
          setSuccess((Boolean)value);
8288
        }
8289
        break;
8290
 
8291
      case UCX:
8292
        if (value == null) {
8293
          unsetUcx();
8294
        } else {
8295
          setUcx((UserContextException)value);
8296
        }
8297
        break;
8298
 
8299
      }
123 ashish 8300
    }
8301
 
553 chandransh 8302
    public void setFieldValue(int fieldID, Object value) {
8303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8304
    }
8305
 
8306
    public Object getFieldValue(_Fields field) {
8307
      switch (field) {
8308
      case SUCCESS:
8309
        return new Boolean(isSuccess());
8310
 
8311
      case UCX:
8312
        return getUcx();
8313
 
8314
      }
8315
      throw new IllegalStateException();
8316
    }
8317
 
8318
    public Object getFieldValue(int fieldId) {
8319
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8320
    }
8321
 
8322
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8323
    public boolean isSet(_Fields field) {
8324
      switch (field) {
8325
      case SUCCESS:
8326
        return isSetSuccess();
8327
      case UCX:
8328
        return isSetUcx();
8329
      }
8330
      throw new IllegalStateException();
8331
    }
8332
 
8333
    public boolean isSet(int fieldID) {
8334
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8335
    }
8336
 
8337
    @Override
8338
    public boolean equals(Object that) {
8339
      if (that == null)
8340
        return false;
8341
      if (that instanceof userExists_result)
8342
        return this.equals((userExists_result)that);
8343
      return false;
8344
    }
8345
 
8346
    public boolean equals(userExists_result that) {
8347
      if (that == null)
8348
        return false;
8349
 
8350
      boolean this_present_success = true;
8351
      boolean that_present_success = true;
8352
      if (this_present_success || that_present_success) {
8353
        if (!(this_present_success && that_present_success))
8354
          return false;
8355
        if (this.success != that.success)
8356
          return false;
8357
      }
8358
 
8359
      boolean this_present_ucx = true && this.isSetUcx();
8360
      boolean that_present_ucx = true && that.isSetUcx();
8361
      if (this_present_ucx || that_present_ucx) {
8362
        if (!(this_present_ucx && that_present_ucx))
8363
          return false;
8364
        if (!this.ucx.equals(that.ucx))
8365
          return false;
8366
      }
8367
 
8368
      return true;
8369
    }
8370
 
8371
    @Override
8372
    public int hashCode() {
8373
      return 0;
8374
    }
8375
 
8376
    public int compareTo(userExists_result other) {
8377
      if (!getClass().equals(other.getClass())) {
8378
        return getClass().getName().compareTo(other.getClass().getName());
8379
      }
8380
 
8381
      int lastComparison = 0;
8382
      userExists_result typedOther = (userExists_result)other;
8383
 
8384
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8385
      if (lastComparison != 0) {
8386
        return lastComparison;
8387
      }
8388
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8389
      if (lastComparison != 0) {
8390
        return lastComparison;
8391
      }
8392
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8393
      if (lastComparison != 0) {
8394
        return lastComparison;
8395
      }
8396
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8397
      if (lastComparison != 0) {
8398
        return lastComparison;
8399
      }
8400
      return 0;
8401
    }
8402
 
8403
    public void read(TProtocol iprot) throws TException {
8404
      TField field;
8405
      iprot.readStructBegin();
8406
      while (true)
8407
      {
8408
        field = iprot.readFieldBegin();
8409
        if (field.type == TType.STOP) { 
8410
          break;
8411
        }
8412
        _Fields fieldId = _Fields.findByThriftId(field.id);
8413
        if (fieldId == null) {
8414
          TProtocolUtil.skip(iprot, field.type);
8415
        } else {
8416
          switch (fieldId) {
8417
            case SUCCESS:
8418
              if (field.type == TType.BOOL) {
8419
                this.success = iprot.readBool();
8420
                setSuccessIsSet(true);
8421
              } else { 
8422
                TProtocolUtil.skip(iprot, field.type);
8423
              }
8424
              break;
8425
            case UCX:
8426
              if (field.type == TType.STRUCT) {
8427
                this.ucx = new UserContextException();
8428
                this.ucx.read(iprot);
8429
              } else { 
8430
                TProtocolUtil.skip(iprot, field.type);
8431
              }
8432
              break;
8433
          }
8434
          iprot.readFieldEnd();
8435
        }
8436
      }
8437
      iprot.readStructEnd();
8438
      validate();
8439
    }
8440
 
8441
    public void write(TProtocol oprot) throws TException {
8442
      oprot.writeStructBegin(STRUCT_DESC);
8443
 
8444
      if (this.isSetSuccess()) {
8445
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8446
        oprot.writeBool(this.success);
8447
        oprot.writeFieldEnd();
8448
      } else if (this.isSetUcx()) {
8449
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8450
        this.ucx.write(oprot);
8451
        oprot.writeFieldEnd();
8452
      }
8453
      oprot.writeFieldStop();
8454
      oprot.writeStructEnd();
8455
    }
8456
 
8457
    @Override
8458
    public String toString() {
8459
      StringBuilder sb = new StringBuilder("userExists_result(");
8460
      boolean first = true;
8461
 
8462
      sb.append("success:");
8463
      sb.append(this.success);
8464
      first = false;
8465
      if (!first) sb.append(", ");
8466
      sb.append("ucx:");
8467
      if (this.ucx == null) {
8468
        sb.append("null");
8469
      } else {
8470
        sb.append(this.ucx);
8471
      }
8472
      first = false;
8473
      sb.append(")");
8474
      return sb.toString();
8475
    }
8476
 
8477
    public void validate() throws TException {
8478
      // check for required fields
8479
    }
8480
 
8481
  }
8482
 
8483
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8484
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8485
 
8486
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8487
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8488
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8489
 
8490
    private long userId;
8491
    private Address address;
8492
    private boolean setDefault;
8493
 
8494
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8495
    public enum _Fields implements TFieldIdEnum {
8496
      USER_ID((short)1, "userId"),
8497
      ADDRESS((short)2, "address"),
571 rajveer 8498
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8499
 
8500
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8501
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8502
 
8503
      static {
8504
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8505
          byId.put((int)field._thriftId, field);
8506
          byName.put(field.getFieldName(), field);
8507
        }
8508
      }
8509
 
8510
      /**
8511
       * Find the _Fields constant that matches fieldId, or null if its not found.
8512
       */
8513
      public static _Fields findByThriftId(int fieldId) {
8514
        return byId.get(fieldId);
8515
      }
8516
 
8517
      /**
8518
       * Find the _Fields constant that matches fieldId, throwing an exception
8519
       * if it is not found.
8520
       */
8521
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8522
        _Fields fields = findByThriftId(fieldId);
8523
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8524
        return fields;
8525
      }
8526
 
8527
      /**
8528
       * Find the _Fields constant that matches name, or null if its not found.
8529
       */
8530
      public static _Fields findByName(String name) {
8531
        return byName.get(name);
8532
      }
8533
 
8534
      private final short _thriftId;
8535
      private final String _fieldName;
8536
 
8537
      _Fields(short thriftId, String fieldName) {
8538
        _thriftId = thriftId;
8539
        _fieldName = fieldName;
8540
      }
8541
 
8542
      public short getThriftFieldId() {
8543
        return _thriftId;
8544
      }
8545
 
8546
      public String getFieldName() {
8547
        return _fieldName;
8548
      }
8549
    }
8550
 
8551
    // isset id assignments
8552
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8553
    private static final int __SETDEFAULT_ISSET_ID = 1;
8554
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8555
 
8556
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8557
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8558
          new FieldValueMetaData(TType.I64)));
8559
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8560
          new StructMetaData(TType.STRUCT, Address.class)));
8561
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8562
          new FieldValueMetaData(TType.BOOL)));
8563
    }});
8564
 
8565
    static {
8566
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8567
    }
8568
 
8569
    public addAddressForUser_args() {
8570
    }
8571
 
8572
    public addAddressForUser_args(
8573
      long userId,
8574
      Address address,
8575
      boolean setDefault)
8576
    {
8577
      this();
8578
      this.userId = userId;
8579
      setUserIdIsSet(true);
8580
      this.address = address;
8581
      this.setDefault = setDefault;
8582
      setSetDefaultIsSet(true);
8583
    }
8584
 
8585
    /**
8586
     * Performs a deep copy on <i>other</i>.
8587
     */
8588
    public addAddressForUser_args(addAddressForUser_args other) {
8589
      __isset_bit_vector.clear();
8590
      __isset_bit_vector.or(other.__isset_bit_vector);
8591
      this.userId = other.userId;
8592
      if (other.isSetAddress()) {
8593
        this.address = new Address(other.address);
8594
      }
8595
      this.setDefault = other.setDefault;
8596
    }
8597
 
8598
    public addAddressForUser_args deepCopy() {
8599
      return new addAddressForUser_args(this);
8600
    }
8601
 
8602
    @Deprecated
8603
    public addAddressForUser_args clone() {
8604
      return new addAddressForUser_args(this);
8605
    }
8606
 
8607
    public long getUserId() {
8608
      return this.userId;
8609
    }
8610
 
8611
    public addAddressForUser_args setUserId(long userId) {
8612
      this.userId = userId;
8613
      setUserIdIsSet(true);
123 ashish 8614
      return this;
8615
    }
8616
 
553 chandransh 8617
    public void unsetUserId() {
8618
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8619
    }
8620
 
553 chandransh 8621
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8622
    public boolean isSetUserId() {
8623
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8624
    }
8625
 
553 chandransh 8626
    public void setUserIdIsSet(boolean value) {
8627
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8628
    }
8629
 
8630
    public Address getAddress() {
8631
      return this.address;
8632
    }
8633
 
8634
    public addAddressForUser_args setAddress(Address address) {
8635
      this.address = address;
8636
      return this;
8637
    }
8638
 
8639
    public void unsetAddress() {
8640
      this.address = null;
8641
    }
8642
 
8643
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8644
    public boolean isSetAddress() {
8645
      return this.address != null;
8646
    }
8647
 
8648
    public void setAddressIsSet(boolean value) {
123 ashish 8649
      if (!value) {
553 chandransh 8650
        this.address = null;
123 ashish 8651
      }
8652
    }
8653
 
553 chandransh 8654
    public boolean isSetDefault() {
8655
      return this.setDefault;
8656
    }
8657
 
8658
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8659
      this.setDefault = setDefault;
8660
      setSetDefaultIsSet(true);
8661
      return this;
8662
    }
8663
 
8664
    public void unsetSetDefault() {
8665
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8666
    }
8667
 
8668
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8669
    public boolean isSetSetDefault() {
8670
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8671
    }
8672
 
8673
    public void setSetDefaultIsSet(boolean value) {
8674
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8675
    }
8676
 
123 ashish 8677
    public void setFieldValue(_Fields field, Object value) {
8678
      switch (field) {
553 chandransh 8679
      case USER_ID:
123 ashish 8680
        if (value == null) {
553 chandransh 8681
          unsetUserId();
123 ashish 8682
        } else {
553 chandransh 8683
          setUserId((Long)value);
123 ashish 8684
        }
8685
        break;
8686
 
553 chandransh 8687
      case ADDRESS:
123 ashish 8688
        if (value == null) {
553 chandransh 8689
          unsetAddress();
123 ashish 8690
        } else {
553 chandransh 8691
          setAddress((Address)value);
123 ashish 8692
        }
8693
        break;
8694
 
553 chandransh 8695
      case SET_DEFAULT:
8696
        if (value == null) {
8697
          unsetSetDefault();
8698
        } else {
8699
          setSetDefault((Boolean)value);
8700
        }
8701
        break;
8702
 
123 ashish 8703
      }
8704
    }
8705
 
8706
    public void setFieldValue(int fieldID, Object value) {
8707
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8708
    }
8709
 
8710
    public Object getFieldValue(_Fields field) {
8711
      switch (field) {
553 chandransh 8712
      case USER_ID:
8713
        return new Long(getUserId());
123 ashish 8714
 
553 chandransh 8715
      case ADDRESS:
8716
        return getAddress();
123 ashish 8717
 
553 chandransh 8718
      case SET_DEFAULT:
8719
        return new Boolean(isSetDefault());
8720
 
123 ashish 8721
      }
8722
      throw new IllegalStateException();
8723
    }
8724
 
8725
    public Object getFieldValue(int fieldId) {
8726
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8727
    }
8728
 
8729
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8730
    public boolean isSet(_Fields field) {
8731
      switch (field) {
553 chandransh 8732
      case USER_ID:
8733
        return isSetUserId();
8734
      case ADDRESS:
8735
        return isSetAddress();
8736
      case SET_DEFAULT:
8737
        return isSetSetDefault();
123 ashish 8738
      }
8739
      throw new IllegalStateException();
8740
    }
8741
 
8742
    public boolean isSet(int fieldID) {
8743
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8744
    }
8745
 
8746
    @Override
8747
    public boolean equals(Object that) {
8748
      if (that == null)
8749
        return false;
553 chandransh 8750
      if (that instanceof addAddressForUser_args)
8751
        return this.equals((addAddressForUser_args)that);
123 ashish 8752
      return false;
8753
    }
8754
 
553 chandransh 8755
    public boolean equals(addAddressForUser_args that) {
123 ashish 8756
      if (that == null)
8757
        return false;
8758
 
553 chandransh 8759
      boolean this_present_userId = true;
8760
      boolean that_present_userId = true;
8761
      if (this_present_userId || that_present_userId) {
8762
        if (!(this_present_userId && that_present_userId))
123 ashish 8763
          return false;
553 chandransh 8764
        if (this.userId != that.userId)
123 ashish 8765
          return false;
8766
      }
8767
 
553 chandransh 8768
      boolean this_present_address = true && this.isSetAddress();
8769
      boolean that_present_address = true && that.isSetAddress();
8770
      if (this_present_address || that_present_address) {
8771
        if (!(this_present_address && that_present_address))
123 ashish 8772
          return false;
553 chandransh 8773
        if (!this.address.equals(that.address))
123 ashish 8774
          return false;
8775
      }
8776
 
553 chandransh 8777
      boolean this_present_setDefault = true;
8778
      boolean that_present_setDefault = true;
8779
      if (this_present_setDefault || that_present_setDefault) {
8780
        if (!(this_present_setDefault && that_present_setDefault))
8781
          return false;
8782
        if (this.setDefault != that.setDefault)
8783
          return false;
8784
      }
8785
 
123 ashish 8786
      return true;
8787
    }
8788
 
8789
    @Override
8790
    public int hashCode() {
8791
      return 0;
8792
    }
8793
 
553 chandransh 8794
    public int compareTo(addAddressForUser_args other) {
123 ashish 8795
      if (!getClass().equals(other.getClass())) {
8796
        return getClass().getName().compareTo(other.getClass().getName());
8797
      }
8798
 
8799
      int lastComparison = 0;
553 chandransh 8800
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8801
 
553 chandransh 8802
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8803
      if (lastComparison != 0) {
8804
        return lastComparison;
8805
      }
553 chandransh 8806
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8807
      if (lastComparison != 0) {
8808
        return lastComparison;
8809
      }
553 chandransh 8810
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8811
      if (lastComparison != 0) {
8812
        return lastComparison;
8813
      }
553 chandransh 8814
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8815
      if (lastComparison != 0) {
8816
        return lastComparison;
8817
      }
553 chandransh 8818
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8819
      if (lastComparison != 0) {
8820
        return lastComparison;
8821
      }
8822
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8823
      if (lastComparison != 0) {
8824
        return lastComparison;
8825
      }
123 ashish 8826
      return 0;
8827
    }
8828
 
8829
    public void read(TProtocol iprot) throws TException {
8830
      TField field;
8831
      iprot.readStructBegin();
8832
      while (true)
8833
      {
8834
        field = iprot.readFieldBegin();
8835
        if (field.type == TType.STOP) { 
8836
          break;
8837
        }
8838
        _Fields fieldId = _Fields.findByThriftId(field.id);
8839
        if (fieldId == null) {
8840
          TProtocolUtil.skip(iprot, field.type);
8841
        } else {
8842
          switch (fieldId) {
553 chandransh 8843
            case USER_ID:
8844
              if (field.type == TType.I64) {
8845
                this.userId = iprot.readI64();
8846
                setUserIdIsSet(true);
123 ashish 8847
              } else { 
8848
                TProtocolUtil.skip(iprot, field.type);
8849
              }
8850
              break;
553 chandransh 8851
            case ADDRESS:
8852
              if (field.type == TType.STRUCT) {
8853
                this.address = new Address();
8854
                this.address.read(iprot);
123 ashish 8855
              } else { 
8856
                TProtocolUtil.skip(iprot, field.type);
8857
              }
8858
              break;
553 chandransh 8859
            case SET_DEFAULT:
123 ashish 8860
              if (field.type == TType.BOOL) {
553 chandransh 8861
                this.setDefault = iprot.readBool();
8862
                setSetDefaultIsSet(true);
123 ashish 8863
              } else { 
8864
                TProtocolUtil.skip(iprot, field.type);
8865
              }
8866
              break;
8867
          }
8868
          iprot.readFieldEnd();
8869
        }
8870
      }
8871
      iprot.readStructEnd();
8872
      validate();
8873
    }
8874
 
8875
    public void write(TProtocol oprot) throws TException {
8876
      validate();
8877
 
8878
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8879
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8880
      oprot.writeI64(this.userId);
8881
      oprot.writeFieldEnd();
8882
      if (this.address != null) {
8883
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8884
        this.address.write(oprot);
123 ashish 8885
        oprot.writeFieldEnd();
8886
      }
553 chandransh 8887
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8888
      oprot.writeBool(this.setDefault);
8889
      oprot.writeFieldEnd();
123 ashish 8890
      oprot.writeFieldStop();
8891
      oprot.writeStructEnd();
8892
    }
8893
 
8894
    @Override
8895
    public String toString() {
553 chandransh 8896
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8897
      boolean first = true;
8898
 
553 chandransh 8899
      sb.append("userId:");
8900
      sb.append(this.userId);
123 ashish 8901
      first = false;
8902
      if (!first) sb.append(", ");
553 chandransh 8903
      sb.append("address:");
8904
      if (this.address == null) {
123 ashish 8905
        sb.append("null");
8906
      } else {
553 chandransh 8907
        sb.append(this.address);
123 ashish 8908
      }
8909
      first = false;
8910
      if (!first) sb.append(", ");
553 chandransh 8911
      sb.append("setDefault:");
8912
      sb.append(this.setDefault);
8913
      first = false;
123 ashish 8914
      sb.append(")");
8915
      return sb.toString();
8916
    }
8917
 
8918
    public void validate() throws TException {
8919
      // check for required fields
8920
    }
8921
 
8922
  }
8923
 
553 chandransh 8924
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8925
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8926
 
571 rajveer 8927
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 8928
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8929
 
571 rajveer 8930
    private long success;
553 chandransh 8931
    private UserContextException ucx;
123 ashish 8932
 
8933
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8934
    public enum _Fields implements TFieldIdEnum {
8935
      SUCCESS((short)0, "success"),
553 chandransh 8936
      UCX((short)1, "ucx");
123 ashish 8937
 
8938
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8940
 
8941
      static {
8942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8943
          byId.put((int)field._thriftId, field);
8944
          byName.put(field.getFieldName(), field);
8945
        }
8946
      }
8947
 
8948
      /**
8949
       * Find the _Fields constant that matches fieldId, or null if its not found.
8950
       */
8951
      public static _Fields findByThriftId(int fieldId) {
8952
        return byId.get(fieldId);
8953
      }
8954
 
8955
      /**
8956
       * Find the _Fields constant that matches fieldId, throwing an exception
8957
       * if it is not found.
8958
       */
8959
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8960
        _Fields fields = findByThriftId(fieldId);
8961
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8962
        return fields;
8963
      }
8964
 
8965
      /**
8966
       * Find the _Fields constant that matches name, or null if its not found.
8967
       */
8968
      public static _Fields findByName(String name) {
8969
        return byName.get(name);
8970
      }
8971
 
8972
      private final short _thriftId;
8973
      private final String _fieldName;
8974
 
8975
      _Fields(short thriftId, String fieldName) {
8976
        _thriftId = thriftId;
8977
        _fieldName = fieldName;
8978
      }
8979
 
8980
      public short getThriftFieldId() {
8981
        return _thriftId;
8982
      }
8983
 
8984
      public String getFieldName() {
8985
        return _fieldName;
8986
      }
8987
    }
8988
 
8989
    // isset id assignments
8990
    private static final int __SUCCESS_ISSET_ID = 0;
8991
    private BitSet __isset_bit_vector = new BitSet(1);
8992
 
8993
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8994
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 8995
          new FieldValueMetaData(TType.I64)));
553 chandransh 8996
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 8997
          new FieldValueMetaData(TType.STRUCT)));
8998
    }});
8999
 
9000
    static {
553 chandransh 9001
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 9002
    }
9003
 
553 chandransh 9004
    public addAddressForUser_result() {
123 ashish 9005
    }
9006
 
553 chandransh 9007
    public addAddressForUser_result(
571 rajveer 9008
      long success,
553 chandransh 9009
      UserContextException ucx)
123 ashish 9010
    {
9011
      this();
9012
      this.success = success;
9013
      setSuccessIsSet(true);
553 chandransh 9014
      this.ucx = ucx;
123 ashish 9015
    }
9016
 
9017
    /**
9018
     * Performs a deep copy on <i>other</i>.
9019
     */
553 chandransh 9020
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 9021
      __isset_bit_vector.clear();
9022
      __isset_bit_vector.or(other.__isset_bit_vector);
9023
      this.success = other.success;
553 chandransh 9024
      if (other.isSetUcx()) {
9025
        this.ucx = new UserContextException(other.ucx);
123 ashish 9026
      }
9027
    }
9028
 
553 chandransh 9029
    public addAddressForUser_result deepCopy() {
9030
      return new addAddressForUser_result(this);
123 ashish 9031
    }
9032
 
9033
    @Deprecated
553 chandransh 9034
    public addAddressForUser_result clone() {
9035
      return new addAddressForUser_result(this);
123 ashish 9036
    }
9037
 
571 rajveer 9038
    public long getSuccess() {
123 ashish 9039
      return this.success;
9040
    }
9041
 
571 rajveer 9042
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9043
      this.success = success;
9044
      setSuccessIsSet(true);
9045
      return this;
9046
    }
9047
 
9048
    public void unsetSuccess() {
9049
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9050
    }
9051
 
9052
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9053
    public boolean isSetSuccess() {
9054
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9055
    }
9056
 
9057
    public void setSuccessIsSet(boolean value) {
9058
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9059
    }
9060
 
553 chandransh 9061
    public UserContextException getUcx() {
9062
      return this.ucx;
123 ashish 9063
    }
9064
 
553 chandransh 9065
    public addAddressForUser_result setUcx(UserContextException ucx) {
9066
      this.ucx = ucx;
123 ashish 9067
      return this;
9068
    }
9069
 
553 chandransh 9070
    public void unsetUcx() {
9071
      this.ucx = null;
123 ashish 9072
    }
9073
 
553 chandransh 9074
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9075
    public boolean isSetUcx() {
9076
      return this.ucx != null;
123 ashish 9077
    }
9078
 
553 chandransh 9079
    public void setUcxIsSet(boolean value) {
123 ashish 9080
      if (!value) {
553 chandransh 9081
        this.ucx = null;
123 ashish 9082
      }
9083
    }
9084
 
9085
    public void setFieldValue(_Fields field, Object value) {
9086
      switch (field) {
9087
      case SUCCESS:
9088
        if (value == null) {
9089
          unsetSuccess();
9090
        } else {
571 rajveer 9091
          setSuccess((Long)value);
123 ashish 9092
        }
9093
        break;
9094
 
553 chandransh 9095
      case UCX:
123 ashish 9096
        if (value == null) {
553 chandransh 9097
          unsetUcx();
123 ashish 9098
        } else {
553 chandransh 9099
          setUcx((UserContextException)value);
123 ashish 9100
        }
9101
        break;
9102
 
9103
      }
9104
    }
9105
 
9106
    public void setFieldValue(int fieldID, Object value) {
9107
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9108
    }
9109
 
9110
    public Object getFieldValue(_Fields field) {
9111
      switch (field) {
9112
      case SUCCESS:
571 rajveer 9113
        return new Long(getSuccess());
123 ashish 9114
 
553 chandransh 9115
      case UCX:
9116
        return getUcx();
123 ashish 9117
 
9118
      }
9119
      throw new IllegalStateException();
9120
    }
9121
 
9122
    public Object getFieldValue(int fieldId) {
9123
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9124
    }
9125
 
9126
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9127
    public boolean isSet(_Fields field) {
9128
      switch (field) {
9129
      case SUCCESS:
9130
        return isSetSuccess();
553 chandransh 9131
      case UCX:
9132
        return isSetUcx();
123 ashish 9133
      }
9134
      throw new IllegalStateException();
9135
    }
9136
 
9137
    public boolean isSet(int fieldID) {
9138
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9139
    }
9140
 
9141
    @Override
9142
    public boolean equals(Object that) {
9143
      if (that == null)
9144
        return false;
553 chandransh 9145
      if (that instanceof addAddressForUser_result)
9146
        return this.equals((addAddressForUser_result)that);
123 ashish 9147
      return false;
9148
    }
9149
 
553 chandransh 9150
    public boolean equals(addAddressForUser_result that) {
123 ashish 9151
      if (that == null)
9152
        return false;
9153
 
9154
      boolean this_present_success = true;
9155
      boolean that_present_success = true;
9156
      if (this_present_success || that_present_success) {
9157
        if (!(this_present_success && that_present_success))
9158
          return false;
9159
        if (this.success != that.success)
9160
          return false;
9161
      }
9162
 
553 chandransh 9163
      boolean this_present_ucx = true && this.isSetUcx();
9164
      boolean that_present_ucx = true && that.isSetUcx();
9165
      if (this_present_ucx || that_present_ucx) {
9166
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9167
          return false;
553 chandransh 9168
        if (!this.ucx.equals(that.ucx))
123 ashish 9169
          return false;
9170
      }
9171
 
9172
      return true;
9173
    }
9174
 
9175
    @Override
9176
    public int hashCode() {
9177
      return 0;
9178
    }
9179
 
553 chandransh 9180
    public int compareTo(addAddressForUser_result other) {
123 ashish 9181
      if (!getClass().equals(other.getClass())) {
9182
        return getClass().getName().compareTo(other.getClass().getName());
9183
      }
9184
 
9185
      int lastComparison = 0;
553 chandransh 9186
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9187
 
9188
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9189
      if (lastComparison != 0) {
9190
        return lastComparison;
9191
      }
9192
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9193
      if (lastComparison != 0) {
9194
        return lastComparison;
9195
      }
553 chandransh 9196
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9197
      if (lastComparison != 0) {
9198
        return lastComparison;
9199
      }
553 chandransh 9200
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9201
      if (lastComparison != 0) {
9202
        return lastComparison;
9203
      }
9204
      return 0;
9205
    }
9206
 
9207
    public void read(TProtocol iprot) throws TException {
9208
      TField field;
9209
      iprot.readStructBegin();
9210
      while (true)
9211
      {
9212
        field = iprot.readFieldBegin();
9213
        if (field.type == TType.STOP) { 
9214
          break;
9215
        }
9216
        _Fields fieldId = _Fields.findByThriftId(field.id);
9217
        if (fieldId == null) {
9218
          TProtocolUtil.skip(iprot, field.type);
9219
        } else {
9220
          switch (fieldId) {
9221
            case SUCCESS:
571 rajveer 9222
              if (field.type == TType.I64) {
9223
                this.success = iprot.readI64();
123 ashish 9224
                setSuccessIsSet(true);
9225
              } else { 
9226
                TProtocolUtil.skip(iprot, field.type);
9227
              }
9228
              break;
553 chandransh 9229
            case UCX:
123 ashish 9230
              if (field.type == TType.STRUCT) {
553 chandransh 9231
                this.ucx = new UserContextException();
9232
                this.ucx.read(iprot);
123 ashish 9233
              } else { 
9234
                TProtocolUtil.skip(iprot, field.type);
9235
              }
9236
              break;
9237
          }
9238
          iprot.readFieldEnd();
9239
        }
9240
      }
9241
      iprot.readStructEnd();
9242
      validate();
9243
    }
9244
 
9245
    public void write(TProtocol oprot) throws TException {
9246
      oprot.writeStructBegin(STRUCT_DESC);
9247
 
9248
      if (this.isSetSuccess()) {
9249
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9250
        oprot.writeI64(this.success);
123 ashish 9251
        oprot.writeFieldEnd();
553 chandransh 9252
      } else if (this.isSetUcx()) {
9253
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9254
        this.ucx.write(oprot);
123 ashish 9255
        oprot.writeFieldEnd();
9256
      }
9257
      oprot.writeFieldStop();
9258
      oprot.writeStructEnd();
9259
    }
9260
 
9261
    @Override
9262
    public String toString() {
553 chandransh 9263
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9264
      boolean first = true;
9265
 
9266
      sb.append("success:");
9267
      sb.append(this.success);
9268
      first = false;
9269
      if (!first) sb.append(", ");
553 chandransh 9270
      sb.append("ucx:");
9271
      if (this.ucx == null) {
123 ashish 9272
        sb.append("null");
9273
      } else {
553 chandransh 9274
        sb.append(this.ucx);
123 ashish 9275
      }
9276
      first = false;
9277
      sb.append(")");
9278
      return sb.toString();
9279
    }
9280
 
9281
    public void validate() throws TException {
9282
      // check for required fields
9283
    }
9284
 
9285
  }
9286
 
553 chandransh 9287
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9288
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9289
 
553 chandransh 9290
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9291
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9292
 
553 chandransh 9293
    private long userid;
9294
    private long addressId;
48 ashish 9295
 
9296
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9297
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9298
      USERID((short)1, "userid"),
9299
      ADDRESS_ID((short)2, "addressId");
48 ashish 9300
 
9301
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9302
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9303
 
9304
      static {
9305
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9306
          byId.put((int)field._thriftId, field);
9307
          byName.put(field.getFieldName(), field);
9308
        }
9309
      }
9310
 
9311
      /**
9312
       * Find the _Fields constant that matches fieldId, or null if its not found.
9313
       */
9314
      public static _Fields findByThriftId(int fieldId) {
9315
        return byId.get(fieldId);
9316
      }
9317
 
9318
      /**
9319
       * Find the _Fields constant that matches fieldId, throwing an exception
9320
       * if it is not found.
9321
       */
9322
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9323
        _Fields fields = findByThriftId(fieldId);
9324
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9325
        return fields;
9326
      }
9327
 
9328
      /**
9329
       * Find the _Fields constant that matches name, or null if its not found.
9330
       */
9331
      public static _Fields findByName(String name) {
9332
        return byName.get(name);
9333
      }
9334
 
9335
      private final short _thriftId;
9336
      private final String _fieldName;
9337
 
9338
      _Fields(short thriftId, String fieldName) {
9339
        _thriftId = thriftId;
9340
        _fieldName = fieldName;
9341
      }
9342
 
9343
      public short getThriftFieldId() {
9344
        return _thriftId;
9345
      }
9346
 
9347
      public String getFieldName() {
9348
        return _fieldName;
9349
      }
9350
    }
9351
 
9352
    // isset id assignments
553 chandransh 9353
    private static final int __USERID_ISSET_ID = 0;
9354
    private static final int __ADDRESSID_ISSET_ID = 1;
9355
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9356
 
9357
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9358
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9359
          new FieldValueMetaData(TType.I64)));
9360
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9361
          new FieldValueMetaData(TType.I64)));
48 ashish 9362
    }});
9363
 
9364
    static {
553 chandransh 9365
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9366
    }
9367
 
553 chandransh 9368
    public removeAddressForUser_args() {
48 ashish 9369
    }
9370
 
553 chandransh 9371
    public removeAddressForUser_args(
9372
      long userid,
9373
      long addressId)
48 ashish 9374
    {
9375
      this();
553 chandransh 9376
      this.userid = userid;
9377
      setUseridIsSet(true);
9378
      this.addressId = addressId;
9379
      setAddressIdIsSet(true);
48 ashish 9380
    }
9381
 
9382
    /**
9383
     * Performs a deep copy on <i>other</i>.
9384
     */
553 chandransh 9385
    public removeAddressForUser_args(removeAddressForUser_args other) {
9386
      __isset_bit_vector.clear();
9387
      __isset_bit_vector.or(other.__isset_bit_vector);
9388
      this.userid = other.userid;
9389
      this.addressId = other.addressId;
48 ashish 9390
    }
9391
 
553 chandransh 9392
    public removeAddressForUser_args deepCopy() {
9393
      return new removeAddressForUser_args(this);
48 ashish 9394
    }
9395
 
9396
    @Deprecated
553 chandransh 9397
    public removeAddressForUser_args clone() {
9398
      return new removeAddressForUser_args(this);
48 ashish 9399
    }
9400
 
553 chandransh 9401
    public long getUserid() {
9402
      return this.userid;
48 ashish 9403
    }
9404
 
553 chandransh 9405
    public removeAddressForUser_args setUserid(long userid) {
9406
      this.userid = userid;
9407
      setUseridIsSet(true);
48 ashish 9408
      return this;
9409
    }
9410
 
553 chandransh 9411
    public void unsetUserid() {
9412
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9413
    }
9414
 
553 chandransh 9415
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9416
    public boolean isSetUserid() {
9417
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9418
    }
9419
 
553 chandransh 9420
    public void setUseridIsSet(boolean value) {
9421
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9422
    }
9423
 
553 chandransh 9424
    public long getAddressId() {
9425
      return this.addressId;
9426
    }
9427
 
9428
    public removeAddressForUser_args setAddressId(long addressId) {
9429
      this.addressId = addressId;
9430
      setAddressIdIsSet(true);
9431
      return this;
9432
    }
9433
 
9434
    public void unsetAddressId() {
9435
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9436
    }
9437
 
9438
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9439
    public boolean isSetAddressId() {
9440
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9441
    }
9442
 
9443
    public void setAddressIdIsSet(boolean value) {
9444
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9445
    }
9446
 
48 ashish 9447
    public void setFieldValue(_Fields field, Object value) {
9448
      switch (field) {
553 chandransh 9449
      case USERID:
48 ashish 9450
        if (value == null) {
553 chandransh 9451
          unsetUserid();
48 ashish 9452
        } else {
553 chandransh 9453
          setUserid((Long)value);
48 ashish 9454
        }
9455
        break;
9456
 
553 chandransh 9457
      case ADDRESS_ID:
9458
        if (value == null) {
9459
          unsetAddressId();
9460
        } else {
9461
          setAddressId((Long)value);
9462
        }
9463
        break;
9464
 
48 ashish 9465
      }
9466
    }
9467
 
9468
    public void setFieldValue(int fieldID, Object value) {
9469
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9470
    }
9471
 
9472
    public Object getFieldValue(_Fields field) {
9473
      switch (field) {
553 chandransh 9474
      case USERID:
9475
        return new Long(getUserid());
48 ashish 9476
 
553 chandransh 9477
      case ADDRESS_ID:
9478
        return new Long(getAddressId());
9479
 
48 ashish 9480
      }
9481
      throw new IllegalStateException();
9482
    }
9483
 
9484
    public Object getFieldValue(int fieldId) {
9485
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9486
    }
9487
 
9488
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9489
    public boolean isSet(_Fields field) {
9490
      switch (field) {
553 chandransh 9491
      case USERID:
9492
        return isSetUserid();
9493
      case ADDRESS_ID:
9494
        return isSetAddressId();
48 ashish 9495
      }
9496
      throw new IllegalStateException();
9497
    }
9498
 
9499
    public boolean isSet(int fieldID) {
9500
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9501
    }
9502
 
9503
    @Override
9504
    public boolean equals(Object that) {
9505
      if (that == null)
9506
        return false;
553 chandransh 9507
      if (that instanceof removeAddressForUser_args)
9508
        return this.equals((removeAddressForUser_args)that);
48 ashish 9509
      return false;
9510
    }
9511
 
553 chandransh 9512
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9513
      if (that == null)
9514
        return false;
9515
 
553 chandransh 9516
      boolean this_present_userid = true;
9517
      boolean that_present_userid = true;
9518
      if (this_present_userid || that_present_userid) {
9519
        if (!(this_present_userid && that_present_userid))
48 ashish 9520
          return false;
553 chandransh 9521
        if (this.userid != that.userid)
48 ashish 9522
          return false;
9523
      }
9524
 
553 chandransh 9525
      boolean this_present_addressId = true;
9526
      boolean that_present_addressId = true;
9527
      if (this_present_addressId || that_present_addressId) {
9528
        if (!(this_present_addressId && that_present_addressId))
9529
          return false;
9530
        if (this.addressId != that.addressId)
9531
          return false;
9532
      }
9533
 
48 ashish 9534
      return true;
9535
    }
9536
 
9537
    @Override
9538
    public int hashCode() {
9539
      return 0;
9540
    }
9541
 
553 chandransh 9542
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9543
      if (!getClass().equals(other.getClass())) {
9544
        return getClass().getName().compareTo(other.getClass().getName());
9545
      }
9546
 
9547
      int lastComparison = 0;
553 chandransh 9548
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9549
 
553 chandransh 9550
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9551
      if (lastComparison != 0) {
9552
        return lastComparison;
9553
      }
553 chandransh 9554
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9555
      if (lastComparison != 0) {
9556
        return lastComparison;
9557
      }
553 chandransh 9558
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9559
      if (lastComparison != 0) {
9560
        return lastComparison;
9561
      }
9562
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9563
      if (lastComparison != 0) {
9564
        return lastComparison;
9565
      }
48 ashish 9566
      return 0;
9567
    }
9568
 
9569
    public void read(TProtocol iprot) throws TException {
9570
      TField field;
9571
      iprot.readStructBegin();
9572
      while (true)
9573
      {
9574
        field = iprot.readFieldBegin();
9575
        if (field.type == TType.STOP) { 
9576
          break;
9577
        }
9578
        _Fields fieldId = _Fields.findByThriftId(field.id);
9579
        if (fieldId == null) {
9580
          TProtocolUtil.skip(iprot, field.type);
9581
        } else {
9582
          switch (fieldId) {
553 chandransh 9583
            case USERID:
9584
              if (field.type == TType.I64) {
9585
                this.userid = iprot.readI64();
9586
                setUseridIsSet(true);
48 ashish 9587
              } else { 
9588
                TProtocolUtil.skip(iprot, field.type);
9589
              }
9590
              break;
553 chandransh 9591
            case ADDRESS_ID:
9592
              if (field.type == TType.I64) {
9593
                this.addressId = iprot.readI64();
9594
                setAddressIdIsSet(true);
9595
              } else { 
9596
                TProtocolUtil.skip(iprot, field.type);
9597
              }
9598
              break;
48 ashish 9599
          }
9600
          iprot.readFieldEnd();
9601
        }
9602
      }
9603
      iprot.readStructEnd();
9604
      validate();
9605
    }
9606
 
9607
    public void write(TProtocol oprot) throws TException {
9608
      validate();
9609
 
9610
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9611
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9612
      oprot.writeI64(this.userid);
9613
      oprot.writeFieldEnd();
9614
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9615
      oprot.writeI64(this.addressId);
9616
      oprot.writeFieldEnd();
48 ashish 9617
      oprot.writeFieldStop();
9618
      oprot.writeStructEnd();
9619
    }
9620
 
9621
    @Override
9622
    public String toString() {
553 chandransh 9623
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9624
      boolean first = true;
9625
 
553 chandransh 9626
      sb.append("userid:");
9627
      sb.append(this.userid);
48 ashish 9628
      first = false;
553 chandransh 9629
      if (!first) sb.append(", ");
9630
      sb.append("addressId:");
9631
      sb.append(this.addressId);
9632
      first = false;
48 ashish 9633
      sb.append(")");
9634
      return sb.toString();
9635
    }
9636
 
9637
    public void validate() throws TException {
9638
      // check for required fields
9639
    }
9640
 
9641
  }
9642
 
553 chandransh 9643
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9644
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9645
 
9646
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9647
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9648
 
9649
    private boolean success;
9650
    private UserContextException ucx;
9651
 
9652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9653
    public enum _Fields implements TFieldIdEnum {
9654
      SUCCESS((short)0, "success"),
9655
      UCX((short)1, "ucx");
9656
 
9657
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9658
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9659
 
9660
      static {
9661
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9662
          byId.put((int)field._thriftId, field);
9663
          byName.put(field.getFieldName(), field);
9664
        }
9665
      }
9666
 
9667
      /**
9668
       * Find the _Fields constant that matches fieldId, or null if its not found.
9669
       */
9670
      public static _Fields findByThriftId(int fieldId) {
9671
        return byId.get(fieldId);
9672
      }
9673
 
9674
      /**
9675
       * Find the _Fields constant that matches fieldId, throwing an exception
9676
       * if it is not found.
9677
       */
9678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9679
        _Fields fields = findByThriftId(fieldId);
9680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9681
        return fields;
9682
      }
9683
 
9684
      /**
9685
       * Find the _Fields constant that matches name, or null if its not found.
9686
       */
9687
      public static _Fields findByName(String name) {
9688
        return byName.get(name);
9689
      }
9690
 
9691
      private final short _thriftId;
9692
      private final String _fieldName;
9693
 
9694
      _Fields(short thriftId, String fieldName) {
9695
        _thriftId = thriftId;
9696
        _fieldName = fieldName;
9697
      }
9698
 
9699
      public short getThriftFieldId() {
9700
        return _thriftId;
9701
      }
9702
 
9703
      public String getFieldName() {
9704
        return _fieldName;
9705
      }
9706
    }
9707
 
9708
    // isset id assignments
9709
    private static final int __SUCCESS_ISSET_ID = 0;
9710
    private BitSet __isset_bit_vector = new BitSet(1);
9711
 
9712
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9713
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9714
          new FieldValueMetaData(TType.BOOL)));
9715
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9716
          new FieldValueMetaData(TType.STRUCT)));
9717
    }});
9718
 
9719
    static {
553 chandransh 9720
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9721
    }
9722
 
553 chandransh 9723
    public removeAddressForUser_result() {
48 ashish 9724
    }
9725
 
553 chandransh 9726
    public removeAddressForUser_result(
48 ashish 9727
      boolean success,
9728
      UserContextException ucx)
9729
    {
9730
      this();
9731
      this.success = success;
9732
      setSuccessIsSet(true);
9733
      this.ucx = ucx;
9734
    }
9735
 
9736
    /**
9737
     * Performs a deep copy on <i>other</i>.
9738
     */
553 chandransh 9739
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9740
      __isset_bit_vector.clear();
9741
      __isset_bit_vector.or(other.__isset_bit_vector);
9742
      this.success = other.success;
9743
      if (other.isSetUcx()) {
9744
        this.ucx = new UserContextException(other.ucx);
9745
      }
9746
    }
9747
 
553 chandransh 9748
    public removeAddressForUser_result deepCopy() {
9749
      return new removeAddressForUser_result(this);
48 ashish 9750
    }
9751
 
9752
    @Deprecated
553 chandransh 9753
    public removeAddressForUser_result clone() {
9754
      return new removeAddressForUser_result(this);
48 ashish 9755
    }
9756
 
9757
    public boolean isSuccess() {
9758
      return this.success;
9759
    }
9760
 
553 chandransh 9761
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9762
      this.success = success;
9763
      setSuccessIsSet(true);
9764
      return this;
9765
    }
9766
 
9767
    public void unsetSuccess() {
9768
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9769
    }
9770
 
9771
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9772
    public boolean isSetSuccess() {
9773
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9774
    }
9775
 
9776
    public void setSuccessIsSet(boolean value) {
9777
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9778
    }
9779
 
9780
    public UserContextException getUcx() {
9781
      return this.ucx;
9782
    }
9783
 
553 chandransh 9784
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9785
      this.ucx = ucx;
9786
      return this;
9787
    }
9788
 
9789
    public void unsetUcx() {
9790
      this.ucx = null;
9791
    }
9792
 
9793
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9794
    public boolean isSetUcx() {
9795
      return this.ucx != null;
9796
    }
9797
 
9798
    public void setUcxIsSet(boolean value) {
9799
      if (!value) {
9800
        this.ucx = null;
9801
      }
9802
    }
9803
 
9804
    public void setFieldValue(_Fields field, Object value) {
9805
      switch (field) {
9806
      case SUCCESS:
9807
        if (value == null) {
9808
          unsetSuccess();
9809
        } else {
9810
          setSuccess((Boolean)value);
9811
        }
9812
        break;
9813
 
9814
      case UCX:
9815
        if (value == null) {
9816
          unsetUcx();
9817
        } else {
9818
          setUcx((UserContextException)value);
9819
        }
9820
        break;
9821
 
9822
      }
9823
    }
9824
 
9825
    public void setFieldValue(int fieldID, Object value) {
9826
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9827
    }
9828
 
9829
    public Object getFieldValue(_Fields field) {
9830
      switch (field) {
9831
      case SUCCESS:
9832
        return new Boolean(isSuccess());
9833
 
9834
      case UCX:
9835
        return getUcx();
9836
 
9837
      }
9838
      throw new IllegalStateException();
9839
    }
9840
 
9841
    public Object getFieldValue(int fieldId) {
9842
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9843
    }
9844
 
9845
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9846
    public boolean isSet(_Fields field) {
9847
      switch (field) {
9848
      case SUCCESS:
9849
        return isSetSuccess();
9850
      case UCX:
9851
        return isSetUcx();
9852
      }
9853
      throw new IllegalStateException();
9854
    }
9855
 
9856
    public boolean isSet(int fieldID) {
9857
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9858
    }
9859
 
9860
    @Override
9861
    public boolean equals(Object that) {
9862
      if (that == null)
9863
        return false;
553 chandransh 9864
      if (that instanceof removeAddressForUser_result)
9865
        return this.equals((removeAddressForUser_result)that);
48 ashish 9866
      return false;
9867
    }
9868
 
553 chandransh 9869
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9870
      if (that == null)
9871
        return false;
9872
 
9873
      boolean this_present_success = true;
9874
      boolean that_present_success = true;
9875
      if (this_present_success || that_present_success) {
9876
        if (!(this_present_success && that_present_success))
9877
          return false;
9878
        if (this.success != that.success)
9879
          return false;
9880
      }
9881
 
9882
      boolean this_present_ucx = true && this.isSetUcx();
9883
      boolean that_present_ucx = true && that.isSetUcx();
9884
      if (this_present_ucx || that_present_ucx) {
9885
        if (!(this_present_ucx && that_present_ucx))
9886
          return false;
9887
        if (!this.ucx.equals(that.ucx))
9888
          return false;
9889
      }
9890
 
9891
      return true;
9892
    }
9893
 
9894
    @Override
9895
    public int hashCode() {
9896
      return 0;
9897
    }
9898
 
553 chandransh 9899
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9900
      if (!getClass().equals(other.getClass())) {
9901
        return getClass().getName().compareTo(other.getClass().getName());
9902
      }
9903
 
9904
      int lastComparison = 0;
553 chandransh 9905
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9906
 
9907
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9908
      if (lastComparison != 0) {
9909
        return lastComparison;
9910
      }
9911
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9912
      if (lastComparison != 0) {
9913
        return lastComparison;
9914
      }
9915
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9916
      if (lastComparison != 0) {
9917
        return lastComparison;
9918
      }
9919
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9920
      if (lastComparison != 0) {
9921
        return lastComparison;
9922
      }
9923
      return 0;
9924
    }
9925
 
9926
    public void read(TProtocol iprot) throws TException {
9927
      TField field;
9928
      iprot.readStructBegin();
9929
      while (true)
9930
      {
9931
        field = iprot.readFieldBegin();
9932
        if (field.type == TType.STOP) { 
9933
          break;
9934
        }
9935
        _Fields fieldId = _Fields.findByThriftId(field.id);
9936
        if (fieldId == null) {
9937
          TProtocolUtil.skip(iprot, field.type);
9938
        } else {
9939
          switch (fieldId) {
9940
            case SUCCESS:
9941
              if (field.type == TType.BOOL) {
9942
                this.success = iprot.readBool();
9943
                setSuccessIsSet(true);
9944
              } else { 
9945
                TProtocolUtil.skip(iprot, field.type);
9946
              }
9947
              break;
9948
            case UCX:
9949
              if (field.type == TType.STRUCT) {
9950
                this.ucx = new UserContextException();
9951
                this.ucx.read(iprot);
9952
              } else { 
9953
                TProtocolUtil.skip(iprot, field.type);
9954
              }
9955
              break;
9956
          }
9957
          iprot.readFieldEnd();
9958
        }
9959
      }
9960
      iprot.readStructEnd();
9961
      validate();
9962
    }
9963
 
9964
    public void write(TProtocol oprot) throws TException {
9965
      oprot.writeStructBegin(STRUCT_DESC);
9966
 
9967
      if (this.isSetSuccess()) {
9968
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9969
        oprot.writeBool(this.success);
9970
        oprot.writeFieldEnd();
9971
      } else if (this.isSetUcx()) {
9972
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9973
        this.ucx.write(oprot);
9974
        oprot.writeFieldEnd();
9975
      }
9976
      oprot.writeFieldStop();
9977
      oprot.writeStructEnd();
9978
    }
9979
 
9980
    @Override
9981
    public String toString() {
553 chandransh 9982
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 9983
      boolean first = true;
9984
 
9985
      sb.append("success:");
9986
      sb.append(this.success);
9987
      first = false;
9988
      if (!first) sb.append(", ");
9989
      sb.append("ucx:");
9990
      if (this.ucx == null) {
9991
        sb.append("null");
9992
      } else {
9993
        sb.append(this.ucx);
9994
      }
9995
      first = false;
9996
      sb.append(")");
9997
      return sb.toString();
9998
    }
9999
 
10000
    public void validate() throws TException {
10001
      // check for required fields
10002
    }
10003
 
10004
  }
10005
 
553 chandransh 10006
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10007
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 10008
 
553 chandransh 10009
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 10010
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10011
 
553 chandransh 10012
    private long userId;
48 ashish 10013
    private long timestamp;
10014
 
10015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10016
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10017
      USER_ID((short)1, "userId"),
10018
      TIMESTAMP((short)2, "timestamp");
48 ashish 10019
 
10020
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10022
 
10023
      static {
10024
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10025
          byId.put((int)field._thriftId, field);
10026
          byName.put(field.getFieldName(), field);
10027
        }
10028
      }
10029
 
10030
      /**
10031
       * Find the _Fields constant that matches fieldId, or null if its not found.
10032
       */
10033
      public static _Fields findByThriftId(int fieldId) {
10034
        return byId.get(fieldId);
10035
      }
10036
 
10037
      /**
10038
       * Find the _Fields constant that matches fieldId, throwing an exception
10039
       * if it is not found.
10040
       */
10041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10042
        _Fields fields = findByThriftId(fieldId);
10043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10044
        return fields;
10045
      }
10046
 
10047
      /**
10048
       * Find the _Fields constant that matches name, or null if its not found.
10049
       */
10050
      public static _Fields findByName(String name) {
10051
        return byName.get(name);
10052
      }
10053
 
10054
      private final short _thriftId;
10055
      private final String _fieldName;
10056
 
10057
      _Fields(short thriftId, String fieldName) {
10058
        _thriftId = thriftId;
10059
        _fieldName = fieldName;
10060
      }
10061
 
10062
      public short getThriftFieldId() {
10063
        return _thriftId;
10064
      }
10065
 
10066
      public String getFieldName() {
10067
        return _fieldName;
10068
      }
10069
    }
10070
 
10071
    // isset id assignments
553 chandransh 10072
    private static final int __USERID_ISSET_ID = 0;
10073
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10074
    private BitSet __isset_bit_vector = new BitSet(2);
10075
 
10076
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10077
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10078
          new FieldValueMetaData(TType.I64)));
48 ashish 10079
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10080
          new FieldValueMetaData(TType.I64)));
10081
    }});
10082
 
10083
    static {
553 chandransh 10084
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10085
    }
10086
 
553 chandransh 10087
    public setUserAsLoggedIn_args() {
48 ashish 10088
    }
10089
 
553 chandransh 10090
    public setUserAsLoggedIn_args(
10091
      long userId,
10092
      long timestamp)
48 ashish 10093
    {
10094
      this();
553 chandransh 10095
      this.userId = userId;
10096
      setUserIdIsSet(true);
48 ashish 10097
      this.timestamp = timestamp;
10098
      setTimestampIsSet(true);
10099
    }
10100
 
10101
    /**
10102
     * Performs a deep copy on <i>other</i>.
10103
     */
553 chandransh 10104
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10105
      __isset_bit_vector.clear();
10106
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10107
      this.userId = other.userId;
48 ashish 10108
      this.timestamp = other.timestamp;
10109
    }
10110
 
553 chandransh 10111
    public setUserAsLoggedIn_args deepCopy() {
10112
      return new setUserAsLoggedIn_args(this);
48 ashish 10113
    }
10114
 
10115
    @Deprecated
553 chandransh 10116
    public setUserAsLoggedIn_args clone() {
10117
      return new setUserAsLoggedIn_args(this);
48 ashish 10118
    }
10119
 
553 chandransh 10120
    public long getUserId() {
10121
      return this.userId;
48 ashish 10122
    }
10123
 
553 chandransh 10124
    public setUserAsLoggedIn_args setUserId(long userId) {
10125
      this.userId = userId;
10126
      setUserIdIsSet(true);
48 ashish 10127
      return this;
10128
    }
10129
 
553 chandransh 10130
    public void unsetUserId() {
10131
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10132
    }
10133
 
553 chandransh 10134
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10135
    public boolean isSetUserId() {
10136
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10137
    }
10138
 
553 chandransh 10139
    public void setUserIdIsSet(boolean value) {
10140
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10141
    }
10142
 
10143
    public long getTimestamp() {
10144
      return this.timestamp;
10145
    }
10146
 
553 chandransh 10147
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10148
      this.timestamp = timestamp;
10149
      setTimestampIsSet(true);
10150
      return this;
10151
    }
10152
 
10153
    public void unsetTimestamp() {
10154
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10155
    }
10156
 
10157
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10158
    public boolean isSetTimestamp() {
10159
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10160
    }
10161
 
10162
    public void setTimestampIsSet(boolean value) {
10163
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10164
    }
10165
 
10166
    public void setFieldValue(_Fields field, Object value) {
10167
      switch (field) {
553 chandransh 10168
      case USER_ID:
48 ashish 10169
        if (value == null) {
553 chandransh 10170
          unsetUserId();
48 ashish 10171
        } else {
553 chandransh 10172
          setUserId((Long)value);
48 ashish 10173
        }
10174
        break;
10175
 
10176
      case TIMESTAMP:
10177
        if (value == null) {
10178
          unsetTimestamp();
10179
        } else {
10180
          setTimestamp((Long)value);
10181
        }
10182
        break;
10183
 
10184
      }
10185
    }
10186
 
10187
    public void setFieldValue(int fieldID, Object value) {
10188
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10189
    }
10190
 
10191
    public Object getFieldValue(_Fields field) {
10192
      switch (field) {
553 chandransh 10193
      case USER_ID:
10194
        return new Long(getUserId());
48 ashish 10195
 
10196
      case TIMESTAMP:
10197
        return new Long(getTimestamp());
10198
 
10199
      }
10200
      throw new IllegalStateException();
10201
    }
10202
 
10203
    public Object getFieldValue(int fieldId) {
10204
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10205
    }
10206
 
10207
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10208
    public boolean isSet(_Fields field) {
10209
      switch (field) {
553 chandransh 10210
      case USER_ID:
10211
        return isSetUserId();
48 ashish 10212
      case TIMESTAMP:
10213
        return isSetTimestamp();
10214
      }
10215
      throw new IllegalStateException();
10216
    }
10217
 
10218
    public boolean isSet(int fieldID) {
10219
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10220
    }
10221
 
10222
    @Override
10223
    public boolean equals(Object that) {
10224
      if (that == null)
10225
        return false;
553 chandransh 10226
      if (that instanceof setUserAsLoggedIn_args)
10227
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10228
      return false;
10229
    }
10230
 
553 chandransh 10231
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10232
      if (that == null)
10233
        return false;
10234
 
553 chandransh 10235
      boolean this_present_userId = true;
10236
      boolean that_present_userId = true;
10237
      if (this_present_userId || that_present_userId) {
10238
        if (!(this_present_userId && that_present_userId))
48 ashish 10239
          return false;
553 chandransh 10240
        if (this.userId != that.userId)
48 ashish 10241
          return false;
10242
      }
10243
 
10244
      boolean this_present_timestamp = true;
10245
      boolean that_present_timestamp = true;
10246
      if (this_present_timestamp || that_present_timestamp) {
10247
        if (!(this_present_timestamp && that_present_timestamp))
10248
          return false;
10249
        if (this.timestamp != that.timestamp)
10250
          return false;
10251
      }
10252
 
10253
      return true;
10254
    }
10255
 
10256
    @Override
10257
    public int hashCode() {
10258
      return 0;
10259
    }
10260
 
553 chandransh 10261
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10262
      if (!getClass().equals(other.getClass())) {
10263
        return getClass().getName().compareTo(other.getClass().getName());
10264
      }
10265
 
10266
      int lastComparison = 0;
553 chandransh 10267
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10268
 
553 chandransh 10269
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10270
      if (lastComparison != 0) {
10271
        return lastComparison;
10272
      }
553 chandransh 10273
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10274
      if (lastComparison != 0) {
10275
        return lastComparison;
10276
      }
10277
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10278
      if (lastComparison != 0) {
10279
        return lastComparison;
10280
      }
10281
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10282
      if (lastComparison != 0) {
10283
        return lastComparison;
10284
      }
10285
      return 0;
10286
    }
10287
 
10288
    public void read(TProtocol iprot) throws TException {
10289
      TField field;
10290
      iprot.readStructBegin();
10291
      while (true)
10292
      {
10293
        field = iprot.readFieldBegin();
10294
        if (field.type == TType.STOP) { 
10295
          break;
10296
        }
10297
        _Fields fieldId = _Fields.findByThriftId(field.id);
10298
        if (fieldId == null) {
10299
          TProtocolUtil.skip(iprot, field.type);
10300
        } else {
10301
          switch (fieldId) {
553 chandransh 10302
            case USER_ID:
10303
              if (field.type == TType.I64) {
10304
                this.userId = iprot.readI64();
10305
                setUserIdIsSet(true);
48 ashish 10306
              } else { 
10307
                TProtocolUtil.skip(iprot, field.type);
10308
              }
10309
              break;
10310
            case TIMESTAMP:
10311
              if (field.type == TType.I64) {
10312
                this.timestamp = iprot.readI64();
10313
                setTimestampIsSet(true);
10314
              } else { 
10315
                TProtocolUtil.skip(iprot, field.type);
10316
              }
10317
              break;
10318
          }
10319
          iprot.readFieldEnd();
10320
        }
10321
      }
10322
      iprot.readStructEnd();
10323
      validate();
10324
    }
10325
 
10326
    public void write(TProtocol oprot) throws TException {
10327
      validate();
10328
 
10329
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10330
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10331
      oprot.writeI64(this.userId);
10332
      oprot.writeFieldEnd();
48 ashish 10333
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10334
      oprot.writeI64(this.timestamp);
10335
      oprot.writeFieldEnd();
10336
      oprot.writeFieldStop();
10337
      oprot.writeStructEnd();
10338
    }
10339
 
10340
    @Override
10341
    public String toString() {
553 chandransh 10342
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10343
      boolean first = true;
10344
 
553 chandransh 10345
      sb.append("userId:");
10346
      sb.append(this.userId);
48 ashish 10347
      first = false;
10348
      if (!first) sb.append(", ");
10349
      sb.append("timestamp:");
10350
      sb.append(this.timestamp);
10351
      first = false;
10352
      sb.append(")");
10353
      return sb.toString();
10354
    }
10355
 
10356
    public void validate() throws TException {
10357
      // check for required fields
10358
    }
10359
 
10360
  }
10361
 
553 chandransh 10362
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10363
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10364
 
10365
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10366
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10367
 
10368
    private boolean success;
10369
    private UserContextException ucx;
10370
 
10371
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10372
    public enum _Fields implements TFieldIdEnum {
10373
      SUCCESS((short)0, "success"),
10374
      UCX((short)1, "ucx");
10375
 
10376
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10377
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10378
 
10379
      static {
10380
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10381
          byId.put((int)field._thriftId, field);
10382
          byName.put(field.getFieldName(), field);
10383
        }
10384
      }
10385
 
10386
      /**
10387
       * Find the _Fields constant that matches fieldId, or null if its not found.
10388
       */
10389
      public static _Fields findByThriftId(int fieldId) {
10390
        return byId.get(fieldId);
10391
      }
10392
 
10393
      /**
10394
       * Find the _Fields constant that matches fieldId, throwing an exception
10395
       * if it is not found.
10396
       */
10397
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10398
        _Fields fields = findByThriftId(fieldId);
10399
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10400
        return fields;
10401
      }
10402
 
10403
      /**
10404
       * Find the _Fields constant that matches name, or null if its not found.
10405
       */
10406
      public static _Fields findByName(String name) {
10407
        return byName.get(name);
10408
      }
10409
 
10410
      private final short _thriftId;
10411
      private final String _fieldName;
10412
 
10413
      _Fields(short thriftId, String fieldName) {
10414
        _thriftId = thriftId;
10415
        _fieldName = fieldName;
10416
      }
10417
 
10418
      public short getThriftFieldId() {
10419
        return _thriftId;
10420
      }
10421
 
10422
      public String getFieldName() {
10423
        return _fieldName;
10424
      }
10425
    }
10426
 
10427
    // isset id assignments
10428
    private static final int __SUCCESS_ISSET_ID = 0;
10429
    private BitSet __isset_bit_vector = new BitSet(1);
10430
 
10431
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10432
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10433
          new FieldValueMetaData(TType.BOOL)));
10434
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10435
          new FieldValueMetaData(TType.STRUCT)));
10436
    }});
10437
 
10438
    static {
553 chandransh 10439
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10440
    }
10441
 
553 chandransh 10442
    public setUserAsLoggedIn_result() {
48 ashish 10443
    }
10444
 
553 chandransh 10445
    public setUserAsLoggedIn_result(
48 ashish 10446
      boolean success,
10447
      UserContextException ucx)
10448
    {
10449
      this();
10450
      this.success = success;
10451
      setSuccessIsSet(true);
10452
      this.ucx = ucx;
10453
    }
10454
 
10455
    /**
10456
     * Performs a deep copy on <i>other</i>.
10457
     */
553 chandransh 10458
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10459
      __isset_bit_vector.clear();
10460
      __isset_bit_vector.or(other.__isset_bit_vector);
10461
      this.success = other.success;
10462
      if (other.isSetUcx()) {
10463
        this.ucx = new UserContextException(other.ucx);
10464
      }
10465
    }
10466
 
553 chandransh 10467
    public setUserAsLoggedIn_result deepCopy() {
10468
      return new setUserAsLoggedIn_result(this);
48 ashish 10469
    }
10470
 
10471
    @Deprecated
553 chandransh 10472
    public setUserAsLoggedIn_result clone() {
10473
      return new setUserAsLoggedIn_result(this);
48 ashish 10474
    }
10475
 
10476
    public boolean isSuccess() {
10477
      return this.success;
10478
    }
10479
 
553 chandransh 10480
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10481
      this.success = success;
10482
      setSuccessIsSet(true);
10483
      return this;
10484
    }
10485
 
10486
    public void unsetSuccess() {
10487
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10488
    }
10489
 
10490
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10491
    public boolean isSetSuccess() {
10492
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10493
    }
10494
 
10495
    public void setSuccessIsSet(boolean value) {
10496
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10497
    }
10498
 
10499
    public UserContextException getUcx() {
10500
      return this.ucx;
10501
    }
10502
 
553 chandransh 10503
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10504
      this.ucx = ucx;
10505
      return this;
10506
    }
10507
 
10508
    public void unsetUcx() {
10509
      this.ucx = null;
10510
    }
10511
 
10512
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10513
    public boolean isSetUcx() {
10514
      return this.ucx != null;
10515
    }
10516
 
10517
    public void setUcxIsSet(boolean value) {
10518
      if (!value) {
10519
        this.ucx = null;
10520
      }
10521
    }
10522
 
10523
    public void setFieldValue(_Fields field, Object value) {
10524
      switch (field) {
10525
      case SUCCESS:
10526
        if (value == null) {
10527
          unsetSuccess();
10528
        } else {
10529
          setSuccess((Boolean)value);
10530
        }
10531
        break;
10532
 
10533
      case UCX:
10534
        if (value == null) {
10535
          unsetUcx();
10536
        } else {
10537
          setUcx((UserContextException)value);
10538
        }
10539
        break;
10540
 
10541
      }
10542
    }
10543
 
10544
    public void setFieldValue(int fieldID, Object value) {
10545
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10546
    }
10547
 
10548
    public Object getFieldValue(_Fields field) {
10549
      switch (field) {
10550
      case SUCCESS:
10551
        return new Boolean(isSuccess());
10552
 
10553
      case UCX:
10554
        return getUcx();
10555
 
10556
      }
10557
      throw new IllegalStateException();
10558
    }
10559
 
10560
    public Object getFieldValue(int fieldId) {
10561
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10562
    }
10563
 
10564
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10565
    public boolean isSet(_Fields field) {
10566
      switch (field) {
10567
      case SUCCESS:
10568
        return isSetSuccess();
10569
      case UCX:
10570
        return isSetUcx();
10571
      }
10572
      throw new IllegalStateException();
10573
    }
10574
 
10575
    public boolean isSet(int fieldID) {
10576
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10577
    }
10578
 
10579
    @Override
10580
    public boolean equals(Object that) {
10581
      if (that == null)
10582
        return false;
553 chandransh 10583
      if (that instanceof setUserAsLoggedIn_result)
10584
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10585
      return false;
10586
    }
10587
 
553 chandransh 10588
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10589
      if (that == null)
10590
        return false;
10591
 
10592
      boolean this_present_success = true;
10593
      boolean that_present_success = true;
10594
      if (this_present_success || that_present_success) {
10595
        if (!(this_present_success && that_present_success))
10596
          return false;
10597
        if (this.success != that.success)
10598
          return false;
10599
      }
10600
 
10601
      boolean this_present_ucx = true && this.isSetUcx();
10602
      boolean that_present_ucx = true && that.isSetUcx();
10603
      if (this_present_ucx || that_present_ucx) {
10604
        if (!(this_present_ucx && that_present_ucx))
10605
          return false;
10606
        if (!this.ucx.equals(that.ucx))
10607
          return false;
10608
      }
10609
 
10610
      return true;
10611
    }
10612
 
10613
    @Override
10614
    public int hashCode() {
10615
      return 0;
10616
    }
10617
 
553 chandransh 10618
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10619
      if (!getClass().equals(other.getClass())) {
10620
        return getClass().getName().compareTo(other.getClass().getName());
10621
      }
10622
 
10623
      int lastComparison = 0;
553 chandransh 10624
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10625
 
10626
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10627
      if (lastComparison != 0) {
10628
        return lastComparison;
10629
      }
10630
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10631
      if (lastComparison != 0) {
10632
        return lastComparison;
10633
      }
10634
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10635
      if (lastComparison != 0) {
10636
        return lastComparison;
10637
      }
10638
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10639
      if (lastComparison != 0) {
10640
        return lastComparison;
10641
      }
10642
      return 0;
10643
    }
10644
 
10645
    public void read(TProtocol iprot) throws TException {
10646
      TField field;
10647
      iprot.readStructBegin();
10648
      while (true)
10649
      {
10650
        field = iprot.readFieldBegin();
10651
        if (field.type == TType.STOP) { 
10652
          break;
10653
        }
10654
        _Fields fieldId = _Fields.findByThriftId(field.id);
10655
        if (fieldId == null) {
10656
          TProtocolUtil.skip(iprot, field.type);
10657
        } else {
10658
          switch (fieldId) {
10659
            case SUCCESS:
10660
              if (field.type == TType.BOOL) {
10661
                this.success = iprot.readBool();
10662
                setSuccessIsSet(true);
10663
              } else { 
10664
                TProtocolUtil.skip(iprot, field.type);
10665
              }
10666
              break;
10667
            case UCX:
10668
              if (field.type == TType.STRUCT) {
10669
                this.ucx = new UserContextException();
10670
                this.ucx.read(iprot);
10671
              } else { 
10672
                TProtocolUtil.skip(iprot, field.type);
10673
              }
10674
              break;
10675
          }
10676
          iprot.readFieldEnd();
10677
        }
10678
      }
10679
      iprot.readStructEnd();
10680
      validate();
10681
    }
10682
 
10683
    public void write(TProtocol oprot) throws TException {
10684
      oprot.writeStructBegin(STRUCT_DESC);
10685
 
10686
      if (this.isSetSuccess()) {
10687
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10688
        oprot.writeBool(this.success);
10689
        oprot.writeFieldEnd();
10690
      } else if (this.isSetUcx()) {
10691
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10692
        this.ucx.write(oprot);
10693
        oprot.writeFieldEnd();
10694
      }
10695
      oprot.writeFieldStop();
10696
      oprot.writeStructEnd();
10697
    }
10698
 
10699
    @Override
10700
    public String toString() {
553 chandransh 10701
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10702
      boolean first = true;
10703
 
10704
      sb.append("success:");
10705
      sb.append(this.success);
10706
      first = false;
10707
      if (!first) sb.append(", ");
10708
      sb.append("ucx:");
10709
      if (this.ucx == null) {
10710
        sb.append("null");
10711
      } else {
10712
        sb.append(this.ucx);
10713
      }
10714
      first = false;
10715
      sb.append(")");
10716
      return sb.toString();
10717
    }
10718
 
10719
    public void validate() throws TException {
10720
      // check for required fields
10721
    }
10722
 
10723
  }
10724
 
553 chandransh 10725
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10726
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10727
 
553 chandransh 10728
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10729
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10730
 
10731
    private long userid;
10732
    private long timestamp;
10733
 
10734
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10735
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10736
      USERID((short)1, "userid"),
10737
      TIMESTAMP((short)2, "timestamp");
48 ashish 10738
 
10739
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10741
 
10742
      static {
10743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10744
          byId.put((int)field._thriftId, field);
10745
          byName.put(field.getFieldName(), field);
10746
        }
10747
      }
10748
 
10749
      /**
10750
       * Find the _Fields constant that matches fieldId, or null if its not found.
10751
       */
10752
      public static _Fields findByThriftId(int fieldId) {
10753
        return byId.get(fieldId);
10754
      }
10755
 
10756
      /**
10757
       * Find the _Fields constant that matches fieldId, throwing an exception
10758
       * if it is not found.
10759
       */
10760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10761
        _Fields fields = findByThriftId(fieldId);
10762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10763
        return fields;
10764
      }
10765
 
10766
      /**
10767
       * Find the _Fields constant that matches name, or null if its not found.
10768
       */
10769
      public static _Fields findByName(String name) {
10770
        return byName.get(name);
10771
      }
10772
 
10773
      private final short _thriftId;
10774
      private final String _fieldName;
10775
 
10776
      _Fields(short thriftId, String fieldName) {
10777
        _thriftId = thriftId;
10778
        _fieldName = fieldName;
10779
      }
10780
 
10781
      public short getThriftFieldId() {
10782
        return _thriftId;
10783
      }
10784
 
10785
      public String getFieldName() {
10786
        return _fieldName;
10787
      }
10788
    }
10789
 
10790
    // isset id assignments
10791
    private static final int __USERID_ISSET_ID = 0;
10792
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10793
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10794
 
10795
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10796
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10797
          new FieldValueMetaData(TType.I64)));
10798
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10799
          new FieldValueMetaData(TType.I64)));
10800
    }});
10801
 
10802
    static {
553 chandransh 10803
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10804
    }
10805
 
553 chandransh 10806
    public setUserAsLoggedOut_args() {
48 ashish 10807
    }
10808
 
553 chandransh 10809
    public setUserAsLoggedOut_args(
48 ashish 10810
      long userid,
553 chandransh 10811
      long timestamp)
48 ashish 10812
    {
10813
      this();
10814
      this.userid = userid;
10815
      setUseridIsSet(true);
10816
      this.timestamp = timestamp;
10817
      setTimestampIsSet(true);
10818
    }
10819
 
10820
    /**
10821
     * Performs a deep copy on <i>other</i>.
10822
     */
553 chandransh 10823
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10824
      __isset_bit_vector.clear();
10825
      __isset_bit_vector.or(other.__isset_bit_vector);
10826
      this.userid = other.userid;
10827
      this.timestamp = other.timestamp;
10828
    }
10829
 
553 chandransh 10830
    public setUserAsLoggedOut_args deepCopy() {
10831
      return new setUserAsLoggedOut_args(this);
48 ashish 10832
    }
10833
 
10834
    @Deprecated
553 chandransh 10835
    public setUserAsLoggedOut_args clone() {
10836
      return new setUserAsLoggedOut_args(this);
48 ashish 10837
    }
10838
 
10839
    public long getUserid() {
10840
      return this.userid;
10841
    }
10842
 
553 chandransh 10843
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10844
      this.userid = userid;
10845
      setUseridIsSet(true);
10846
      return this;
10847
    }
10848
 
10849
    public void unsetUserid() {
10850
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10851
    }
10852
 
10853
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10854
    public boolean isSetUserid() {
10855
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10856
    }
10857
 
10858
    public void setUseridIsSet(boolean value) {
10859
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10860
    }
10861
 
10862
    public long getTimestamp() {
10863
      return this.timestamp;
10864
    }
10865
 
553 chandransh 10866
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10867
      this.timestamp = timestamp;
10868
      setTimestampIsSet(true);
10869
      return this;
10870
    }
10871
 
10872
    public void unsetTimestamp() {
10873
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10874
    }
10875
 
10876
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10877
    public boolean isSetTimestamp() {
10878
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10879
    }
10880
 
10881
    public void setTimestampIsSet(boolean value) {
10882
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10883
    }
10884
 
10885
    public void setFieldValue(_Fields field, Object value) {
10886
      switch (field) {
10887
      case USERID:
10888
        if (value == null) {
10889
          unsetUserid();
10890
        } else {
10891
          setUserid((Long)value);
10892
        }
10893
        break;
10894
 
10895
      case TIMESTAMP:
10896
        if (value == null) {
10897
          unsetTimestamp();
10898
        } else {
10899
          setTimestamp((Long)value);
10900
        }
10901
        break;
10902
 
10903
      }
10904
    }
10905
 
10906
    public void setFieldValue(int fieldID, Object value) {
10907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10908
    }
10909
 
10910
    public Object getFieldValue(_Fields field) {
10911
      switch (field) {
10912
      case USERID:
10913
        return new Long(getUserid());
10914
 
10915
      case TIMESTAMP:
10916
        return new Long(getTimestamp());
10917
 
10918
      }
10919
      throw new IllegalStateException();
10920
    }
10921
 
10922
    public Object getFieldValue(int fieldId) {
10923
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10924
    }
10925
 
10926
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10927
    public boolean isSet(_Fields field) {
10928
      switch (field) {
10929
      case USERID:
10930
        return isSetUserid();
10931
      case TIMESTAMP:
10932
        return isSetTimestamp();
10933
      }
10934
      throw new IllegalStateException();
10935
    }
10936
 
10937
    public boolean isSet(int fieldID) {
10938
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10939
    }
10940
 
10941
    @Override
10942
    public boolean equals(Object that) {
10943
      if (that == null)
10944
        return false;
553 chandransh 10945
      if (that instanceof setUserAsLoggedOut_args)
10946
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10947
      return false;
10948
    }
10949
 
553 chandransh 10950
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10951
      if (that == null)
10952
        return false;
10953
 
10954
      boolean this_present_userid = true;
10955
      boolean that_present_userid = true;
10956
      if (this_present_userid || that_present_userid) {
10957
        if (!(this_present_userid && that_present_userid))
10958
          return false;
10959
        if (this.userid != that.userid)
10960
          return false;
10961
      }
10962
 
10963
      boolean this_present_timestamp = true;
10964
      boolean that_present_timestamp = true;
10965
      if (this_present_timestamp || that_present_timestamp) {
10966
        if (!(this_present_timestamp && that_present_timestamp))
10967
          return false;
10968
        if (this.timestamp != that.timestamp)
10969
          return false;
10970
      }
10971
 
10972
      return true;
10973
    }
10974
 
10975
    @Override
10976
    public int hashCode() {
10977
      return 0;
10978
    }
10979
 
553 chandransh 10980
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 10981
      if (!getClass().equals(other.getClass())) {
10982
        return getClass().getName().compareTo(other.getClass().getName());
10983
      }
10984
 
10985
      int lastComparison = 0;
553 chandransh 10986
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 10987
 
10988
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10989
      if (lastComparison != 0) {
10990
        return lastComparison;
10991
      }
10992
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10993
      if (lastComparison != 0) {
10994
        return lastComparison;
10995
      }
10996
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10997
      if (lastComparison != 0) {
10998
        return lastComparison;
10999
      }
11000
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11001
      if (lastComparison != 0) {
11002
        return lastComparison;
11003
      }
11004
      return 0;
11005
    }
11006
 
11007
    public void read(TProtocol iprot) throws TException {
11008
      TField field;
11009
      iprot.readStructBegin();
11010
      while (true)
11011
      {
11012
        field = iprot.readFieldBegin();
11013
        if (field.type == TType.STOP) { 
11014
          break;
11015
        }
11016
        _Fields fieldId = _Fields.findByThriftId(field.id);
11017
        if (fieldId == null) {
11018
          TProtocolUtil.skip(iprot, field.type);
11019
        } else {
11020
          switch (fieldId) {
11021
            case USERID:
11022
              if (field.type == TType.I64) {
11023
                this.userid = iprot.readI64();
11024
                setUseridIsSet(true);
11025
              } else { 
11026
                TProtocolUtil.skip(iprot, field.type);
11027
              }
11028
              break;
11029
            case TIMESTAMP:
11030
              if (field.type == TType.I64) {
11031
                this.timestamp = iprot.readI64();
11032
                setTimestampIsSet(true);
11033
              } else { 
11034
                TProtocolUtil.skip(iprot, field.type);
11035
              }
11036
              break;
11037
          }
11038
          iprot.readFieldEnd();
11039
        }
11040
      }
11041
      iprot.readStructEnd();
11042
      validate();
11043
    }
11044
 
11045
    public void write(TProtocol oprot) throws TException {
11046
      validate();
11047
 
11048
      oprot.writeStructBegin(STRUCT_DESC);
11049
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11050
      oprot.writeI64(this.userid);
11051
      oprot.writeFieldEnd();
11052
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11053
      oprot.writeI64(this.timestamp);
11054
      oprot.writeFieldEnd();
11055
      oprot.writeFieldStop();
11056
      oprot.writeStructEnd();
11057
    }
11058
 
11059
    @Override
11060
    public String toString() {
553 chandransh 11061
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11062
      boolean first = true;
11063
 
11064
      sb.append("userid:");
11065
      sb.append(this.userid);
11066
      first = false;
11067
      if (!first) sb.append(", ");
11068
      sb.append("timestamp:");
11069
      sb.append(this.timestamp);
11070
      first = false;
11071
      sb.append(")");
11072
      return sb.toString();
11073
    }
11074
 
11075
    public void validate() throws TException {
11076
      // check for required fields
11077
    }
11078
 
11079
  }
11080
 
553 chandransh 11081
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11082
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11083
 
11084
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11085
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11086
 
11087
    private boolean success;
11088
    private UserContextException ucx;
11089
 
11090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11091
    public enum _Fields implements TFieldIdEnum {
11092
      SUCCESS((short)0, "success"),
11093
      UCX((short)1, "ucx");
11094
 
11095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11097
 
11098
      static {
11099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11100
          byId.put((int)field._thriftId, field);
11101
          byName.put(field.getFieldName(), field);
11102
        }
11103
      }
11104
 
11105
      /**
11106
       * Find the _Fields constant that matches fieldId, or null if its not found.
11107
       */
11108
      public static _Fields findByThriftId(int fieldId) {
11109
        return byId.get(fieldId);
11110
      }
11111
 
11112
      /**
11113
       * Find the _Fields constant that matches fieldId, throwing an exception
11114
       * if it is not found.
11115
       */
11116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11117
        _Fields fields = findByThriftId(fieldId);
11118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11119
        return fields;
11120
      }
11121
 
11122
      /**
11123
       * Find the _Fields constant that matches name, or null if its not found.
11124
       */
11125
      public static _Fields findByName(String name) {
11126
        return byName.get(name);
11127
      }
11128
 
11129
      private final short _thriftId;
11130
      private final String _fieldName;
11131
 
11132
      _Fields(short thriftId, String fieldName) {
11133
        _thriftId = thriftId;
11134
        _fieldName = fieldName;
11135
      }
11136
 
11137
      public short getThriftFieldId() {
11138
        return _thriftId;
11139
      }
11140
 
11141
      public String getFieldName() {
11142
        return _fieldName;
11143
      }
11144
    }
11145
 
11146
    // isset id assignments
11147
    private static final int __SUCCESS_ISSET_ID = 0;
11148
    private BitSet __isset_bit_vector = new BitSet(1);
11149
 
11150
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11151
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11152
          new FieldValueMetaData(TType.BOOL)));
11153
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11154
          new FieldValueMetaData(TType.STRUCT)));
11155
    }});
11156
 
11157
    static {
553 chandransh 11158
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11159
    }
11160
 
553 chandransh 11161
    public setUserAsLoggedOut_result() {
48 ashish 11162
    }
11163
 
553 chandransh 11164
    public setUserAsLoggedOut_result(
48 ashish 11165
      boolean success,
11166
      UserContextException ucx)
11167
    {
11168
      this();
11169
      this.success = success;
11170
      setSuccessIsSet(true);
11171
      this.ucx = ucx;
11172
    }
11173
 
11174
    /**
11175
     * Performs a deep copy on <i>other</i>.
11176
     */
553 chandransh 11177
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11178
      __isset_bit_vector.clear();
11179
      __isset_bit_vector.or(other.__isset_bit_vector);
11180
      this.success = other.success;
11181
      if (other.isSetUcx()) {
11182
        this.ucx = new UserContextException(other.ucx);
11183
      }
11184
    }
11185
 
553 chandransh 11186
    public setUserAsLoggedOut_result deepCopy() {
11187
      return new setUserAsLoggedOut_result(this);
48 ashish 11188
    }
11189
 
11190
    @Deprecated
553 chandransh 11191
    public setUserAsLoggedOut_result clone() {
11192
      return new setUserAsLoggedOut_result(this);
48 ashish 11193
    }
11194
 
11195
    public boolean isSuccess() {
11196
      return this.success;
11197
    }
11198
 
553 chandransh 11199
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11200
      this.success = success;
11201
      setSuccessIsSet(true);
11202
      return this;
11203
    }
11204
 
11205
    public void unsetSuccess() {
11206
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11207
    }
11208
 
11209
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11210
    public boolean isSetSuccess() {
11211
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11212
    }
11213
 
11214
    public void setSuccessIsSet(boolean value) {
11215
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11216
    }
11217
 
11218
    public UserContextException getUcx() {
11219
      return this.ucx;
11220
    }
11221
 
553 chandransh 11222
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11223
      this.ucx = ucx;
11224
      return this;
11225
    }
11226
 
11227
    public void unsetUcx() {
11228
      this.ucx = null;
11229
    }
11230
 
11231
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11232
    public boolean isSetUcx() {
11233
      return this.ucx != null;
11234
    }
11235
 
11236
    public void setUcxIsSet(boolean value) {
11237
      if (!value) {
11238
        this.ucx = null;
11239
      }
11240
    }
11241
 
11242
    public void setFieldValue(_Fields field, Object value) {
11243
      switch (field) {
11244
      case SUCCESS:
11245
        if (value == null) {
11246
          unsetSuccess();
11247
        } else {
11248
          setSuccess((Boolean)value);
11249
        }
11250
        break;
11251
 
11252
      case UCX:
11253
        if (value == null) {
11254
          unsetUcx();
11255
        } else {
11256
          setUcx((UserContextException)value);
11257
        }
11258
        break;
11259
 
11260
      }
11261
    }
11262
 
11263
    public void setFieldValue(int fieldID, Object value) {
11264
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11265
    }
11266
 
11267
    public Object getFieldValue(_Fields field) {
11268
      switch (field) {
11269
      case SUCCESS:
11270
        return new Boolean(isSuccess());
11271
 
11272
      case UCX:
11273
        return getUcx();
11274
 
11275
      }
11276
      throw new IllegalStateException();
11277
    }
11278
 
11279
    public Object getFieldValue(int fieldId) {
11280
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11281
    }
11282
 
11283
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11284
    public boolean isSet(_Fields field) {
11285
      switch (field) {
11286
      case SUCCESS:
11287
        return isSetSuccess();
11288
      case UCX:
11289
        return isSetUcx();
11290
      }
11291
      throw new IllegalStateException();
11292
    }
11293
 
11294
    public boolean isSet(int fieldID) {
11295
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11296
    }
11297
 
11298
    @Override
11299
    public boolean equals(Object that) {
11300
      if (that == null)
11301
        return false;
553 chandransh 11302
      if (that instanceof setUserAsLoggedOut_result)
11303
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11304
      return false;
11305
    }
11306
 
553 chandransh 11307
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11308
      if (that == null)
11309
        return false;
11310
 
11311
      boolean this_present_success = true;
11312
      boolean that_present_success = true;
11313
      if (this_present_success || that_present_success) {
11314
        if (!(this_present_success && that_present_success))
11315
          return false;
11316
        if (this.success != that.success)
11317
          return false;
11318
      }
11319
 
11320
      boolean this_present_ucx = true && this.isSetUcx();
11321
      boolean that_present_ucx = true && that.isSetUcx();
11322
      if (this_present_ucx || that_present_ucx) {
11323
        if (!(this_present_ucx && that_present_ucx))
11324
          return false;
11325
        if (!this.ucx.equals(that.ucx))
11326
          return false;
11327
      }
11328
 
11329
      return true;
11330
    }
11331
 
11332
    @Override
11333
    public int hashCode() {
11334
      return 0;
11335
    }
11336
 
553 chandransh 11337
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11338
      if (!getClass().equals(other.getClass())) {
11339
        return getClass().getName().compareTo(other.getClass().getName());
11340
      }
11341
 
11342
      int lastComparison = 0;
553 chandransh 11343
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11344
 
11345
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11346
      if (lastComparison != 0) {
11347
        return lastComparison;
11348
      }
11349
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11350
      if (lastComparison != 0) {
11351
        return lastComparison;
11352
      }
11353
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11354
      if (lastComparison != 0) {
11355
        return lastComparison;
11356
      }
11357
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11358
      if (lastComparison != 0) {
11359
        return lastComparison;
11360
      }
11361
      return 0;
11362
    }
11363
 
11364
    public void read(TProtocol iprot) throws TException {
11365
      TField field;
11366
      iprot.readStructBegin();
11367
      while (true)
11368
      {
11369
        field = iprot.readFieldBegin();
11370
        if (field.type == TType.STOP) { 
11371
          break;
11372
        }
11373
        _Fields fieldId = _Fields.findByThriftId(field.id);
11374
        if (fieldId == null) {
11375
          TProtocolUtil.skip(iprot, field.type);
11376
        } else {
11377
          switch (fieldId) {
11378
            case SUCCESS:
11379
              if (field.type == TType.BOOL) {
11380
                this.success = iprot.readBool();
11381
                setSuccessIsSet(true);
11382
              } else { 
11383
                TProtocolUtil.skip(iprot, field.type);
11384
              }
11385
              break;
11386
            case UCX:
11387
              if (field.type == TType.STRUCT) {
11388
                this.ucx = new UserContextException();
11389
                this.ucx.read(iprot);
11390
              } else { 
11391
                TProtocolUtil.skip(iprot, field.type);
11392
              }
11393
              break;
11394
          }
11395
          iprot.readFieldEnd();
11396
        }
11397
      }
11398
      iprot.readStructEnd();
11399
      validate();
11400
    }
11401
 
11402
    public void write(TProtocol oprot) throws TException {
11403
      oprot.writeStructBegin(STRUCT_DESC);
11404
 
11405
      if (this.isSetSuccess()) {
11406
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11407
        oprot.writeBool(this.success);
11408
        oprot.writeFieldEnd();
11409
      } else if (this.isSetUcx()) {
11410
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11411
        this.ucx.write(oprot);
11412
        oprot.writeFieldEnd();
11413
      }
11414
      oprot.writeFieldStop();
11415
      oprot.writeStructEnd();
11416
    }
11417
 
11418
    @Override
11419
    public String toString() {
553 chandransh 11420
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11421
      boolean first = true;
11422
 
11423
      sb.append("success:");
11424
      sb.append(this.success);
11425
      first = false;
11426
      if (!first) sb.append(", ");
11427
      sb.append("ucx:");
11428
      if (this.ucx == null) {
11429
        sb.append("null");
11430
      } else {
11431
        sb.append(this.ucx);
11432
      }
11433
      first = false;
11434
      sb.append(")");
11435
      return sb.toString();
11436
    }
11437
 
11438
    public void validate() throws TException {
11439
      // check for required fields
11440
    }
11441
 
11442
  }
11443
 
553 chandransh 11444
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11445
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11446
 
11447
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11448
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11449
 
11450
    private long userid;
11451
    private long addressId;
11452
 
11453
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11454
    public enum _Fields implements TFieldIdEnum {
11455
      USERID((short)1, "userid"),
11456
      ADDRESS_ID((short)2, "addressId");
11457
 
11458
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11459
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11460
 
11461
      static {
11462
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11463
          byId.put((int)field._thriftId, field);
11464
          byName.put(field.getFieldName(), field);
11465
        }
11466
      }
11467
 
11468
      /**
11469
       * Find the _Fields constant that matches fieldId, or null if its not found.
11470
       */
11471
      public static _Fields findByThriftId(int fieldId) {
11472
        return byId.get(fieldId);
11473
      }
11474
 
11475
      /**
11476
       * Find the _Fields constant that matches fieldId, throwing an exception
11477
       * if it is not found.
11478
       */
11479
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11480
        _Fields fields = findByThriftId(fieldId);
11481
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11482
        return fields;
11483
      }
11484
 
11485
      /**
11486
       * Find the _Fields constant that matches name, or null if its not found.
11487
       */
11488
      public static _Fields findByName(String name) {
11489
        return byName.get(name);
11490
      }
11491
 
11492
      private final short _thriftId;
11493
      private final String _fieldName;
11494
 
11495
      _Fields(short thriftId, String fieldName) {
11496
        _thriftId = thriftId;
11497
        _fieldName = fieldName;
11498
      }
11499
 
11500
      public short getThriftFieldId() {
11501
        return _thriftId;
11502
      }
11503
 
11504
      public String getFieldName() {
11505
        return _fieldName;
11506
      }
11507
    }
11508
 
11509
    // isset id assignments
11510
    private static final int __USERID_ISSET_ID = 0;
11511
    private static final int __ADDRESSID_ISSET_ID = 1;
11512
    private BitSet __isset_bit_vector = new BitSet(2);
11513
 
11514
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11515
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11516
          new FieldValueMetaData(TType.I64)));
11517
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11518
          new FieldValueMetaData(TType.I64)));
11519
    }});
11520
 
11521
    static {
553 chandransh 11522
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11523
    }
11524
 
553 chandransh 11525
    public setDefaultAddress_args() {
48 ashish 11526
    }
11527
 
553 chandransh 11528
    public setDefaultAddress_args(
48 ashish 11529
      long userid,
11530
      long addressId)
11531
    {
11532
      this();
11533
      this.userid = userid;
11534
      setUseridIsSet(true);
11535
      this.addressId = addressId;
11536
      setAddressIdIsSet(true);
11537
    }
11538
 
11539
    /**
11540
     * Performs a deep copy on <i>other</i>.
11541
     */
553 chandransh 11542
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11543
      __isset_bit_vector.clear();
11544
      __isset_bit_vector.or(other.__isset_bit_vector);
11545
      this.userid = other.userid;
11546
      this.addressId = other.addressId;
11547
    }
11548
 
553 chandransh 11549
    public setDefaultAddress_args deepCopy() {
11550
      return new setDefaultAddress_args(this);
48 ashish 11551
    }
11552
 
11553
    @Deprecated
553 chandransh 11554
    public setDefaultAddress_args clone() {
11555
      return new setDefaultAddress_args(this);
48 ashish 11556
    }
11557
 
11558
    public long getUserid() {
11559
      return this.userid;
11560
    }
11561
 
553 chandransh 11562
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11563
      this.userid = userid;
11564
      setUseridIsSet(true);
11565
      return this;
11566
    }
11567
 
11568
    public void unsetUserid() {
11569
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11570
    }
11571
 
11572
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11573
    public boolean isSetUserid() {
11574
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11575
    }
11576
 
11577
    public void setUseridIsSet(boolean value) {
11578
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11579
    }
11580
 
11581
    public long getAddressId() {
11582
      return this.addressId;
11583
    }
11584
 
553 chandransh 11585
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11586
      this.addressId = addressId;
11587
      setAddressIdIsSet(true);
11588
      return this;
11589
    }
11590
 
11591
    public void unsetAddressId() {
11592
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11593
    }
11594
 
11595
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11596
    public boolean isSetAddressId() {
11597
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11598
    }
11599
 
11600
    public void setAddressIdIsSet(boolean value) {
11601
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11602
    }
11603
 
11604
    public void setFieldValue(_Fields field, Object value) {
11605
      switch (field) {
11606
      case USERID:
11607
        if (value == null) {
11608
          unsetUserid();
11609
        } else {
11610
          setUserid((Long)value);
11611
        }
11612
        break;
11613
 
11614
      case ADDRESS_ID:
11615
        if (value == null) {
11616
          unsetAddressId();
11617
        } else {
11618
          setAddressId((Long)value);
11619
        }
11620
        break;
11621
 
11622
      }
11623
    }
11624
 
11625
    public void setFieldValue(int fieldID, Object value) {
11626
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11627
    }
11628
 
11629
    public Object getFieldValue(_Fields field) {
11630
      switch (field) {
11631
      case USERID:
11632
        return new Long(getUserid());
11633
 
11634
      case ADDRESS_ID:
11635
        return new Long(getAddressId());
11636
 
11637
      }
11638
      throw new IllegalStateException();
11639
    }
11640
 
11641
    public Object getFieldValue(int fieldId) {
11642
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11643
    }
11644
 
11645
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11646
    public boolean isSet(_Fields field) {
11647
      switch (field) {
11648
      case USERID:
11649
        return isSetUserid();
11650
      case ADDRESS_ID:
11651
        return isSetAddressId();
11652
      }
11653
      throw new IllegalStateException();
11654
    }
11655
 
11656
    public boolean isSet(int fieldID) {
11657
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11658
    }
11659
 
11660
    @Override
11661
    public boolean equals(Object that) {
11662
      if (that == null)
11663
        return false;
553 chandransh 11664
      if (that instanceof setDefaultAddress_args)
11665
        return this.equals((setDefaultAddress_args)that);
48 ashish 11666
      return false;
11667
    }
11668
 
553 chandransh 11669
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11670
      if (that == null)
11671
        return false;
11672
 
11673
      boolean this_present_userid = true;
11674
      boolean that_present_userid = true;
11675
      if (this_present_userid || that_present_userid) {
11676
        if (!(this_present_userid && that_present_userid))
11677
          return false;
11678
        if (this.userid != that.userid)
11679
          return false;
11680
      }
11681
 
11682
      boolean this_present_addressId = true;
11683
      boolean that_present_addressId = true;
11684
      if (this_present_addressId || that_present_addressId) {
11685
        if (!(this_present_addressId && that_present_addressId))
11686
          return false;
11687
        if (this.addressId != that.addressId)
11688
          return false;
11689
      }
11690
 
11691
      return true;
11692
    }
11693
 
11694
    @Override
11695
    public int hashCode() {
11696
      return 0;
11697
    }
11698
 
553 chandransh 11699
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11700
      if (!getClass().equals(other.getClass())) {
11701
        return getClass().getName().compareTo(other.getClass().getName());
11702
      }
11703
 
11704
      int lastComparison = 0;
553 chandransh 11705
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11706
 
11707
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11708
      if (lastComparison != 0) {
11709
        return lastComparison;
11710
      }
11711
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11712
      if (lastComparison != 0) {
11713
        return lastComparison;
11714
      }
11715
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11716
      if (lastComparison != 0) {
11717
        return lastComparison;
11718
      }
11719
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11720
      if (lastComparison != 0) {
11721
        return lastComparison;
11722
      }
11723
      return 0;
11724
    }
11725
 
11726
    public void read(TProtocol iprot) throws TException {
11727
      TField field;
11728
      iprot.readStructBegin();
11729
      while (true)
11730
      {
11731
        field = iprot.readFieldBegin();
11732
        if (field.type == TType.STOP) { 
11733
          break;
11734
        }
11735
        _Fields fieldId = _Fields.findByThriftId(field.id);
11736
        if (fieldId == null) {
11737
          TProtocolUtil.skip(iprot, field.type);
11738
        } else {
11739
          switch (fieldId) {
11740
            case USERID:
11741
              if (field.type == TType.I64) {
11742
                this.userid = iprot.readI64();
11743
                setUseridIsSet(true);
11744
              } else { 
11745
                TProtocolUtil.skip(iprot, field.type);
11746
              }
11747
              break;
11748
            case ADDRESS_ID:
11749
              if (field.type == TType.I64) {
11750
                this.addressId = iprot.readI64();
11751
                setAddressIdIsSet(true);
11752
              } else { 
11753
                TProtocolUtil.skip(iprot, field.type);
11754
              }
11755
              break;
11756
          }
11757
          iprot.readFieldEnd();
11758
        }
11759
      }
11760
      iprot.readStructEnd();
11761
      validate();
11762
    }
11763
 
11764
    public void write(TProtocol oprot) throws TException {
11765
      validate();
11766
 
11767
      oprot.writeStructBegin(STRUCT_DESC);
11768
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11769
      oprot.writeI64(this.userid);
11770
      oprot.writeFieldEnd();
11771
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11772
      oprot.writeI64(this.addressId);
11773
      oprot.writeFieldEnd();
11774
      oprot.writeFieldStop();
11775
      oprot.writeStructEnd();
11776
    }
11777
 
11778
    @Override
11779
    public String toString() {
553 chandransh 11780
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11781
      boolean first = true;
11782
 
11783
      sb.append("userid:");
11784
      sb.append(this.userid);
11785
      first = false;
11786
      if (!first) sb.append(", ");
11787
      sb.append("addressId:");
11788
      sb.append(this.addressId);
11789
      first = false;
11790
      sb.append(")");
11791
      return sb.toString();
11792
    }
11793
 
11794
    public void validate() throws TException {
11795
      // check for required fields
11796
    }
11797
 
11798
  }
11799
 
553 chandransh 11800
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11801
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11802
 
11803
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11804
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11805
 
11806
    private boolean success;
11807
    private UserContextException ucx;
11808
 
11809
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11810
    public enum _Fields implements TFieldIdEnum {
11811
      SUCCESS((short)0, "success"),
11812
      UCX((short)1, "ucx");
11813
 
11814
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11815
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11816
 
11817
      static {
11818
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11819
          byId.put((int)field._thriftId, field);
11820
          byName.put(field.getFieldName(), field);
11821
        }
11822
      }
11823
 
11824
      /**
11825
       * Find the _Fields constant that matches fieldId, or null if its not found.
11826
       */
11827
      public static _Fields findByThriftId(int fieldId) {
11828
        return byId.get(fieldId);
11829
      }
11830
 
11831
      /**
11832
       * Find the _Fields constant that matches fieldId, throwing an exception
11833
       * if it is not found.
11834
       */
11835
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11836
        _Fields fields = findByThriftId(fieldId);
11837
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11838
        return fields;
11839
      }
11840
 
11841
      /**
11842
       * Find the _Fields constant that matches name, or null if its not found.
11843
       */
11844
      public static _Fields findByName(String name) {
11845
        return byName.get(name);
11846
      }
11847
 
11848
      private final short _thriftId;
11849
      private final String _fieldName;
11850
 
11851
      _Fields(short thriftId, String fieldName) {
11852
        _thriftId = thriftId;
11853
        _fieldName = fieldName;
11854
      }
11855
 
11856
      public short getThriftFieldId() {
11857
        return _thriftId;
11858
      }
11859
 
11860
      public String getFieldName() {
11861
        return _fieldName;
11862
      }
11863
    }
11864
 
11865
    // isset id assignments
11866
    private static final int __SUCCESS_ISSET_ID = 0;
11867
    private BitSet __isset_bit_vector = new BitSet(1);
11868
 
11869
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11870
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11871
          new FieldValueMetaData(TType.BOOL)));
11872
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11873
          new FieldValueMetaData(TType.STRUCT)));
11874
    }});
11875
 
11876
    static {
553 chandransh 11877
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11878
    }
11879
 
553 chandransh 11880
    public setDefaultAddress_result() {
48 ashish 11881
    }
11882
 
553 chandransh 11883
    public setDefaultAddress_result(
48 ashish 11884
      boolean success,
11885
      UserContextException ucx)
11886
    {
11887
      this();
11888
      this.success = success;
11889
      setSuccessIsSet(true);
11890
      this.ucx = ucx;
11891
    }
11892
 
11893
    /**
11894
     * Performs a deep copy on <i>other</i>.
11895
     */
553 chandransh 11896
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11897
      __isset_bit_vector.clear();
11898
      __isset_bit_vector.or(other.__isset_bit_vector);
11899
      this.success = other.success;
11900
      if (other.isSetUcx()) {
11901
        this.ucx = new UserContextException(other.ucx);
11902
      }
11903
    }
11904
 
553 chandransh 11905
    public setDefaultAddress_result deepCopy() {
11906
      return new setDefaultAddress_result(this);
48 ashish 11907
    }
11908
 
11909
    @Deprecated
553 chandransh 11910
    public setDefaultAddress_result clone() {
11911
      return new setDefaultAddress_result(this);
48 ashish 11912
    }
11913
 
11914
    public boolean isSuccess() {
11915
      return this.success;
11916
    }
11917
 
553 chandransh 11918
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11919
      this.success = success;
11920
      setSuccessIsSet(true);
11921
      return this;
11922
    }
11923
 
11924
    public void unsetSuccess() {
11925
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11926
    }
11927
 
11928
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11929
    public boolean isSetSuccess() {
11930
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11931
    }
11932
 
11933
    public void setSuccessIsSet(boolean value) {
11934
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11935
    }
11936
 
11937
    public UserContextException getUcx() {
11938
      return this.ucx;
11939
    }
11940
 
553 chandransh 11941
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11942
      this.ucx = ucx;
11943
      return this;
11944
    }
11945
 
11946
    public void unsetUcx() {
11947
      this.ucx = null;
11948
    }
11949
 
11950
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11951
    public boolean isSetUcx() {
11952
      return this.ucx != null;
11953
    }
11954
 
11955
    public void setUcxIsSet(boolean value) {
11956
      if (!value) {
11957
        this.ucx = null;
11958
      }
11959
    }
11960
 
11961
    public void setFieldValue(_Fields field, Object value) {
11962
      switch (field) {
11963
      case SUCCESS:
11964
        if (value == null) {
11965
          unsetSuccess();
11966
        } else {
11967
          setSuccess((Boolean)value);
11968
        }
11969
        break;
11970
 
11971
      case UCX:
11972
        if (value == null) {
11973
          unsetUcx();
11974
        } else {
11975
          setUcx((UserContextException)value);
11976
        }
11977
        break;
11978
 
11979
      }
11980
    }
11981
 
11982
    public void setFieldValue(int fieldID, Object value) {
11983
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11984
    }
11985
 
11986
    public Object getFieldValue(_Fields field) {
11987
      switch (field) {
11988
      case SUCCESS:
11989
        return new Boolean(isSuccess());
11990
 
11991
      case UCX:
11992
        return getUcx();
11993
 
11994
      }
11995
      throw new IllegalStateException();
11996
    }
11997
 
11998
    public Object getFieldValue(int fieldId) {
11999
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12000
    }
12001
 
12002
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12003
    public boolean isSet(_Fields field) {
12004
      switch (field) {
12005
      case SUCCESS:
12006
        return isSetSuccess();
12007
      case UCX:
12008
        return isSetUcx();
12009
      }
12010
      throw new IllegalStateException();
12011
    }
12012
 
12013
    public boolean isSet(int fieldID) {
12014
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12015
    }
12016
 
12017
    @Override
12018
    public boolean equals(Object that) {
12019
      if (that == null)
12020
        return false;
553 chandransh 12021
      if (that instanceof setDefaultAddress_result)
12022
        return this.equals((setDefaultAddress_result)that);
48 ashish 12023
      return false;
12024
    }
12025
 
553 chandransh 12026
    public boolean equals(setDefaultAddress_result that) {
48 ashish 12027
      if (that == null)
12028
        return false;
12029
 
12030
      boolean this_present_success = true;
12031
      boolean that_present_success = true;
12032
      if (this_present_success || that_present_success) {
12033
        if (!(this_present_success && that_present_success))
12034
          return false;
12035
        if (this.success != that.success)
12036
          return false;
12037
      }
12038
 
12039
      boolean this_present_ucx = true && this.isSetUcx();
12040
      boolean that_present_ucx = true && that.isSetUcx();
12041
      if (this_present_ucx || that_present_ucx) {
12042
        if (!(this_present_ucx && that_present_ucx))
12043
          return false;
12044
        if (!this.ucx.equals(that.ucx))
12045
          return false;
12046
      }
12047
 
12048
      return true;
12049
    }
12050
 
12051
    @Override
12052
    public int hashCode() {
12053
      return 0;
12054
    }
12055
 
553 chandransh 12056
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12057
      if (!getClass().equals(other.getClass())) {
12058
        return getClass().getName().compareTo(other.getClass().getName());
12059
      }
12060
 
12061
      int lastComparison = 0;
553 chandransh 12062
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12063
 
12064
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12065
      if (lastComparison != 0) {
12066
        return lastComparison;
12067
      }
12068
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12069
      if (lastComparison != 0) {
12070
        return lastComparison;
12071
      }
12072
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12073
      if (lastComparison != 0) {
12074
        return lastComparison;
12075
      }
12076
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12077
      if (lastComparison != 0) {
12078
        return lastComparison;
12079
      }
12080
      return 0;
12081
    }
12082
 
12083
    public void read(TProtocol iprot) throws TException {
12084
      TField field;
12085
      iprot.readStructBegin();
12086
      while (true)
12087
      {
12088
        field = iprot.readFieldBegin();
12089
        if (field.type == TType.STOP) { 
12090
          break;
12091
        }
12092
        _Fields fieldId = _Fields.findByThriftId(field.id);
12093
        if (fieldId == null) {
12094
          TProtocolUtil.skip(iprot, field.type);
12095
        } else {
12096
          switch (fieldId) {
12097
            case SUCCESS:
12098
              if (field.type == TType.BOOL) {
12099
                this.success = iprot.readBool();
12100
                setSuccessIsSet(true);
12101
              } else { 
12102
                TProtocolUtil.skip(iprot, field.type);
12103
              }
12104
              break;
12105
            case UCX:
12106
              if (field.type == TType.STRUCT) {
12107
                this.ucx = new UserContextException();
12108
                this.ucx.read(iprot);
12109
              } else { 
12110
                TProtocolUtil.skip(iprot, field.type);
12111
              }
12112
              break;
12113
          }
12114
          iprot.readFieldEnd();
12115
        }
12116
      }
12117
      iprot.readStructEnd();
12118
      validate();
12119
    }
12120
 
12121
    public void write(TProtocol oprot) throws TException {
12122
      oprot.writeStructBegin(STRUCT_DESC);
12123
 
12124
      if (this.isSetSuccess()) {
12125
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12126
        oprot.writeBool(this.success);
12127
        oprot.writeFieldEnd();
12128
      } else if (this.isSetUcx()) {
12129
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12130
        this.ucx.write(oprot);
12131
        oprot.writeFieldEnd();
12132
      }
12133
      oprot.writeFieldStop();
12134
      oprot.writeStructEnd();
12135
    }
12136
 
12137
    @Override
12138
    public String toString() {
553 chandransh 12139
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12140
      boolean first = true;
12141
 
12142
      sb.append("success:");
12143
      sb.append(this.success);
12144
      first = false;
12145
      if (!first) sb.append(", ");
12146
      sb.append("ucx:");
12147
      if (this.ucx == null) {
12148
        sb.append("null");
12149
      } else {
12150
        sb.append(this.ucx);
12151
      }
12152
      first = false;
12153
      sb.append(")");
12154
      return sb.toString();
12155
    }
12156
 
12157
    public void validate() throws TException {
12158
      // check for required fields
12159
    }
12160
 
12161
  }
12162
 
553 chandransh 12163
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12164
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12165
 
553 chandransh 12166
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12167
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12168
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12169
 
553 chandransh 12170
    private long userid;
593 rajveer 12171
    private String oldPassword;
12172
    private String newPassword;
48 ashish 12173
 
12174
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12175
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12176
      USERID((short)1, "userid"),
593 rajveer 12177
      OLD_PASSWORD((short)2, "oldPassword"),
12178
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12179
 
12180
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12181
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12182
 
12183
      static {
12184
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12185
          byId.put((int)field._thriftId, field);
12186
          byName.put(field.getFieldName(), field);
12187
        }
12188
      }
12189
 
12190
      /**
12191
       * Find the _Fields constant that matches fieldId, or null if its not found.
12192
       */
12193
      public static _Fields findByThriftId(int fieldId) {
12194
        return byId.get(fieldId);
12195
      }
12196
 
12197
      /**
12198
       * Find the _Fields constant that matches fieldId, throwing an exception
12199
       * if it is not found.
12200
       */
12201
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12202
        _Fields fields = findByThriftId(fieldId);
12203
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12204
        return fields;
12205
      }
12206
 
12207
      /**
12208
       * Find the _Fields constant that matches name, or null if its not found.
12209
       */
12210
      public static _Fields findByName(String name) {
12211
        return byName.get(name);
12212
      }
12213
 
12214
      private final short _thriftId;
12215
      private final String _fieldName;
12216
 
12217
      _Fields(short thriftId, String fieldName) {
12218
        _thriftId = thriftId;
12219
        _fieldName = fieldName;
12220
      }
12221
 
12222
      public short getThriftFieldId() {
12223
        return _thriftId;
12224
      }
12225
 
12226
      public String getFieldName() {
12227
        return _fieldName;
12228
      }
12229
    }
12230
 
12231
    // isset id assignments
12232
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12233
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12234
 
12235
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12236
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12237
          new FieldValueMetaData(TType.I64)));
593 rajveer 12238
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12239
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12240
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12241
          new FieldValueMetaData(TType.STRING)));
48 ashish 12242
    }});
12243
 
12244
    static {
553 chandransh 12245
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12246
    }
12247
 
553 chandransh 12248
    public updatePassword_args() {
48 ashish 12249
    }
12250
 
553 chandransh 12251
    public updatePassword_args(
12252
      long userid,
593 rajveer 12253
      String oldPassword,
12254
      String newPassword)
48 ashish 12255
    {
12256
      this();
553 chandransh 12257
      this.userid = userid;
12258
      setUseridIsSet(true);
593 rajveer 12259
      this.oldPassword = oldPassword;
12260
      this.newPassword = newPassword;
48 ashish 12261
    }
12262
 
12263
    /**
12264
     * Performs a deep copy on <i>other</i>.
12265
     */
553 chandransh 12266
    public updatePassword_args(updatePassword_args other) {
48 ashish 12267
      __isset_bit_vector.clear();
12268
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12269
      this.userid = other.userid;
593 rajveer 12270
      if (other.isSetOldPassword()) {
12271
        this.oldPassword = other.oldPassword;
553 chandransh 12272
      }
593 rajveer 12273
      if (other.isSetNewPassword()) {
12274
        this.newPassword = other.newPassword;
12275
      }
48 ashish 12276
    }
12277
 
553 chandransh 12278
    public updatePassword_args deepCopy() {
12279
      return new updatePassword_args(this);
48 ashish 12280
    }
12281
 
12282
    @Deprecated
553 chandransh 12283
    public updatePassword_args clone() {
12284
      return new updatePassword_args(this);
48 ashish 12285
    }
12286
 
553 chandransh 12287
    public long getUserid() {
12288
      return this.userid;
48 ashish 12289
    }
12290
 
553 chandransh 12291
    public updatePassword_args setUserid(long userid) {
12292
      this.userid = userid;
12293
      setUseridIsSet(true);
48 ashish 12294
      return this;
12295
    }
12296
 
553 chandransh 12297
    public void unsetUserid() {
48 ashish 12298
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12299
    }
12300
 
553 chandransh 12301
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12302
    public boolean isSetUserid() {
48 ashish 12303
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12304
    }
12305
 
553 chandransh 12306
    public void setUseridIsSet(boolean value) {
48 ashish 12307
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12308
    }
12309
 
593 rajveer 12310
    public String getOldPassword() {
12311
      return this.oldPassword;
48 ashish 12312
    }
12313
 
593 rajveer 12314
    public updatePassword_args setOldPassword(String oldPassword) {
12315
      this.oldPassword = oldPassword;
48 ashish 12316
      return this;
12317
    }
12318
 
593 rajveer 12319
    public void unsetOldPassword() {
12320
      this.oldPassword = null;
48 ashish 12321
    }
12322
 
593 rajveer 12323
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12324
    public boolean isSetOldPassword() {
12325
      return this.oldPassword != null;
48 ashish 12326
    }
12327
 
593 rajveer 12328
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12329
      if (!value) {
593 rajveer 12330
        this.oldPassword = null;
553 chandransh 12331
      }
48 ashish 12332
    }
12333
 
593 rajveer 12334
    public String getNewPassword() {
12335
      return this.newPassword;
12336
    }
12337
 
12338
    public updatePassword_args setNewPassword(String newPassword) {
12339
      this.newPassword = newPassword;
12340
      return this;
12341
    }
12342
 
12343
    public void unsetNewPassword() {
12344
      this.newPassword = null;
12345
    }
12346
 
12347
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12348
    public boolean isSetNewPassword() {
12349
      return this.newPassword != null;
12350
    }
12351
 
12352
    public void setNewPasswordIsSet(boolean value) {
12353
      if (!value) {
12354
        this.newPassword = null;
12355
      }
12356
    }
12357
 
48 ashish 12358
    public void setFieldValue(_Fields field, Object value) {
12359
      switch (field) {
553 chandransh 12360
      case USERID:
48 ashish 12361
        if (value == null) {
553 chandransh 12362
          unsetUserid();
48 ashish 12363
        } else {
553 chandransh 12364
          setUserid((Long)value);
48 ashish 12365
        }
12366
        break;
12367
 
593 rajveer 12368
      case OLD_PASSWORD:
48 ashish 12369
        if (value == null) {
593 rajveer 12370
          unsetOldPassword();
48 ashish 12371
        } else {
593 rajveer 12372
          setOldPassword((String)value);
48 ashish 12373
        }
12374
        break;
12375
 
593 rajveer 12376
      case NEW_PASSWORD:
12377
        if (value == null) {
12378
          unsetNewPassword();
12379
        } else {
12380
          setNewPassword((String)value);
12381
        }
12382
        break;
12383
 
48 ashish 12384
      }
12385
    }
12386
 
12387
    public void setFieldValue(int fieldID, Object value) {
12388
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12389
    }
12390
 
12391
    public Object getFieldValue(_Fields field) {
12392
      switch (field) {
553 chandransh 12393
      case USERID:
12394
        return new Long(getUserid());
48 ashish 12395
 
593 rajveer 12396
      case OLD_PASSWORD:
12397
        return getOldPassword();
48 ashish 12398
 
593 rajveer 12399
      case NEW_PASSWORD:
12400
        return getNewPassword();
12401
 
48 ashish 12402
      }
12403
      throw new IllegalStateException();
12404
    }
12405
 
12406
    public Object getFieldValue(int fieldId) {
12407
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12408
    }
12409
 
12410
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12411
    public boolean isSet(_Fields field) {
12412
      switch (field) {
553 chandransh 12413
      case USERID:
12414
        return isSetUserid();
593 rajveer 12415
      case OLD_PASSWORD:
12416
        return isSetOldPassword();
12417
      case NEW_PASSWORD:
12418
        return isSetNewPassword();
48 ashish 12419
      }
12420
      throw new IllegalStateException();
12421
    }
12422
 
12423
    public boolean isSet(int fieldID) {
12424
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12425
    }
12426
 
12427
    @Override
12428
    public boolean equals(Object that) {
12429
      if (that == null)
12430
        return false;
553 chandransh 12431
      if (that instanceof updatePassword_args)
12432
        return this.equals((updatePassword_args)that);
48 ashish 12433
      return false;
12434
    }
12435
 
553 chandransh 12436
    public boolean equals(updatePassword_args that) {
48 ashish 12437
      if (that == null)
12438
        return false;
12439
 
553 chandransh 12440
      boolean this_present_userid = true;
12441
      boolean that_present_userid = true;
12442
      if (this_present_userid || that_present_userid) {
12443
        if (!(this_present_userid && that_present_userid))
48 ashish 12444
          return false;
553 chandransh 12445
        if (this.userid != that.userid)
48 ashish 12446
          return false;
12447
      }
12448
 
593 rajveer 12449
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12450
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12451
      if (this_present_oldPassword || that_present_oldPassword) {
12452
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12453
          return false;
593 rajveer 12454
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12455
          return false;
12456
      }
12457
 
593 rajveer 12458
      boolean this_present_newPassword = true && this.isSetNewPassword();
12459
      boolean that_present_newPassword = true && that.isSetNewPassword();
12460
      if (this_present_newPassword || that_present_newPassword) {
12461
        if (!(this_present_newPassword && that_present_newPassword))
12462
          return false;
12463
        if (!this.newPassword.equals(that.newPassword))
12464
          return false;
12465
      }
12466
 
48 ashish 12467
      return true;
12468
    }
12469
 
12470
    @Override
12471
    public int hashCode() {
12472
      return 0;
12473
    }
12474
 
553 chandransh 12475
    public int compareTo(updatePassword_args other) {
48 ashish 12476
      if (!getClass().equals(other.getClass())) {
12477
        return getClass().getName().compareTo(other.getClass().getName());
12478
      }
12479
 
12480
      int lastComparison = 0;
553 chandransh 12481
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12482
 
553 chandransh 12483
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12484
      if (lastComparison != 0) {
12485
        return lastComparison;
12486
      }
553 chandransh 12487
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12488
      if (lastComparison != 0) {
12489
        return lastComparison;
12490
      }
593 rajveer 12491
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12492
      if (lastComparison != 0) {
12493
        return lastComparison;
12494
      }
593 rajveer 12495
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12496
      if (lastComparison != 0) {
12497
        return lastComparison;
12498
      }
593 rajveer 12499
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12500
      if (lastComparison != 0) {
12501
        return lastComparison;
12502
      }
12503
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12504
      if (lastComparison != 0) {
12505
        return lastComparison;
12506
      }
48 ashish 12507
      return 0;
12508
    }
12509
 
12510
    public void read(TProtocol iprot) throws TException {
12511
      TField field;
12512
      iprot.readStructBegin();
12513
      while (true)
12514
      {
12515
        field = iprot.readFieldBegin();
12516
        if (field.type == TType.STOP) { 
12517
          break;
12518
        }
12519
        _Fields fieldId = _Fields.findByThriftId(field.id);
12520
        if (fieldId == null) {
12521
          TProtocolUtil.skip(iprot, field.type);
12522
        } else {
12523
          switch (fieldId) {
553 chandransh 12524
            case USERID:
48 ashish 12525
              if (field.type == TType.I64) {
553 chandransh 12526
                this.userid = iprot.readI64();
12527
                setUseridIsSet(true);
48 ashish 12528
              } else { 
12529
                TProtocolUtil.skip(iprot, field.type);
12530
              }
12531
              break;
593 rajveer 12532
            case OLD_PASSWORD:
553 chandransh 12533
              if (field.type == TType.STRING) {
593 rajveer 12534
                this.oldPassword = iprot.readString();
48 ashish 12535
              } else { 
12536
                TProtocolUtil.skip(iprot, field.type);
12537
              }
12538
              break;
593 rajveer 12539
            case NEW_PASSWORD:
12540
              if (field.type == TType.STRING) {
12541
                this.newPassword = iprot.readString();
12542
              } else { 
12543
                TProtocolUtil.skip(iprot, field.type);
12544
              }
12545
              break;
48 ashish 12546
          }
12547
          iprot.readFieldEnd();
12548
        }
12549
      }
12550
      iprot.readStructEnd();
12551
      validate();
12552
    }
12553
 
12554
    public void write(TProtocol oprot) throws TException {
12555
      validate();
12556
 
12557
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12558
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12559
      oprot.writeI64(this.userid);
48 ashish 12560
      oprot.writeFieldEnd();
593 rajveer 12561
      if (this.oldPassword != null) {
12562
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12563
        oprot.writeString(this.oldPassword);
553 chandransh 12564
        oprot.writeFieldEnd();
12565
      }
593 rajveer 12566
      if (this.newPassword != null) {
12567
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
12568
        oprot.writeString(this.newPassword);
12569
        oprot.writeFieldEnd();
12570
      }
48 ashish 12571
      oprot.writeFieldStop();
12572
      oprot.writeStructEnd();
12573
    }
12574
 
12575
    @Override
12576
    public String toString() {
553 chandransh 12577
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12578
      boolean first = true;
12579
 
553 chandransh 12580
      sb.append("userid:");
12581
      sb.append(this.userid);
48 ashish 12582
      first = false;
12583
      if (!first) sb.append(", ");
593 rajveer 12584
      sb.append("oldPassword:");
12585
      if (this.oldPassword == null) {
553 chandransh 12586
        sb.append("null");
12587
      } else {
593 rajveer 12588
        sb.append(this.oldPassword);
553 chandransh 12589
      }
48 ashish 12590
      first = false;
593 rajveer 12591
      if (!first) sb.append(", ");
12592
      sb.append("newPassword:");
12593
      if (this.newPassword == null) {
12594
        sb.append("null");
12595
      } else {
12596
        sb.append(this.newPassword);
12597
      }
12598
      first = false;
48 ashish 12599
      sb.append(")");
12600
      return sb.toString();
12601
    }
12602
 
12603
    public void validate() throws TException {
12604
      // check for required fields
12605
    }
12606
 
12607
  }
12608
 
553 chandransh 12609
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12610
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12611
 
12612
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12613
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12614
 
12615
    private boolean success;
12616
    private UserContextException ucx;
12617
 
12618
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12619
    public enum _Fields implements TFieldIdEnum {
12620
      SUCCESS((short)0, "success"),
12621
      UCX((short)1, "ucx");
12622
 
12623
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12624
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12625
 
12626
      static {
12627
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12628
          byId.put((int)field._thriftId, field);
12629
          byName.put(field.getFieldName(), field);
12630
        }
12631
      }
12632
 
12633
      /**
12634
       * Find the _Fields constant that matches fieldId, or null if its not found.
12635
       */
12636
      public static _Fields findByThriftId(int fieldId) {
12637
        return byId.get(fieldId);
12638
      }
12639
 
12640
      /**
12641
       * Find the _Fields constant that matches fieldId, throwing an exception
12642
       * if it is not found.
12643
       */
12644
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12645
        _Fields fields = findByThriftId(fieldId);
12646
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12647
        return fields;
12648
      }
12649
 
12650
      /**
12651
       * Find the _Fields constant that matches name, or null if its not found.
12652
       */
12653
      public static _Fields findByName(String name) {
12654
        return byName.get(name);
12655
      }
12656
 
12657
      private final short _thriftId;
12658
      private final String _fieldName;
12659
 
12660
      _Fields(short thriftId, String fieldName) {
12661
        _thriftId = thriftId;
12662
        _fieldName = fieldName;
12663
      }
12664
 
12665
      public short getThriftFieldId() {
12666
        return _thriftId;
12667
      }
12668
 
12669
      public String getFieldName() {
12670
        return _fieldName;
12671
      }
12672
    }
12673
 
12674
    // isset id assignments
12675
    private static final int __SUCCESS_ISSET_ID = 0;
12676
    private BitSet __isset_bit_vector = new BitSet(1);
12677
 
12678
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12679
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12680
          new FieldValueMetaData(TType.BOOL)));
12681
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12682
          new FieldValueMetaData(TType.STRUCT)));
12683
    }});
12684
 
12685
    static {
553 chandransh 12686
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12687
    }
12688
 
553 chandransh 12689
    public updatePassword_result() {
48 ashish 12690
    }
12691
 
553 chandransh 12692
    public updatePassword_result(
48 ashish 12693
      boolean success,
12694
      UserContextException ucx)
12695
    {
12696
      this();
12697
      this.success = success;
12698
      setSuccessIsSet(true);
12699
      this.ucx = ucx;
12700
    }
12701
 
12702
    /**
12703
     * Performs a deep copy on <i>other</i>.
12704
     */
553 chandransh 12705
    public updatePassword_result(updatePassword_result other) {
48 ashish 12706
      __isset_bit_vector.clear();
12707
      __isset_bit_vector.or(other.__isset_bit_vector);
12708
      this.success = other.success;
12709
      if (other.isSetUcx()) {
12710
        this.ucx = new UserContextException(other.ucx);
12711
      }
12712
    }
12713
 
553 chandransh 12714
    public updatePassword_result deepCopy() {
12715
      return new updatePassword_result(this);
48 ashish 12716
    }
12717
 
12718
    @Deprecated
553 chandransh 12719
    public updatePassword_result clone() {
12720
      return new updatePassword_result(this);
48 ashish 12721
    }
12722
 
12723
    public boolean isSuccess() {
12724
      return this.success;
12725
    }
12726
 
553 chandransh 12727
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12728
      this.success = success;
12729
      setSuccessIsSet(true);
12730
      return this;
12731
    }
12732
 
12733
    public void unsetSuccess() {
12734
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12735
    }
12736
 
12737
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12738
    public boolean isSetSuccess() {
12739
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12740
    }
12741
 
12742
    public void setSuccessIsSet(boolean value) {
12743
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12744
    }
12745
 
12746
    public UserContextException getUcx() {
12747
      return this.ucx;
12748
    }
12749
 
553 chandransh 12750
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12751
      this.ucx = ucx;
12752
      return this;
12753
    }
12754
 
12755
    public void unsetUcx() {
12756
      this.ucx = null;
12757
    }
12758
 
12759
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12760
    public boolean isSetUcx() {
12761
      return this.ucx != null;
12762
    }
12763
 
12764
    public void setUcxIsSet(boolean value) {
12765
      if (!value) {
12766
        this.ucx = null;
12767
      }
12768
    }
12769
 
12770
    public void setFieldValue(_Fields field, Object value) {
12771
      switch (field) {
12772
      case SUCCESS:
12773
        if (value == null) {
12774
          unsetSuccess();
12775
        } else {
12776
          setSuccess((Boolean)value);
12777
        }
12778
        break;
12779
 
12780
      case UCX:
12781
        if (value == null) {
12782
          unsetUcx();
12783
        } else {
12784
          setUcx((UserContextException)value);
12785
        }
12786
        break;
12787
 
12788
      }
12789
    }
12790
 
12791
    public void setFieldValue(int fieldID, Object value) {
12792
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12793
    }
12794
 
12795
    public Object getFieldValue(_Fields field) {
12796
      switch (field) {
12797
      case SUCCESS:
12798
        return new Boolean(isSuccess());
12799
 
12800
      case UCX:
12801
        return getUcx();
12802
 
12803
      }
12804
      throw new IllegalStateException();
12805
    }
12806
 
12807
    public Object getFieldValue(int fieldId) {
12808
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12809
    }
12810
 
12811
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12812
    public boolean isSet(_Fields field) {
12813
      switch (field) {
12814
      case SUCCESS:
12815
        return isSetSuccess();
12816
      case UCX:
12817
        return isSetUcx();
12818
      }
12819
      throw new IllegalStateException();
12820
    }
12821
 
12822
    public boolean isSet(int fieldID) {
12823
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12824
    }
12825
 
12826
    @Override
12827
    public boolean equals(Object that) {
12828
      if (that == null)
12829
        return false;
553 chandransh 12830
      if (that instanceof updatePassword_result)
12831
        return this.equals((updatePassword_result)that);
48 ashish 12832
      return false;
12833
    }
12834
 
553 chandransh 12835
    public boolean equals(updatePassword_result that) {
48 ashish 12836
      if (that == null)
12837
        return false;
12838
 
12839
      boolean this_present_success = true;
12840
      boolean that_present_success = true;
12841
      if (this_present_success || that_present_success) {
12842
        if (!(this_present_success && that_present_success))
12843
          return false;
12844
        if (this.success != that.success)
12845
          return false;
12846
      }
12847
 
12848
      boolean this_present_ucx = true && this.isSetUcx();
12849
      boolean that_present_ucx = true && that.isSetUcx();
12850
      if (this_present_ucx || that_present_ucx) {
12851
        if (!(this_present_ucx && that_present_ucx))
12852
          return false;
12853
        if (!this.ucx.equals(that.ucx))
12854
          return false;
12855
      }
12856
 
12857
      return true;
12858
    }
12859
 
12860
    @Override
12861
    public int hashCode() {
12862
      return 0;
12863
    }
12864
 
553 chandransh 12865
    public int compareTo(updatePassword_result other) {
48 ashish 12866
      if (!getClass().equals(other.getClass())) {
12867
        return getClass().getName().compareTo(other.getClass().getName());
12868
      }
12869
 
12870
      int lastComparison = 0;
553 chandransh 12871
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12872
 
12873
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12874
      if (lastComparison != 0) {
12875
        return lastComparison;
12876
      }
12877
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12878
      if (lastComparison != 0) {
12879
        return lastComparison;
12880
      }
12881
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12882
      if (lastComparison != 0) {
12883
        return lastComparison;
12884
      }
12885
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12886
      if (lastComparison != 0) {
12887
        return lastComparison;
12888
      }
12889
      return 0;
12890
    }
12891
 
12892
    public void read(TProtocol iprot) throws TException {
12893
      TField field;
12894
      iprot.readStructBegin();
12895
      while (true)
12896
      {
12897
        field = iprot.readFieldBegin();
12898
        if (field.type == TType.STOP) { 
12899
          break;
12900
        }
12901
        _Fields fieldId = _Fields.findByThriftId(field.id);
12902
        if (fieldId == null) {
12903
          TProtocolUtil.skip(iprot, field.type);
12904
        } else {
12905
          switch (fieldId) {
12906
            case SUCCESS:
12907
              if (field.type == TType.BOOL) {
12908
                this.success = iprot.readBool();
12909
                setSuccessIsSet(true);
12910
              } else { 
12911
                TProtocolUtil.skip(iprot, field.type);
12912
              }
12913
              break;
12914
            case UCX:
12915
              if (field.type == TType.STRUCT) {
12916
                this.ucx = new UserContextException();
12917
                this.ucx.read(iprot);
12918
              } else { 
12919
                TProtocolUtil.skip(iprot, field.type);
12920
              }
12921
              break;
12922
          }
12923
          iprot.readFieldEnd();
12924
        }
12925
      }
12926
      iprot.readStructEnd();
12927
      validate();
12928
    }
12929
 
12930
    public void write(TProtocol oprot) throws TException {
12931
      oprot.writeStructBegin(STRUCT_DESC);
12932
 
12933
      if (this.isSetSuccess()) {
12934
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12935
        oprot.writeBool(this.success);
12936
        oprot.writeFieldEnd();
12937
      } else if (this.isSetUcx()) {
12938
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12939
        this.ucx.write(oprot);
12940
        oprot.writeFieldEnd();
12941
      }
12942
      oprot.writeFieldStop();
12943
      oprot.writeStructEnd();
12944
    }
12945
 
12946
    @Override
12947
    public String toString() {
553 chandransh 12948
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12949
      boolean first = true;
12950
 
12951
      sb.append("success:");
12952
      sb.append(this.success);
12953
      first = false;
12954
      if (!first) sb.append(", ");
12955
      sb.append("ucx:");
12956
      if (this.ucx == null) {
12957
        sb.append("null");
12958
      } else {
12959
        sb.append(this.ucx);
12960
      }
12961
      first = false;
12962
      sb.append(")");
12963
      return sb.toString();
12964
    }
12965
 
12966
    public void validate() throws TException {
12967
      // check for required fields
12968
    }
12969
 
12970
  }
12971
 
582 rajveer 12972
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
12973
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
12974
 
12975
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
12976
 
12977
    private String email;
12978
 
12979
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12980
    public enum _Fields implements TFieldIdEnum {
12981
      EMAIL((short)1, "email");
12982
 
12983
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12984
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12985
 
12986
      static {
12987
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12988
          byId.put((int)field._thriftId, field);
12989
          byName.put(field.getFieldName(), field);
12990
        }
12991
      }
12992
 
12993
      /**
12994
       * Find the _Fields constant that matches fieldId, or null if its not found.
12995
       */
12996
      public static _Fields findByThriftId(int fieldId) {
12997
        return byId.get(fieldId);
12998
      }
12999
 
13000
      /**
13001
       * Find the _Fields constant that matches fieldId, throwing an exception
13002
       * if it is not found.
13003
       */
13004
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13005
        _Fields fields = findByThriftId(fieldId);
13006
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13007
        return fields;
13008
      }
13009
 
13010
      /**
13011
       * Find the _Fields constant that matches name, or null if its not found.
13012
       */
13013
      public static _Fields findByName(String name) {
13014
        return byName.get(name);
13015
      }
13016
 
13017
      private final short _thriftId;
13018
      private final String _fieldName;
13019
 
13020
      _Fields(short thriftId, String fieldName) {
13021
        _thriftId = thriftId;
13022
        _fieldName = fieldName;
13023
      }
13024
 
13025
      public short getThriftFieldId() {
13026
        return _thriftId;
13027
      }
13028
 
13029
      public String getFieldName() {
13030
        return _fieldName;
13031
      }
13032
    }
13033
 
13034
    // isset id assignments
13035
 
13036
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13037
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13038
          new FieldValueMetaData(TType.STRING)));
13039
    }});
13040
 
13041
    static {
13042
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13043
    }
13044
 
13045
    public forgotPassword_args() {
13046
    }
13047
 
13048
    public forgotPassword_args(
13049
      String email)
13050
    {
13051
      this();
13052
      this.email = email;
13053
    }
13054
 
13055
    /**
13056
     * Performs a deep copy on <i>other</i>.
13057
     */
13058
    public forgotPassword_args(forgotPassword_args other) {
13059
      if (other.isSetEmail()) {
13060
        this.email = other.email;
13061
      }
13062
    }
13063
 
13064
    public forgotPassword_args deepCopy() {
13065
      return new forgotPassword_args(this);
13066
    }
13067
 
13068
    @Deprecated
13069
    public forgotPassword_args clone() {
13070
      return new forgotPassword_args(this);
13071
    }
13072
 
13073
    public String getEmail() {
13074
      return this.email;
13075
    }
13076
 
13077
    public forgotPassword_args setEmail(String email) {
13078
      this.email = email;
13079
      return this;
13080
    }
13081
 
13082
    public void unsetEmail() {
13083
      this.email = null;
13084
    }
13085
 
13086
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13087
    public boolean isSetEmail() {
13088
      return this.email != null;
13089
    }
13090
 
13091
    public void setEmailIsSet(boolean value) {
13092
      if (!value) {
13093
        this.email = null;
13094
      }
13095
    }
13096
 
13097
    public void setFieldValue(_Fields field, Object value) {
13098
      switch (field) {
13099
      case EMAIL:
13100
        if (value == null) {
13101
          unsetEmail();
13102
        } else {
13103
          setEmail((String)value);
13104
        }
13105
        break;
13106
 
13107
      }
13108
    }
13109
 
13110
    public void setFieldValue(int fieldID, Object value) {
13111
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13112
    }
13113
 
13114
    public Object getFieldValue(_Fields field) {
13115
      switch (field) {
13116
      case EMAIL:
13117
        return getEmail();
13118
 
13119
      }
13120
      throw new IllegalStateException();
13121
    }
13122
 
13123
    public Object getFieldValue(int fieldId) {
13124
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13125
    }
13126
 
13127
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13128
    public boolean isSet(_Fields field) {
13129
      switch (field) {
13130
      case EMAIL:
13131
        return isSetEmail();
13132
      }
13133
      throw new IllegalStateException();
13134
    }
13135
 
13136
    public boolean isSet(int fieldID) {
13137
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13138
    }
13139
 
13140
    @Override
13141
    public boolean equals(Object that) {
13142
      if (that == null)
13143
        return false;
13144
      if (that instanceof forgotPassword_args)
13145
        return this.equals((forgotPassword_args)that);
13146
      return false;
13147
    }
13148
 
13149
    public boolean equals(forgotPassword_args that) {
13150
      if (that == null)
13151
        return false;
13152
 
13153
      boolean this_present_email = true && this.isSetEmail();
13154
      boolean that_present_email = true && that.isSetEmail();
13155
      if (this_present_email || that_present_email) {
13156
        if (!(this_present_email && that_present_email))
13157
          return false;
13158
        if (!this.email.equals(that.email))
13159
          return false;
13160
      }
13161
 
13162
      return true;
13163
    }
13164
 
13165
    @Override
13166
    public int hashCode() {
13167
      return 0;
13168
    }
13169
 
13170
    public int compareTo(forgotPassword_args other) {
13171
      if (!getClass().equals(other.getClass())) {
13172
        return getClass().getName().compareTo(other.getClass().getName());
13173
      }
13174
 
13175
      int lastComparison = 0;
13176
      forgotPassword_args typedOther = (forgotPassword_args)other;
13177
 
13178
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13179
      if (lastComparison != 0) {
13180
        return lastComparison;
13181
      }
13182
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13183
      if (lastComparison != 0) {
13184
        return lastComparison;
13185
      }
13186
      return 0;
13187
    }
13188
 
13189
    public void read(TProtocol iprot) throws TException {
13190
      TField field;
13191
      iprot.readStructBegin();
13192
      while (true)
13193
      {
13194
        field = iprot.readFieldBegin();
13195
        if (field.type == TType.STOP) { 
13196
          break;
13197
        }
13198
        _Fields fieldId = _Fields.findByThriftId(field.id);
13199
        if (fieldId == null) {
13200
          TProtocolUtil.skip(iprot, field.type);
13201
        } else {
13202
          switch (fieldId) {
13203
            case EMAIL:
13204
              if (field.type == TType.STRING) {
13205
                this.email = iprot.readString();
13206
              } else { 
13207
                TProtocolUtil.skip(iprot, field.type);
13208
              }
13209
              break;
13210
          }
13211
          iprot.readFieldEnd();
13212
        }
13213
      }
13214
      iprot.readStructEnd();
13215
      validate();
13216
    }
13217
 
13218
    public void write(TProtocol oprot) throws TException {
13219
      validate();
13220
 
13221
      oprot.writeStructBegin(STRUCT_DESC);
13222
      if (this.email != null) {
13223
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13224
        oprot.writeString(this.email);
13225
        oprot.writeFieldEnd();
13226
      }
13227
      oprot.writeFieldStop();
13228
      oprot.writeStructEnd();
13229
    }
13230
 
13231
    @Override
13232
    public String toString() {
13233
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13234
      boolean first = true;
13235
 
13236
      sb.append("email:");
13237
      if (this.email == null) {
13238
        sb.append("null");
13239
      } else {
13240
        sb.append(this.email);
13241
      }
13242
      first = false;
13243
      sb.append(")");
13244
      return sb.toString();
13245
    }
13246
 
13247
    public void validate() throws TException {
13248
      // check for required fields
13249
    }
13250
 
13251
  }
13252
 
13253
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13254
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13255
 
13256
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13257
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13258
 
13259
    private boolean success;
13260
    private UserContextException ucx;
13261
 
13262
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13263
    public enum _Fields implements TFieldIdEnum {
13264
      SUCCESS((short)0, "success"),
13265
      UCX((short)1, "ucx");
13266
 
13267
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13268
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13269
 
13270
      static {
13271
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13272
          byId.put((int)field._thriftId, field);
13273
          byName.put(field.getFieldName(), field);
13274
        }
13275
      }
13276
 
13277
      /**
13278
       * Find the _Fields constant that matches fieldId, or null if its not found.
13279
       */
13280
      public static _Fields findByThriftId(int fieldId) {
13281
        return byId.get(fieldId);
13282
      }
13283
 
13284
      /**
13285
       * Find the _Fields constant that matches fieldId, throwing an exception
13286
       * if it is not found.
13287
       */
13288
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13289
        _Fields fields = findByThriftId(fieldId);
13290
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13291
        return fields;
13292
      }
13293
 
13294
      /**
13295
       * Find the _Fields constant that matches name, or null if its not found.
13296
       */
13297
      public static _Fields findByName(String name) {
13298
        return byName.get(name);
13299
      }
13300
 
13301
      private final short _thriftId;
13302
      private final String _fieldName;
13303
 
13304
      _Fields(short thriftId, String fieldName) {
13305
        _thriftId = thriftId;
13306
        _fieldName = fieldName;
13307
      }
13308
 
13309
      public short getThriftFieldId() {
13310
        return _thriftId;
13311
      }
13312
 
13313
      public String getFieldName() {
13314
        return _fieldName;
13315
      }
13316
    }
13317
 
13318
    // isset id assignments
13319
    private static final int __SUCCESS_ISSET_ID = 0;
13320
    private BitSet __isset_bit_vector = new BitSet(1);
13321
 
13322
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13323
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13324
          new FieldValueMetaData(TType.BOOL)));
13325
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13326
          new FieldValueMetaData(TType.STRUCT)));
13327
    }});
13328
 
13329
    static {
13330
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13331
    }
13332
 
13333
    public forgotPassword_result() {
13334
    }
13335
 
13336
    public forgotPassword_result(
13337
      boolean success,
13338
      UserContextException ucx)
13339
    {
13340
      this();
13341
      this.success = success;
13342
      setSuccessIsSet(true);
13343
      this.ucx = ucx;
13344
    }
13345
 
13346
    /**
13347
     * Performs a deep copy on <i>other</i>.
13348
     */
13349
    public forgotPassword_result(forgotPassword_result other) {
13350
      __isset_bit_vector.clear();
13351
      __isset_bit_vector.or(other.__isset_bit_vector);
13352
      this.success = other.success;
13353
      if (other.isSetUcx()) {
13354
        this.ucx = new UserContextException(other.ucx);
13355
      }
13356
    }
13357
 
13358
    public forgotPassword_result deepCopy() {
13359
      return new forgotPassword_result(this);
13360
    }
13361
 
13362
    @Deprecated
13363
    public forgotPassword_result clone() {
13364
      return new forgotPassword_result(this);
13365
    }
13366
 
13367
    public boolean isSuccess() {
13368
      return this.success;
13369
    }
13370
 
13371
    public forgotPassword_result setSuccess(boolean success) {
13372
      this.success = success;
13373
      setSuccessIsSet(true);
13374
      return this;
13375
    }
13376
 
13377
    public void unsetSuccess() {
13378
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13379
    }
13380
 
13381
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13382
    public boolean isSetSuccess() {
13383
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13384
    }
13385
 
13386
    public void setSuccessIsSet(boolean value) {
13387
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13388
    }
13389
 
13390
    public UserContextException getUcx() {
13391
      return this.ucx;
13392
    }
13393
 
13394
    public forgotPassword_result setUcx(UserContextException ucx) {
13395
      this.ucx = ucx;
13396
      return this;
13397
    }
13398
 
13399
    public void unsetUcx() {
13400
      this.ucx = null;
13401
    }
13402
 
13403
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13404
    public boolean isSetUcx() {
13405
      return this.ucx != null;
13406
    }
13407
 
13408
    public void setUcxIsSet(boolean value) {
13409
      if (!value) {
13410
        this.ucx = null;
13411
      }
13412
    }
13413
 
13414
    public void setFieldValue(_Fields field, Object value) {
13415
      switch (field) {
13416
      case SUCCESS:
13417
        if (value == null) {
13418
          unsetSuccess();
13419
        } else {
13420
          setSuccess((Boolean)value);
13421
        }
13422
        break;
13423
 
13424
      case UCX:
13425
        if (value == null) {
13426
          unsetUcx();
13427
        } else {
13428
          setUcx((UserContextException)value);
13429
        }
13430
        break;
13431
 
13432
      }
13433
    }
13434
 
13435
    public void setFieldValue(int fieldID, Object value) {
13436
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13437
    }
13438
 
13439
    public Object getFieldValue(_Fields field) {
13440
      switch (field) {
13441
      case SUCCESS:
13442
        return new Boolean(isSuccess());
13443
 
13444
      case UCX:
13445
        return getUcx();
13446
 
13447
      }
13448
      throw new IllegalStateException();
13449
    }
13450
 
13451
    public Object getFieldValue(int fieldId) {
13452
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13453
    }
13454
 
13455
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13456
    public boolean isSet(_Fields field) {
13457
      switch (field) {
13458
      case SUCCESS:
13459
        return isSetSuccess();
13460
      case UCX:
13461
        return isSetUcx();
13462
      }
13463
      throw new IllegalStateException();
13464
    }
13465
 
13466
    public boolean isSet(int fieldID) {
13467
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13468
    }
13469
 
13470
    @Override
13471
    public boolean equals(Object that) {
13472
      if (that == null)
13473
        return false;
13474
      if (that instanceof forgotPassword_result)
13475
        return this.equals((forgotPassword_result)that);
13476
      return false;
13477
    }
13478
 
13479
    public boolean equals(forgotPassword_result that) {
13480
      if (that == null)
13481
        return false;
13482
 
13483
      boolean this_present_success = true;
13484
      boolean that_present_success = true;
13485
      if (this_present_success || that_present_success) {
13486
        if (!(this_present_success && that_present_success))
13487
          return false;
13488
        if (this.success != that.success)
13489
          return false;
13490
      }
13491
 
13492
      boolean this_present_ucx = true && this.isSetUcx();
13493
      boolean that_present_ucx = true && that.isSetUcx();
13494
      if (this_present_ucx || that_present_ucx) {
13495
        if (!(this_present_ucx && that_present_ucx))
13496
          return false;
13497
        if (!this.ucx.equals(that.ucx))
13498
          return false;
13499
      }
13500
 
13501
      return true;
13502
    }
13503
 
13504
    @Override
13505
    public int hashCode() {
13506
      return 0;
13507
    }
13508
 
13509
    public int compareTo(forgotPassword_result other) {
13510
      if (!getClass().equals(other.getClass())) {
13511
        return getClass().getName().compareTo(other.getClass().getName());
13512
      }
13513
 
13514
      int lastComparison = 0;
13515
      forgotPassword_result typedOther = (forgotPassword_result)other;
13516
 
13517
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13518
      if (lastComparison != 0) {
13519
        return lastComparison;
13520
      }
13521
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13522
      if (lastComparison != 0) {
13523
        return lastComparison;
13524
      }
13525
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13526
      if (lastComparison != 0) {
13527
        return lastComparison;
13528
      }
13529
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13530
      if (lastComparison != 0) {
13531
        return lastComparison;
13532
      }
13533
      return 0;
13534
    }
13535
 
13536
    public void read(TProtocol iprot) throws TException {
13537
      TField field;
13538
      iprot.readStructBegin();
13539
      while (true)
13540
      {
13541
        field = iprot.readFieldBegin();
13542
        if (field.type == TType.STOP) { 
13543
          break;
13544
        }
13545
        _Fields fieldId = _Fields.findByThriftId(field.id);
13546
        if (fieldId == null) {
13547
          TProtocolUtil.skip(iprot, field.type);
13548
        } else {
13549
          switch (fieldId) {
13550
            case SUCCESS:
13551
              if (field.type == TType.BOOL) {
13552
                this.success = iprot.readBool();
13553
                setSuccessIsSet(true);
13554
              } else { 
13555
                TProtocolUtil.skip(iprot, field.type);
13556
              }
13557
              break;
13558
            case UCX:
13559
              if (field.type == TType.STRUCT) {
13560
                this.ucx = new UserContextException();
13561
                this.ucx.read(iprot);
13562
              } else { 
13563
                TProtocolUtil.skip(iprot, field.type);
13564
              }
13565
              break;
13566
          }
13567
          iprot.readFieldEnd();
13568
        }
13569
      }
13570
      iprot.readStructEnd();
13571
      validate();
13572
    }
13573
 
13574
    public void write(TProtocol oprot) throws TException {
13575
      oprot.writeStructBegin(STRUCT_DESC);
13576
 
13577
      if (this.isSetSuccess()) {
13578
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13579
        oprot.writeBool(this.success);
13580
        oprot.writeFieldEnd();
13581
      } else if (this.isSetUcx()) {
13582
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13583
        this.ucx.write(oprot);
13584
        oprot.writeFieldEnd();
13585
      }
13586
      oprot.writeFieldStop();
13587
      oprot.writeStructEnd();
13588
    }
13589
 
13590
    @Override
13591
    public String toString() {
13592
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13593
      boolean first = true;
13594
 
13595
      sb.append("success:");
13596
      sb.append(this.success);
13597
      first = false;
13598
      if (!first) sb.append(", ");
13599
      sb.append("ucx:");
13600
      if (this.ucx == null) {
13601
        sb.append("null");
13602
      } else {
13603
        sb.append(this.ucx);
13604
      }
13605
      first = false;
13606
      sb.append(")");
13607
      return sb.toString();
13608
    }
13609
 
13610
    public void validate() throws TException {
13611
      // check for required fields
13612
    }
13613
 
13614
  }
13615
 
593 rajveer 13616
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
13617
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
13618
 
13619
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
13620
 
13621
    private long userId;
13622
 
13623
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13624
    public enum _Fields implements TFieldIdEnum {
13625
      USER_ID((short)1, "userId");
13626
 
13627
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13629
 
13630
      static {
13631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13632
          byId.put((int)field._thriftId, field);
13633
          byName.put(field.getFieldName(), field);
13634
        }
13635
      }
13636
 
13637
      /**
13638
       * Find the _Fields constant that matches fieldId, or null if its not found.
13639
       */
13640
      public static _Fields findByThriftId(int fieldId) {
13641
        return byId.get(fieldId);
13642
      }
13643
 
13644
      /**
13645
       * Find the _Fields constant that matches fieldId, throwing an exception
13646
       * if it is not found.
13647
       */
13648
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13649
        _Fields fields = findByThriftId(fieldId);
13650
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13651
        return fields;
13652
      }
13653
 
13654
      /**
13655
       * Find the _Fields constant that matches name, or null if its not found.
13656
       */
13657
      public static _Fields findByName(String name) {
13658
        return byName.get(name);
13659
      }
13660
 
13661
      private final short _thriftId;
13662
      private final String _fieldName;
13663
 
13664
      _Fields(short thriftId, String fieldName) {
13665
        _thriftId = thriftId;
13666
        _fieldName = fieldName;
13667
      }
13668
 
13669
      public short getThriftFieldId() {
13670
        return _thriftId;
13671
      }
13672
 
13673
      public String getFieldName() {
13674
        return _fieldName;
13675
      }
13676
    }
13677
 
13678
    // isset id assignments
13679
    private static final int __USERID_ISSET_ID = 0;
13680
    private BitSet __isset_bit_vector = new BitSet(1);
13681
 
13682
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13683
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
13684
          new FieldValueMetaData(TType.I64)));
13685
    }});
13686
 
13687
    static {
13688
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
13689
    }
13690
 
13691
    public getAllAddressesForUser_args() {
13692
    }
13693
 
13694
    public getAllAddressesForUser_args(
13695
      long userId)
13696
    {
13697
      this();
13698
      this.userId = userId;
13699
      setUserIdIsSet(true);
13700
    }
13701
 
13702
    /**
13703
     * Performs a deep copy on <i>other</i>.
13704
     */
13705
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
13706
      __isset_bit_vector.clear();
13707
      __isset_bit_vector.or(other.__isset_bit_vector);
13708
      this.userId = other.userId;
13709
    }
13710
 
13711
    public getAllAddressesForUser_args deepCopy() {
13712
      return new getAllAddressesForUser_args(this);
13713
    }
13714
 
13715
    @Deprecated
13716
    public getAllAddressesForUser_args clone() {
13717
      return new getAllAddressesForUser_args(this);
13718
    }
13719
 
13720
    public long getUserId() {
13721
      return this.userId;
13722
    }
13723
 
13724
    public getAllAddressesForUser_args setUserId(long userId) {
13725
      this.userId = userId;
13726
      setUserIdIsSet(true);
13727
      return this;
13728
    }
13729
 
13730
    public void unsetUserId() {
13731
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13732
    }
13733
 
13734
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13735
    public boolean isSetUserId() {
13736
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13737
    }
13738
 
13739
    public void setUserIdIsSet(boolean value) {
13740
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13741
    }
13742
 
13743
    public void setFieldValue(_Fields field, Object value) {
13744
      switch (field) {
13745
      case USER_ID:
13746
        if (value == null) {
13747
          unsetUserId();
13748
        } else {
13749
          setUserId((Long)value);
13750
        }
13751
        break;
13752
 
13753
      }
13754
    }
13755
 
13756
    public void setFieldValue(int fieldID, Object value) {
13757
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13758
    }
13759
 
13760
    public Object getFieldValue(_Fields field) {
13761
      switch (field) {
13762
      case USER_ID:
13763
        return new Long(getUserId());
13764
 
13765
      }
13766
      throw new IllegalStateException();
13767
    }
13768
 
13769
    public Object getFieldValue(int fieldId) {
13770
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13771
    }
13772
 
13773
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13774
    public boolean isSet(_Fields field) {
13775
      switch (field) {
13776
      case USER_ID:
13777
        return isSetUserId();
13778
      }
13779
      throw new IllegalStateException();
13780
    }
13781
 
13782
    public boolean isSet(int fieldID) {
13783
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13784
    }
13785
 
13786
    @Override
13787
    public boolean equals(Object that) {
13788
      if (that == null)
13789
        return false;
13790
      if (that instanceof getAllAddressesForUser_args)
13791
        return this.equals((getAllAddressesForUser_args)that);
13792
      return false;
13793
    }
13794
 
13795
    public boolean equals(getAllAddressesForUser_args that) {
13796
      if (that == null)
13797
        return false;
13798
 
13799
      boolean this_present_userId = true;
13800
      boolean that_present_userId = true;
13801
      if (this_present_userId || that_present_userId) {
13802
        if (!(this_present_userId && that_present_userId))
13803
          return false;
13804
        if (this.userId != that.userId)
13805
          return false;
13806
      }
13807
 
13808
      return true;
13809
    }
13810
 
13811
    @Override
13812
    public int hashCode() {
13813
      return 0;
13814
    }
13815
 
13816
    public int compareTo(getAllAddressesForUser_args other) {
13817
      if (!getClass().equals(other.getClass())) {
13818
        return getClass().getName().compareTo(other.getClass().getName());
13819
      }
13820
 
13821
      int lastComparison = 0;
13822
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
13823
 
13824
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
13825
      if (lastComparison != 0) {
13826
        return lastComparison;
13827
      }
13828
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
13829
      if (lastComparison != 0) {
13830
        return lastComparison;
13831
      }
13832
      return 0;
13833
    }
13834
 
13835
    public void read(TProtocol iprot) throws TException {
13836
      TField field;
13837
      iprot.readStructBegin();
13838
      while (true)
13839
      {
13840
        field = iprot.readFieldBegin();
13841
        if (field.type == TType.STOP) { 
13842
          break;
13843
        }
13844
        _Fields fieldId = _Fields.findByThriftId(field.id);
13845
        if (fieldId == null) {
13846
          TProtocolUtil.skip(iprot, field.type);
13847
        } else {
13848
          switch (fieldId) {
13849
            case USER_ID:
13850
              if (field.type == TType.I64) {
13851
                this.userId = iprot.readI64();
13852
                setUserIdIsSet(true);
13853
              } else { 
13854
                TProtocolUtil.skip(iprot, field.type);
13855
              }
13856
              break;
13857
          }
13858
          iprot.readFieldEnd();
13859
        }
13860
      }
13861
      iprot.readStructEnd();
13862
      validate();
13863
    }
13864
 
13865
    public void write(TProtocol oprot) throws TException {
13866
      validate();
13867
 
13868
      oprot.writeStructBegin(STRUCT_DESC);
13869
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13870
      oprot.writeI64(this.userId);
13871
      oprot.writeFieldEnd();
13872
      oprot.writeFieldStop();
13873
      oprot.writeStructEnd();
13874
    }
13875
 
13876
    @Override
13877
    public String toString() {
13878
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
13879
      boolean first = true;
13880
 
13881
      sb.append("userId:");
13882
      sb.append(this.userId);
13883
      first = false;
13884
      sb.append(")");
13885
      return sb.toString();
13886
    }
13887
 
13888
    public void validate() throws TException {
13889
      // check for required fields
13890
    }
13891
 
13892
  }
13893
 
13894
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
13895
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
13896
 
13897
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
13898
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13899
 
13900
    private List<Address> success;
13901
    private UserContextException ucx;
13902
 
13903
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13904
    public enum _Fields implements TFieldIdEnum {
13905
      SUCCESS((short)0, "success"),
13906
      UCX((short)1, "ucx");
13907
 
13908
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13909
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13910
 
13911
      static {
13912
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13913
          byId.put((int)field._thriftId, field);
13914
          byName.put(field.getFieldName(), field);
13915
        }
13916
      }
13917
 
13918
      /**
13919
       * Find the _Fields constant that matches fieldId, or null if its not found.
13920
       */
13921
      public static _Fields findByThriftId(int fieldId) {
13922
        return byId.get(fieldId);
13923
      }
13924
 
13925
      /**
13926
       * Find the _Fields constant that matches fieldId, throwing an exception
13927
       * if it is not found.
13928
       */
13929
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13930
        _Fields fields = findByThriftId(fieldId);
13931
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13932
        return fields;
13933
      }
13934
 
13935
      /**
13936
       * Find the _Fields constant that matches name, or null if its not found.
13937
       */
13938
      public static _Fields findByName(String name) {
13939
        return byName.get(name);
13940
      }
13941
 
13942
      private final short _thriftId;
13943
      private final String _fieldName;
13944
 
13945
      _Fields(short thriftId, String fieldName) {
13946
        _thriftId = thriftId;
13947
        _fieldName = fieldName;
13948
      }
13949
 
13950
      public short getThriftFieldId() {
13951
        return _thriftId;
13952
      }
13953
 
13954
      public String getFieldName() {
13955
        return _fieldName;
13956
      }
13957
    }
13958
 
13959
    // isset id assignments
13960
 
13961
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13962
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13963
          new ListMetaData(TType.LIST, 
13964
              new StructMetaData(TType.STRUCT, Address.class))));
13965
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13966
          new FieldValueMetaData(TType.STRUCT)));
13967
    }});
13968
 
13969
    static {
13970
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
13971
    }
13972
 
13973
    public getAllAddressesForUser_result() {
13974
    }
13975
 
13976
    public getAllAddressesForUser_result(
13977
      List<Address> success,
13978
      UserContextException ucx)
13979
    {
13980
      this();
13981
      this.success = success;
13982
      this.ucx = ucx;
13983
    }
13984
 
13985
    /**
13986
     * Performs a deep copy on <i>other</i>.
13987
     */
13988
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
13989
      if (other.isSetSuccess()) {
13990
        List<Address> __this__success = new ArrayList<Address>();
13991
        for (Address other_element : other.success) {
13992
          __this__success.add(new Address(other_element));
13993
        }
13994
        this.success = __this__success;
13995
      }
13996
      if (other.isSetUcx()) {
13997
        this.ucx = new UserContextException(other.ucx);
13998
      }
13999
    }
14000
 
14001
    public getAllAddressesForUser_result deepCopy() {
14002
      return new getAllAddressesForUser_result(this);
14003
    }
14004
 
14005
    @Deprecated
14006
    public getAllAddressesForUser_result clone() {
14007
      return new getAllAddressesForUser_result(this);
14008
    }
14009
 
14010
    public int getSuccessSize() {
14011
      return (this.success == null) ? 0 : this.success.size();
14012
    }
14013
 
14014
    public java.util.Iterator<Address> getSuccessIterator() {
14015
      return (this.success == null) ? null : this.success.iterator();
14016
    }
14017
 
14018
    public void addToSuccess(Address elem) {
14019
      if (this.success == null) {
14020
        this.success = new ArrayList<Address>();
14021
      }
14022
      this.success.add(elem);
14023
    }
14024
 
14025
    public List<Address> getSuccess() {
14026
      return this.success;
14027
    }
14028
 
14029
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14030
      this.success = success;
14031
      return this;
14032
    }
14033
 
14034
    public void unsetSuccess() {
14035
      this.success = null;
14036
    }
14037
 
14038
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14039
    public boolean isSetSuccess() {
14040
      return this.success != null;
14041
    }
14042
 
14043
    public void setSuccessIsSet(boolean value) {
14044
      if (!value) {
14045
        this.success = null;
14046
      }
14047
    }
14048
 
14049
    public UserContextException getUcx() {
14050
      return this.ucx;
14051
    }
14052
 
14053
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14054
      this.ucx = ucx;
14055
      return this;
14056
    }
14057
 
14058
    public void unsetUcx() {
14059
      this.ucx = null;
14060
    }
14061
 
14062
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14063
    public boolean isSetUcx() {
14064
      return this.ucx != null;
14065
    }
14066
 
14067
    public void setUcxIsSet(boolean value) {
14068
      if (!value) {
14069
        this.ucx = null;
14070
      }
14071
    }
14072
 
14073
    public void setFieldValue(_Fields field, Object value) {
14074
      switch (field) {
14075
      case SUCCESS:
14076
        if (value == null) {
14077
          unsetSuccess();
14078
        } else {
14079
          setSuccess((List<Address>)value);
14080
        }
14081
        break;
14082
 
14083
      case UCX:
14084
        if (value == null) {
14085
          unsetUcx();
14086
        } else {
14087
          setUcx((UserContextException)value);
14088
        }
14089
        break;
14090
 
14091
      }
14092
    }
14093
 
14094
    public void setFieldValue(int fieldID, Object value) {
14095
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14096
    }
14097
 
14098
    public Object getFieldValue(_Fields field) {
14099
      switch (field) {
14100
      case SUCCESS:
14101
        return getSuccess();
14102
 
14103
      case UCX:
14104
        return getUcx();
14105
 
14106
      }
14107
      throw new IllegalStateException();
14108
    }
14109
 
14110
    public Object getFieldValue(int fieldId) {
14111
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14112
    }
14113
 
14114
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14115
    public boolean isSet(_Fields field) {
14116
      switch (field) {
14117
      case SUCCESS:
14118
        return isSetSuccess();
14119
      case UCX:
14120
        return isSetUcx();
14121
      }
14122
      throw new IllegalStateException();
14123
    }
14124
 
14125
    public boolean isSet(int fieldID) {
14126
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14127
    }
14128
 
14129
    @Override
14130
    public boolean equals(Object that) {
14131
      if (that == null)
14132
        return false;
14133
      if (that instanceof getAllAddressesForUser_result)
14134
        return this.equals((getAllAddressesForUser_result)that);
14135
      return false;
14136
    }
14137
 
14138
    public boolean equals(getAllAddressesForUser_result that) {
14139
      if (that == null)
14140
        return false;
14141
 
14142
      boolean this_present_success = true && this.isSetSuccess();
14143
      boolean that_present_success = true && that.isSetSuccess();
14144
      if (this_present_success || that_present_success) {
14145
        if (!(this_present_success && that_present_success))
14146
          return false;
14147
        if (!this.success.equals(that.success))
14148
          return false;
14149
      }
14150
 
14151
      boolean this_present_ucx = true && this.isSetUcx();
14152
      boolean that_present_ucx = true && that.isSetUcx();
14153
      if (this_present_ucx || that_present_ucx) {
14154
        if (!(this_present_ucx && that_present_ucx))
14155
          return false;
14156
        if (!this.ucx.equals(that.ucx))
14157
          return false;
14158
      }
14159
 
14160
      return true;
14161
    }
14162
 
14163
    @Override
14164
    public int hashCode() {
14165
      return 0;
14166
    }
14167
 
14168
    public int compareTo(getAllAddressesForUser_result other) {
14169
      if (!getClass().equals(other.getClass())) {
14170
        return getClass().getName().compareTo(other.getClass().getName());
14171
      }
14172
 
14173
      int lastComparison = 0;
14174
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14175
 
14176
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14177
      if (lastComparison != 0) {
14178
        return lastComparison;
14179
      }
14180
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14181
      if (lastComparison != 0) {
14182
        return lastComparison;
14183
      }
14184
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14185
      if (lastComparison != 0) {
14186
        return lastComparison;
14187
      }
14188
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14189
      if (lastComparison != 0) {
14190
        return lastComparison;
14191
      }
14192
      return 0;
14193
    }
14194
 
14195
    public void read(TProtocol iprot) throws TException {
14196
      TField field;
14197
      iprot.readStructBegin();
14198
      while (true)
14199
      {
14200
        field = iprot.readFieldBegin();
14201
        if (field.type == TType.STOP) { 
14202
          break;
14203
        }
14204
        _Fields fieldId = _Fields.findByThriftId(field.id);
14205
        if (fieldId == null) {
14206
          TProtocolUtil.skip(iprot, field.type);
14207
        } else {
14208
          switch (fieldId) {
14209
            case SUCCESS:
14210
              if (field.type == TType.LIST) {
14211
                {
14212
                  TList _list21 = iprot.readListBegin();
14213
                  this.success = new ArrayList<Address>(_list21.size);
14214
                  for (int _i22 = 0; _i22 < _list21.size; ++_i22)
14215
                  {
14216
                    Address _elem23;
14217
                    _elem23 = new Address();
14218
                    _elem23.read(iprot);
14219
                    this.success.add(_elem23);
14220
                  }
14221
                  iprot.readListEnd();
14222
                }
14223
              } else { 
14224
                TProtocolUtil.skip(iprot, field.type);
14225
              }
14226
              break;
14227
            case UCX:
14228
              if (field.type == TType.STRUCT) {
14229
                this.ucx = new UserContextException();
14230
                this.ucx.read(iprot);
14231
              } else { 
14232
                TProtocolUtil.skip(iprot, field.type);
14233
              }
14234
              break;
14235
          }
14236
          iprot.readFieldEnd();
14237
        }
14238
      }
14239
      iprot.readStructEnd();
14240
      validate();
14241
    }
14242
 
14243
    public void write(TProtocol oprot) throws TException {
14244
      oprot.writeStructBegin(STRUCT_DESC);
14245
 
14246
      if (this.isSetSuccess()) {
14247
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14248
        {
14249
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
14250
          for (Address _iter24 : this.success)
14251
          {
14252
            _iter24.write(oprot);
14253
          }
14254
          oprot.writeListEnd();
14255
        }
14256
        oprot.writeFieldEnd();
14257
      } else if (this.isSetUcx()) {
14258
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14259
        this.ucx.write(oprot);
14260
        oprot.writeFieldEnd();
14261
      }
14262
      oprot.writeFieldStop();
14263
      oprot.writeStructEnd();
14264
    }
14265
 
14266
    @Override
14267
    public String toString() {
14268
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14269
      boolean first = true;
14270
 
14271
      sb.append("success:");
14272
      if (this.success == null) {
14273
        sb.append("null");
14274
      } else {
14275
        sb.append(this.success);
14276
      }
14277
      first = false;
14278
      if (!first) sb.append(", ");
14279
      sb.append("ucx:");
14280
      if (this.ucx == null) {
14281
        sb.append("null");
14282
      } else {
14283
        sb.append(this.ucx);
14284
      }
14285
      first = false;
14286
      sb.append(")");
14287
      return sb.toString();
14288
    }
14289
 
14290
    public void validate() throws TException {
14291
      // check for required fields
14292
    }
14293
 
14294
  }
14295
 
14296
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14297
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14298
 
14299
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14300
 
14301
    private long userId;
14302
 
14303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14304
    public enum _Fields implements TFieldIdEnum {
14305
      USER_ID((short)1, "userId");
14306
 
14307
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14308
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14309
 
14310
      static {
14311
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14312
          byId.put((int)field._thriftId, field);
14313
          byName.put(field.getFieldName(), field);
14314
        }
14315
      }
14316
 
14317
      /**
14318
       * Find the _Fields constant that matches fieldId, or null if its not found.
14319
       */
14320
      public static _Fields findByThriftId(int fieldId) {
14321
        return byId.get(fieldId);
14322
      }
14323
 
14324
      /**
14325
       * Find the _Fields constant that matches fieldId, throwing an exception
14326
       * if it is not found.
14327
       */
14328
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14329
        _Fields fields = findByThriftId(fieldId);
14330
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14331
        return fields;
14332
      }
14333
 
14334
      /**
14335
       * Find the _Fields constant that matches name, or null if its not found.
14336
       */
14337
      public static _Fields findByName(String name) {
14338
        return byName.get(name);
14339
      }
14340
 
14341
      private final short _thriftId;
14342
      private final String _fieldName;
14343
 
14344
      _Fields(short thriftId, String fieldName) {
14345
        _thriftId = thriftId;
14346
        _fieldName = fieldName;
14347
      }
14348
 
14349
      public short getThriftFieldId() {
14350
        return _thriftId;
14351
      }
14352
 
14353
      public String getFieldName() {
14354
        return _fieldName;
14355
      }
14356
    }
14357
 
14358
    // isset id assignments
14359
    private static final int __USERID_ISSET_ID = 0;
14360
    private BitSet __isset_bit_vector = new BitSet(1);
14361
 
14362
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14363
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14364
          new FieldValueMetaData(TType.I64)));
14365
    }});
14366
 
14367
    static {
14368
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14369
    }
14370
 
14371
    public getDefaultAddressId_args() {
14372
    }
14373
 
14374
    public getDefaultAddressId_args(
14375
      long userId)
14376
    {
14377
      this();
14378
      this.userId = userId;
14379
      setUserIdIsSet(true);
14380
    }
14381
 
14382
    /**
14383
     * Performs a deep copy on <i>other</i>.
14384
     */
14385
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14386
      __isset_bit_vector.clear();
14387
      __isset_bit_vector.or(other.__isset_bit_vector);
14388
      this.userId = other.userId;
14389
    }
14390
 
14391
    public getDefaultAddressId_args deepCopy() {
14392
      return new getDefaultAddressId_args(this);
14393
    }
14394
 
14395
    @Deprecated
14396
    public getDefaultAddressId_args clone() {
14397
      return new getDefaultAddressId_args(this);
14398
    }
14399
 
14400
    public long getUserId() {
14401
      return this.userId;
14402
    }
14403
 
14404
    public getDefaultAddressId_args setUserId(long userId) {
14405
      this.userId = userId;
14406
      setUserIdIsSet(true);
14407
      return this;
14408
    }
14409
 
14410
    public void unsetUserId() {
14411
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14412
    }
14413
 
14414
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14415
    public boolean isSetUserId() {
14416
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14417
    }
14418
 
14419
    public void setUserIdIsSet(boolean value) {
14420
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14421
    }
14422
 
14423
    public void setFieldValue(_Fields field, Object value) {
14424
      switch (field) {
14425
      case USER_ID:
14426
        if (value == null) {
14427
          unsetUserId();
14428
        } else {
14429
          setUserId((Long)value);
14430
        }
14431
        break;
14432
 
14433
      }
14434
    }
14435
 
14436
    public void setFieldValue(int fieldID, Object value) {
14437
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14438
    }
14439
 
14440
    public Object getFieldValue(_Fields field) {
14441
      switch (field) {
14442
      case USER_ID:
14443
        return new Long(getUserId());
14444
 
14445
      }
14446
      throw new IllegalStateException();
14447
    }
14448
 
14449
    public Object getFieldValue(int fieldId) {
14450
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14451
    }
14452
 
14453
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14454
    public boolean isSet(_Fields field) {
14455
      switch (field) {
14456
      case USER_ID:
14457
        return isSetUserId();
14458
      }
14459
      throw new IllegalStateException();
14460
    }
14461
 
14462
    public boolean isSet(int fieldID) {
14463
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14464
    }
14465
 
14466
    @Override
14467
    public boolean equals(Object that) {
14468
      if (that == null)
14469
        return false;
14470
      if (that instanceof getDefaultAddressId_args)
14471
        return this.equals((getDefaultAddressId_args)that);
14472
      return false;
14473
    }
14474
 
14475
    public boolean equals(getDefaultAddressId_args that) {
14476
      if (that == null)
14477
        return false;
14478
 
14479
      boolean this_present_userId = true;
14480
      boolean that_present_userId = true;
14481
      if (this_present_userId || that_present_userId) {
14482
        if (!(this_present_userId && that_present_userId))
14483
          return false;
14484
        if (this.userId != that.userId)
14485
          return false;
14486
      }
14487
 
14488
      return true;
14489
    }
14490
 
14491
    @Override
14492
    public int hashCode() {
14493
      return 0;
14494
    }
14495
 
14496
    public int compareTo(getDefaultAddressId_args other) {
14497
      if (!getClass().equals(other.getClass())) {
14498
        return getClass().getName().compareTo(other.getClass().getName());
14499
      }
14500
 
14501
      int lastComparison = 0;
14502
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14503
 
14504
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14505
      if (lastComparison != 0) {
14506
        return lastComparison;
14507
      }
14508
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14509
      if (lastComparison != 0) {
14510
        return lastComparison;
14511
      }
14512
      return 0;
14513
    }
14514
 
14515
    public void read(TProtocol iprot) throws TException {
14516
      TField field;
14517
      iprot.readStructBegin();
14518
      while (true)
14519
      {
14520
        field = iprot.readFieldBegin();
14521
        if (field.type == TType.STOP) { 
14522
          break;
14523
        }
14524
        _Fields fieldId = _Fields.findByThriftId(field.id);
14525
        if (fieldId == null) {
14526
          TProtocolUtil.skip(iprot, field.type);
14527
        } else {
14528
          switch (fieldId) {
14529
            case USER_ID:
14530
              if (field.type == TType.I64) {
14531
                this.userId = iprot.readI64();
14532
                setUserIdIsSet(true);
14533
              } else { 
14534
                TProtocolUtil.skip(iprot, field.type);
14535
              }
14536
              break;
14537
          }
14538
          iprot.readFieldEnd();
14539
        }
14540
      }
14541
      iprot.readStructEnd();
14542
      validate();
14543
    }
14544
 
14545
    public void write(TProtocol oprot) throws TException {
14546
      validate();
14547
 
14548
      oprot.writeStructBegin(STRUCT_DESC);
14549
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14550
      oprot.writeI64(this.userId);
14551
      oprot.writeFieldEnd();
14552
      oprot.writeFieldStop();
14553
      oprot.writeStructEnd();
14554
    }
14555
 
14556
    @Override
14557
    public String toString() {
14558
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14559
      boolean first = true;
14560
 
14561
      sb.append("userId:");
14562
      sb.append(this.userId);
14563
      first = false;
14564
      sb.append(")");
14565
      return sb.toString();
14566
    }
14567
 
14568
    public void validate() throws TException {
14569
      // check for required fields
14570
    }
14571
 
14572
  }
14573
 
14574
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
14575
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
14576
 
14577
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
14578
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14579
 
14580
    private long success;
14581
    private UserContextException ucx;
14582
 
14583
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14584
    public enum _Fields implements TFieldIdEnum {
14585
      SUCCESS((short)0, "success"),
14586
      UCX((short)1, "ucx");
14587
 
14588
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14589
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14590
 
14591
      static {
14592
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14593
          byId.put((int)field._thriftId, field);
14594
          byName.put(field.getFieldName(), field);
14595
        }
14596
      }
14597
 
14598
      /**
14599
       * Find the _Fields constant that matches fieldId, or null if its not found.
14600
       */
14601
      public static _Fields findByThriftId(int fieldId) {
14602
        return byId.get(fieldId);
14603
      }
14604
 
14605
      /**
14606
       * Find the _Fields constant that matches fieldId, throwing an exception
14607
       * if it is not found.
14608
       */
14609
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14610
        _Fields fields = findByThriftId(fieldId);
14611
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14612
        return fields;
14613
      }
14614
 
14615
      /**
14616
       * Find the _Fields constant that matches name, or null if its not found.
14617
       */
14618
      public static _Fields findByName(String name) {
14619
        return byName.get(name);
14620
      }
14621
 
14622
      private final short _thriftId;
14623
      private final String _fieldName;
14624
 
14625
      _Fields(short thriftId, String fieldName) {
14626
        _thriftId = thriftId;
14627
        _fieldName = fieldName;
14628
      }
14629
 
14630
      public short getThriftFieldId() {
14631
        return _thriftId;
14632
      }
14633
 
14634
      public String getFieldName() {
14635
        return _fieldName;
14636
      }
14637
    }
14638
 
14639
    // isset id assignments
14640
    private static final int __SUCCESS_ISSET_ID = 0;
14641
    private BitSet __isset_bit_vector = new BitSet(1);
14642
 
14643
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14644
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14645
          new FieldValueMetaData(TType.I64)));
14646
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14647
          new FieldValueMetaData(TType.STRUCT)));
14648
    }});
14649
 
14650
    static {
14651
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
14652
    }
14653
 
14654
    public getDefaultAddressId_result() {
14655
    }
14656
 
14657
    public getDefaultAddressId_result(
14658
      long success,
14659
      UserContextException ucx)
14660
    {
14661
      this();
14662
      this.success = success;
14663
      setSuccessIsSet(true);
14664
      this.ucx = ucx;
14665
    }
14666
 
14667
    /**
14668
     * Performs a deep copy on <i>other</i>.
14669
     */
14670
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
14671
      __isset_bit_vector.clear();
14672
      __isset_bit_vector.or(other.__isset_bit_vector);
14673
      this.success = other.success;
14674
      if (other.isSetUcx()) {
14675
        this.ucx = new UserContextException(other.ucx);
14676
      }
14677
    }
14678
 
14679
    public getDefaultAddressId_result deepCopy() {
14680
      return new getDefaultAddressId_result(this);
14681
    }
14682
 
14683
    @Deprecated
14684
    public getDefaultAddressId_result clone() {
14685
      return new getDefaultAddressId_result(this);
14686
    }
14687
 
14688
    public long getSuccess() {
14689
      return this.success;
14690
    }
14691
 
14692
    public getDefaultAddressId_result setSuccess(long success) {
14693
      this.success = success;
14694
      setSuccessIsSet(true);
14695
      return this;
14696
    }
14697
 
14698
    public void unsetSuccess() {
14699
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14700
    }
14701
 
14702
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14703
    public boolean isSetSuccess() {
14704
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14705
    }
14706
 
14707
    public void setSuccessIsSet(boolean value) {
14708
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14709
    }
14710
 
14711
    public UserContextException getUcx() {
14712
      return this.ucx;
14713
    }
14714
 
14715
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
14716
      this.ucx = ucx;
14717
      return this;
14718
    }
14719
 
14720
    public void unsetUcx() {
14721
      this.ucx = null;
14722
    }
14723
 
14724
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14725
    public boolean isSetUcx() {
14726
      return this.ucx != null;
14727
    }
14728
 
14729
    public void setUcxIsSet(boolean value) {
14730
      if (!value) {
14731
        this.ucx = null;
14732
      }
14733
    }
14734
 
14735
    public void setFieldValue(_Fields field, Object value) {
14736
      switch (field) {
14737
      case SUCCESS:
14738
        if (value == null) {
14739
          unsetSuccess();
14740
        } else {
14741
          setSuccess((Long)value);
14742
        }
14743
        break;
14744
 
14745
      case UCX:
14746
        if (value == null) {
14747
          unsetUcx();
14748
        } else {
14749
          setUcx((UserContextException)value);
14750
        }
14751
        break;
14752
 
14753
      }
14754
    }
14755
 
14756
    public void setFieldValue(int fieldID, Object value) {
14757
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14758
    }
14759
 
14760
    public Object getFieldValue(_Fields field) {
14761
      switch (field) {
14762
      case SUCCESS:
14763
        return new Long(getSuccess());
14764
 
14765
      case UCX:
14766
        return getUcx();
14767
 
14768
      }
14769
      throw new IllegalStateException();
14770
    }
14771
 
14772
    public Object getFieldValue(int fieldId) {
14773
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14774
    }
14775
 
14776
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14777
    public boolean isSet(_Fields field) {
14778
      switch (field) {
14779
      case SUCCESS:
14780
        return isSetSuccess();
14781
      case UCX:
14782
        return isSetUcx();
14783
      }
14784
      throw new IllegalStateException();
14785
    }
14786
 
14787
    public boolean isSet(int fieldID) {
14788
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14789
    }
14790
 
14791
    @Override
14792
    public boolean equals(Object that) {
14793
      if (that == null)
14794
        return false;
14795
      if (that instanceof getDefaultAddressId_result)
14796
        return this.equals((getDefaultAddressId_result)that);
14797
      return false;
14798
    }
14799
 
14800
    public boolean equals(getDefaultAddressId_result that) {
14801
      if (that == null)
14802
        return false;
14803
 
14804
      boolean this_present_success = true;
14805
      boolean that_present_success = true;
14806
      if (this_present_success || that_present_success) {
14807
        if (!(this_present_success && that_present_success))
14808
          return false;
14809
        if (this.success != that.success)
14810
          return false;
14811
      }
14812
 
14813
      boolean this_present_ucx = true && this.isSetUcx();
14814
      boolean that_present_ucx = true && that.isSetUcx();
14815
      if (this_present_ucx || that_present_ucx) {
14816
        if (!(this_present_ucx && that_present_ucx))
14817
          return false;
14818
        if (!this.ucx.equals(that.ucx))
14819
          return false;
14820
      }
14821
 
14822
      return true;
14823
    }
14824
 
14825
    @Override
14826
    public int hashCode() {
14827
      return 0;
14828
    }
14829
 
14830
    public int compareTo(getDefaultAddressId_result other) {
14831
      if (!getClass().equals(other.getClass())) {
14832
        return getClass().getName().compareTo(other.getClass().getName());
14833
      }
14834
 
14835
      int lastComparison = 0;
14836
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
14837
 
14838
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14839
      if (lastComparison != 0) {
14840
        return lastComparison;
14841
      }
14842
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14843
      if (lastComparison != 0) {
14844
        return lastComparison;
14845
      }
14846
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14847
      if (lastComparison != 0) {
14848
        return lastComparison;
14849
      }
14850
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14851
      if (lastComparison != 0) {
14852
        return lastComparison;
14853
      }
14854
      return 0;
14855
    }
14856
 
14857
    public void read(TProtocol iprot) throws TException {
14858
      TField field;
14859
      iprot.readStructBegin();
14860
      while (true)
14861
      {
14862
        field = iprot.readFieldBegin();
14863
        if (field.type == TType.STOP) { 
14864
          break;
14865
        }
14866
        _Fields fieldId = _Fields.findByThriftId(field.id);
14867
        if (fieldId == null) {
14868
          TProtocolUtil.skip(iprot, field.type);
14869
        } else {
14870
          switch (fieldId) {
14871
            case SUCCESS:
14872
              if (field.type == TType.I64) {
14873
                this.success = iprot.readI64();
14874
                setSuccessIsSet(true);
14875
              } else { 
14876
                TProtocolUtil.skip(iprot, field.type);
14877
              }
14878
              break;
14879
            case UCX:
14880
              if (field.type == TType.STRUCT) {
14881
                this.ucx = new UserContextException();
14882
                this.ucx.read(iprot);
14883
              } else { 
14884
                TProtocolUtil.skip(iprot, field.type);
14885
              }
14886
              break;
14887
          }
14888
          iprot.readFieldEnd();
14889
        }
14890
      }
14891
      iprot.readStructEnd();
14892
      validate();
14893
    }
14894
 
14895
    public void write(TProtocol oprot) throws TException {
14896
      oprot.writeStructBegin(STRUCT_DESC);
14897
 
14898
      if (this.isSetSuccess()) {
14899
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14900
        oprot.writeI64(this.success);
14901
        oprot.writeFieldEnd();
14902
      } else if (this.isSetUcx()) {
14903
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14904
        this.ucx.write(oprot);
14905
        oprot.writeFieldEnd();
14906
      }
14907
      oprot.writeFieldStop();
14908
      oprot.writeStructEnd();
14909
    }
14910
 
14911
    @Override
14912
    public String toString() {
14913
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
14914
      boolean first = true;
14915
 
14916
      sb.append("success:");
14917
      sb.append(this.success);
14918
      first = false;
14919
      if (!first) sb.append(", ");
14920
      sb.append("ucx:");
14921
      if (this.ucx == null) {
14922
        sb.append("null");
14923
      } else {
14924
        sb.append(this.ucx);
14925
      }
14926
      first = false;
14927
      sb.append(")");
14928
      return sb.toString();
14929
    }
14930
 
14931
    public void validate() throws TException {
14932
      // check for required fields
14933
    }
14934
 
14935
  }
14936
 
553 chandransh 14937
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
14938
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 14939
 
553 chandransh 14940
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 14941
 
553 chandransh 14942
    private long userId;
48 ashish 14943
 
14944
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14945
    public enum _Fields implements TFieldIdEnum {
553 chandransh 14946
      USER_ID((short)1, "userId");
48 ashish 14947
 
14948
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14949
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14950
 
14951
      static {
14952
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14953
          byId.put((int)field._thriftId, field);
14954
          byName.put(field.getFieldName(), field);
14955
        }
14956
      }
14957
 
14958
      /**
14959
       * Find the _Fields constant that matches fieldId, or null if its not found.
14960
       */
14961
      public static _Fields findByThriftId(int fieldId) {
14962
        return byId.get(fieldId);
14963
      }
14964
 
14965
      /**
14966
       * Find the _Fields constant that matches fieldId, throwing an exception
14967
       * if it is not found.
14968
       */
14969
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14970
        _Fields fields = findByThriftId(fieldId);
14971
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14972
        return fields;
14973
      }
14974
 
14975
      /**
14976
       * Find the _Fields constant that matches name, or null if its not found.
14977
       */
14978
      public static _Fields findByName(String name) {
14979
        return byName.get(name);
14980
      }
14981
 
14982
      private final short _thriftId;
14983
      private final String _fieldName;
14984
 
14985
      _Fields(short thriftId, String fieldName) {
14986
        _thriftId = thriftId;
14987
        _fieldName = fieldName;
14988
      }
14989
 
14990
      public short getThriftFieldId() {
14991
        return _thriftId;
14992
      }
14993
 
14994
      public String getFieldName() {
14995
        return _fieldName;
14996
      }
14997
    }
14998
 
14999
    // isset id assignments
15000
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 15001
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 15002
 
15003
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15004
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 15005
          new FieldValueMetaData(TType.I64)));
15006
    }});
15007
 
15008
    static {
553 chandransh 15009
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 15010
    }
15011
 
553 chandransh 15012
    public createCart_args() {
48 ashish 15013
    }
15014
 
553 chandransh 15015
    public createCart_args(
15016
      long userId)
48 ashish 15017
    {
15018
      this();
553 chandransh 15019
      this.userId = userId;
15020
      setUserIdIsSet(true);
48 ashish 15021
    }
15022
 
15023
    /**
15024
     * Performs a deep copy on <i>other</i>.
15025
     */
553 chandransh 15026
    public createCart_args(createCart_args other) {
48 ashish 15027
      __isset_bit_vector.clear();
15028
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15029
      this.userId = other.userId;
48 ashish 15030
    }
15031
 
553 chandransh 15032
    public createCart_args deepCopy() {
15033
      return new createCart_args(this);
48 ashish 15034
    }
15035
 
15036
    @Deprecated
553 chandransh 15037
    public createCart_args clone() {
15038
      return new createCart_args(this);
48 ashish 15039
    }
15040
 
553 chandransh 15041
    public long getUserId() {
15042
      return this.userId;
48 ashish 15043
    }
15044
 
553 chandransh 15045
    public createCart_args setUserId(long userId) {
15046
      this.userId = userId;
15047
      setUserIdIsSet(true);
48 ashish 15048
      return this;
15049
    }
15050
 
553 chandransh 15051
    public void unsetUserId() {
48 ashish 15052
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15053
    }
15054
 
553 chandransh 15055
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15056
    public boolean isSetUserId() {
48 ashish 15057
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15058
    }
15059
 
553 chandransh 15060
    public void setUserIdIsSet(boolean value) {
48 ashish 15061
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15062
    }
15063
 
15064
    public void setFieldValue(_Fields field, Object value) {
15065
      switch (field) {
553 chandransh 15066
      case USER_ID:
48 ashish 15067
        if (value == null) {
553 chandransh 15068
          unsetUserId();
48 ashish 15069
        } else {
553 chandransh 15070
          setUserId((Long)value);
48 ashish 15071
        }
15072
        break;
15073
 
15074
      }
15075
    }
15076
 
15077
    public void setFieldValue(int fieldID, Object value) {
15078
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15079
    }
15080
 
15081
    public Object getFieldValue(_Fields field) {
15082
      switch (field) {
553 chandransh 15083
      case USER_ID:
15084
        return new Long(getUserId());
48 ashish 15085
 
15086
      }
15087
      throw new IllegalStateException();
15088
    }
15089
 
15090
    public Object getFieldValue(int fieldId) {
15091
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15092
    }
15093
 
15094
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15095
    public boolean isSet(_Fields field) {
15096
      switch (field) {
553 chandransh 15097
      case USER_ID:
15098
        return isSetUserId();
48 ashish 15099
      }
15100
      throw new IllegalStateException();
15101
    }
15102
 
15103
    public boolean isSet(int fieldID) {
15104
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15105
    }
15106
 
15107
    @Override
15108
    public boolean equals(Object that) {
15109
      if (that == null)
15110
        return false;
553 chandransh 15111
      if (that instanceof createCart_args)
15112
        return this.equals((createCart_args)that);
48 ashish 15113
      return false;
15114
    }
15115
 
553 chandransh 15116
    public boolean equals(createCart_args that) {
48 ashish 15117
      if (that == null)
15118
        return false;
15119
 
553 chandransh 15120
      boolean this_present_userId = true;
15121
      boolean that_present_userId = true;
15122
      if (this_present_userId || that_present_userId) {
15123
        if (!(this_present_userId && that_present_userId))
48 ashish 15124
          return false;
553 chandransh 15125
        if (this.userId != that.userId)
48 ashish 15126
          return false;
15127
      }
15128
 
15129
      return true;
15130
    }
15131
 
15132
    @Override
15133
    public int hashCode() {
15134
      return 0;
15135
    }
15136
 
553 chandransh 15137
    public int compareTo(createCart_args other) {
48 ashish 15138
      if (!getClass().equals(other.getClass())) {
15139
        return getClass().getName().compareTo(other.getClass().getName());
15140
      }
15141
 
15142
      int lastComparison = 0;
553 chandransh 15143
      createCart_args typedOther = (createCart_args)other;
48 ashish 15144
 
553 chandransh 15145
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 15146
      if (lastComparison != 0) {
15147
        return lastComparison;
15148
      }
553 chandransh 15149
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 15150
      if (lastComparison != 0) {
15151
        return lastComparison;
15152
      }
15153
      return 0;
15154
    }
15155
 
15156
    public void read(TProtocol iprot) throws TException {
15157
      TField field;
15158
      iprot.readStructBegin();
15159
      while (true)
15160
      {
15161
        field = iprot.readFieldBegin();
15162
        if (field.type == TType.STOP) { 
15163
          break;
15164
        }
15165
        _Fields fieldId = _Fields.findByThriftId(field.id);
15166
        if (fieldId == null) {
15167
          TProtocolUtil.skip(iprot, field.type);
15168
        } else {
15169
          switch (fieldId) {
553 chandransh 15170
            case USER_ID:
48 ashish 15171
              if (field.type == TType.I64) {
553 chandransh 15172
                this.userId = iprot.readI64();
15173
                setUserIdIsSet(true);
48 ashish 15174
              } else { 
15175
                TProtocolUtil.skip(iprot, field.type);
15176
              }
15177
              break;
15178
          }
15179
          iprot.readFieldEnd();
15180
        }
15181
      }
15182
      iprot.readStructEnd();
15183
      validate();
15184
    }
15185
 
15186
    public void write(TProtocol oprot) throws TException {
15187
      validate();
15188
 
15189
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 15190
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15191
      oprot.writeI64(this.userId);
48 ashish 15192
      oprot.writeFieldEnd();
15193
      oprot.writeFieldStop();
15194
      oprot.writeStructEnd();
15195
    }
15196
 
15197
    @Override
15198
    public String toString() {
553 chandransh 15199
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 15200
      boolean first = true;
15201
 
553 chandransh 15202
      sb.append("userId:");
15203
      sb.append(this.userId);
48 ashish 15204
      first = false;
15205
      sb.append(")");
15206
      return sb.toString();
15207
    }
15208
 
15209
    public void validate() throws TException {
15210
      // check for required fields
15211
    }
15212
 
15213
  }
15214
 
553 chandransh 15215
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
15216
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 15217
 
553 chandransh 15218
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15219
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 15220
 
553 chandransh 15221
    private long success;
15222
    private ShoppingCartException scx;
48 ashish 15223
 
15224
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15225
    public enum _Fields implements TFieldIdEnum {
15226
      SUCCESS((short)0, "success"),
553 chandransh 15227
      SCX((short)1, "scx");
48 ashish 15228
 
15229
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15230
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15231
 
15232
      static {
15233
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15234
          byId.put((int)field._thriftId, field);
15235
          byName.put(field.getFieldName(), field);
15236
        }
15237
      }
15238
 
15239
      /**
15240
       * Find the _Fields constant that matches fieldId, or null if its not found.
15241
       */
15242
      public static _Fields findByThriftId(int fieldId) {
15243
        return byId.get(fieldId);
15244
      }
15245
 
15246
      /**
15247
       * Find the _Fields constant that matches fieldId, throwing an exception
15248
       * if it is not found.
15249
       */
15250
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15251
        _Fields fields = findByThriftId(fieldId);
15252
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15253
        return fields;
15254
      }
15255
 
15256
      /**
15257
       * Find the _Fields constant that matches name, or null if its not found.
15258
       */
15259
      public static _Fields findByName(String name) {
15260
        return byName.get(name);
15261
      }
15262
 
15263
      private final short _thriftId;
15264
      private final String _fieldName;
15265
 
15266
      _Fields(short thriftId, String fieldName) {
15267
        _thriftId = thriftId;
15268
        _fieldName = fieldName;
15269
      }
15270
 
15271
      public short getThriftFieldId() {
15272
        return _thriftId;
15273
      }
15274
 
15275
      public String getFieldName() {
15276
        return _fieldName;
15277
      }
15278
    }
15279
 
15280
    // isset id assignments
15281
    private static final int __SUCCESS_ISSET_ID = 0;
15282
    private BitSet __isset_bit_vector = new BitSet(1);
15283
 
15284
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15285
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 15286
          new FieldValueMetaData(TType.I64)));
15287
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 15288
          new FieldValueMetaData(TType.STRUCT)));
15289
    }});
15290
 
15291
    static {
553 chandransh 15292
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 15293
    }
15294
 
553 chandransh 15295
    public createCart_result() {
48 ashish 15296
    }
15297
 
553 chandransh 15298
    public createCart_result(
15299
      long success,
15300
      ShoppingCartException scx)
48 ashish 15301
    {
15302
      this();
15303
      this.success = success;
15304
      setSuccessIsSet(true);
553 chandransh 15305
      this.scx = scx;
48 ashish 15306
    }
15307
 
15308
    /**
15309
     * Performs a deep copy on <i>other</i>.
15310
     */
553 chandransh 15311
    public createCart_result(createCart_result other) {
48 ashish 15312
      __isset_bit_vector.clear();
15313
      __isset_bit_vector.or(other.__isset_bit_vector);
15314
      this.success = other.success;
553 chandransh 15315
      if (other.isSetScx()) {
15316
        this.scx = new ShoppingCartException(other.scx);
48 ashish 15317
      }
15318
    }
15319
 
553 chandransh 15320
    public createCart_result deepCopy() {
15321
      return new createCart_result(this);
48 ashish 15322
    }
15323
 
15324
    @Deprecated
553 chandransh 15325
    public createCart_result clone() {
15326
      return new createCart_result(this);
48 ashish 15327
    }
15328
 
553 chandransh 15329
    public long getSuccess() {
48 ashish 15330
      return this.success;
15331
    }
15332
 
553 chandransh 15333
    public createCart_result setSuccess(long success) {
48 ashish 15334
      this.success = success;
15335
      setSuccessIsSet(true);
15336
      return this;
15337
    }
15338
 
15339
    public void unsetSuccess() {
15340
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15341
    }
15342
 
15343
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15344
    public boolean isSetSuccess() {
15345
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15346
    }
15347
 
15348
    public void setSuccessIsSet(boolean value) {
15349
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15350
    }
15351
 
553 chandransh 15352
    public ShoppingCartException getScx() {
15353
      return this.scx;
48 ashish 15354
    }
15355
 
553 chandransh 15356
    public createCart_result setScx(ShoppingCartException scx) {
15357
      this.scx = scx;
48 ashish 15358
      return this;
15359
    }
15360
 
553 chandransh 15361
    public void unsetScx() {
15362
      this.scx = null;
48 ashish 15363
    }
15364
 
553 chandransh 15365
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15366
    public boolean isSetScx() {
15367
      return this.scx != null;
48 ashish 15368
    }
15369
 
553 chandransh 15370
    public void setScxIsSet(boolean value) {
48 ashish 15371
      if (!value) {
553 chandransh 15372
        this.scx = null;
48 ashish 15373
      }
15374
    }
15375
 
15376
    public void setFieldValue(_Fields field, Object value) {
15377
      switch (field) {
15378
      case SUCCESS:
15379
        if (value == null) {
15380
          unsetSuccess();
15381
        } else {
553 chandransh 15382
          setSuccess((Long)value);
48 ashish 15383
        }
15384
        break;
15385
 
553 chandransh 15386
      case SCX:
48 ashish 15387
        if (value == null) {
553 chandransh 15388
          unsetScx();
48 ashish 15389
        } else {
553 chandransh 15390
          setScx((ShoppingCartException)value);
48 ashish 15391
        }
15392
        break;
15393
 
15394
      }
15395
    }
15396
 
15397
    public void setFieldValue(int fieldID, Object value) {
15398
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15399
    }
15400
 
15401
    public Object getFieldValue(_Fields field) {
15402
      switch (field) {
15403
      case SUCCESS:
553 chandransh 15404
        return new Long(getSuccess());
48 ashish 15405
 
553 chandransh 15406
      case SCX:
15407
        return getScx();
48 ashish 15408
 
15409
      }
15410
      throw new IllegalStateException();
15411
    }
15412
 
15413
    public Object getFieldValue(int fieldId) {
15414
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15415
    }
15416
 
15417
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15418
    public boolean isSet(_Fields field) {
15419
      switch (field) {
15420
      case SUCCESS:
15421
        return isSetSuccess();
553 chandransh 15422
      case SCX:
15423
        return isSetScx();
48 ashish 15424
      }
15425
      throw new IllegalStateException();
15426
    }
15427
 
15428
    public boolean isSet(int fieldID) {
15429
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15430
    }
15431
 
15432
    @Override
15433
    public boolean equals(Object that) {
15434
      if (that == null)
15435
        return false;
553 chandransh 15436
      if (that instanceof createCart_result)
15437
        return this.equals((createCart_result)that);
48 ashish 15438
      return false;
15439
    }
15440
 
553 chandransh 15441
    public boolean equals(createCart_result that) {
48 ashish 15442
      if (that == null)
15443
        return false;
15444
 
15445
      boolean this_present_success = true;
15446
      boolean that_present_success = true;
15447
      if (this_present_success || that_present_success) {
15448
        if (!(this_present_success && that_present_success))
15449
          return false;
15450
        if (this.success != that.success)
15451
          return false;
15452
      }
15453
 
553 chandransh 15454
      boolean this_present_scx = true && this.isSetScx();
15455
      boolean that_present_scx = true && that.isSetScx();
15456
      if (this_present_scx || that_present_scx) {
15457
        if (!(this_present_scx && that_present_scx))
48 ashish 15458
          return false;
553 chandransh 15459
        if (!this.scx.equals(that.scx))
48 ashish 15460
          return false;
15461
      }
15462
 
15463
      return true;
15464
    }
15465
 
15466
    @Override
15467
    public int hashCode() {
15468
      return 0;
15469
    }
15470
 
553 chandransh 15471
    public int compareTo(createCart_result other) {
48 ashish 15472
      if (!getClass().equals(other.getClass())) {
15473
        return getClass().getName().compareTo(other.getClass().getName());
15474
      }
15475
 
15476
      int lastComparison = 0;
553 chandransh 15477
      createCart_result typedOther = (createCart_result)other;
48 ashish 15478
 
15479
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15480
      if (lastComparison != 0) {
15481
        return lastComparison;
15482
      }
15483
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15484
      if (lastComparison != 0) {
15485
        return lastComparison;
15486
      }
553 chandransh 15487
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 15488
      if (lastComparison != 0) {
15489
        return lastComparison;
15490
      }
553 chandransh 15491
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 15492
      if (lastComparison != 0) {
15493
        return lastComparison;
15494
      }
15495
      return 0;
15496
    }
15497
 
15498
    public void read(TProtocol iprot) throws TException {
15499
      TField field;
15500
      iprot.readStructBegin();
15501
      while (true)
15502
      {
15503
        field = iprot.readFieldBegin();
15504
        if (field.type == TType.STOP) { 
15505
          break;
15506
        }
15507
        _Fields fieldId = _Fields.findByThriftId(field.id);
15508
        if (fieldId == null) {
15509
          TProtocolUtil.skip(iprot, field.type);
15510
        } else {
15511
          switch (fieldId) {
15512
            case SUCCESS:
553 chandransh 15513
              if (field.type == TType.I64) {
15514
                this.success = iprot.readI64();
48 ashish 15515
                setSuccessIsSet(true);
15516
              } else { 
15517
                TProtocolUtil.skip(iprot, field.type);
15518
              }
15519
              break;
553 chandransh 15520
            case SCX:
48 ashish 15521
              if (field.type == TType.STRUCT) {
553 chandransh 15522
                this.scx = new ShoppingCartException();
15523
                this.scx.read(iprot);
48 ashish 15524
              } else { 
15525
                TProtocolUtil.skip(iprot, field.type);
15526
              }
15527
              break;
15528
          }
15529
          iprot.readFieldEnd();
15530
        }
15531
      }
15532
      iprot.readStructEnd();
15533
      validate();
15534
    }
15535
 
15536
    public void write(TProtocol oprot) throws TException {
15537
      oprot.writeStructBegin(STRUCT_DESC);
15538
 
15539
      if (this.isSetSuccess()) {
15540
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15541
        oprot.writeI64(this.success);
48 ashish 15542
        oprot.writeFieldEnd();
553 chandransh 15543
      } else if (this.isSetScx()) {
15544
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15545
        this.scx.write(oprot);
48 ashish 15546
        oprot.writeFieldEnd();
15547
      }
15548
      oprot.writeFieldStop();
15549
      oprot.writeStructEnd();
15550
    }
15551
 
15552
    @Override
15553
    public String toString() {
553 chandransh 15554
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 15555
      boolean first = true;
15556
 
15557
      sb.append("success:");
15558
      sb.append(this.success);
15559
      first = false;
15560
      if (!first) sb.append(", ");
553 chandransh 15561
      sb.append("scx:");
15562
      if (this.scx == null) {
48 ashish 15563
        sb.append("null");
15564
      } else {
553 chandransh 15565
        sb.append(this.scx);
48 ashish 15566
      }
15567
      first = false;
15568
      sb.append(")");
15569
      return sb.toString();
15570
    }
15571
 
15572
    public void validate() throws TException {
15573
      // check for required fields
15574
    }
15575
 
15576
  }
15577
 
553 chandransh 15578
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
15579
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 15580
 
553 chandransh 15581
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 15582
 
553 chandransh 15583
    private long userId;
506 rajveer 15584
 
15585
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15586
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15587
      USER_ID((short)1, "userId");
506 rajveer 15588
 
15589
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15590
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15591
 
15592
      static {
15593
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15594
          byId.put((int)field._thriftId, field);
15595
          byName.put(field.getFieldName(), field);
15596
        }
15597
      }
15598
 
15599
      /**
15600
       * Find the _Fields constant that matches fieldId, or null if its not found.
15601
       */
15602
      public static _Fields findByThriftId(int fieldId) {
15603
        return byId.get(fieldId);
15604
      }
15605
 
15606
      /**
15607
       * Find the _Fields constant that matches fieldId, throwing an exception
15608
       * if it is not found.
15609
       */
15610
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15611
        _Fields fields = findByThriftId(fieldId);
15612
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15613
        return fields;
15614
      }
15615
 
15616
      /**
15617
       * Find the _Fields constant that matches name, or null if its not found.
15618
       */
15619
      public static _Fields findByName(String name) {
15620
        return byName.get(name);
15621
      }
15622
 
15623
      private final short _thriftId;
15624
      private final String _fieldName;
15625
 
15626
      _Fields(short thriftId, String fieldName) {
15627
        _thriftId = thriftId;
15628
        _fieldName = fieldName;
15629
      }
15630
 
15631
      public short getThriftFieldId() {
15632
        return _thriftId;
15633
      }
15634
 
15635
      public String getFieldName() {
15636
        return _fieldName;
15637
      }
15638
    }
15639
 
15640
    // isset id assignments
15641
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 15642
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 15643
 
15644
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15645
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 15646
          new FieldValueMetaData(TType.I64)));
15647
    }});
15648
 
15649
    static {
553 chandransh 15650
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 15651
    }
15652
 
553 chandransh 15653
    public getCurrentCart_args() {
506 rajveer 15654
    }
15655
 
553 chandransh 15656
    public getCurrentCart_args(
15657
      long userId)
506 rajveer 15658
    {
15659
      this();
553 chandransh 15660
      this.userId = userId;
15661
      setUserIdIsSet(true);
506 rajveer 15662
    }
15663
 
15664
    /**
15665
     * Performs a deep copy on <i>other</i>.
15666
     */
553 chandransh 15667
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 15668
      __isset_bit_vector.clear();
15669
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15670
      this.userId = other.userId;
506 rajveer 15671
    }
15672
 
553 chandransh 15673
    public getCurrentCart_args deepCopy() {
15674
      return new getCurrentCart_args(this);
506 rajveer 15675
    }
15676
 
15677
    @Deprecated
553 chandransh 15678
    public getCurrentCart_args clone() {
15679
      return new getCurrentCart_args(this);
506 rajveer 15680
    }
15681
 
553 chandransh 15682
    public long getUserId() {
15683
      return this.userId;
506 rajveer 15684
    }
15685
 
553 chandransh 15686
    public getCurrentCart_args setUserId(long userId) {
15687
      this.userId = userId;
15688
      setUserIdIsSet(true);
506 rajveer 15689
      return this;
15690
    }
15691
 
553 chandransh 15692
    public void unsetUserId() {
506 rajveer 15693
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15694
    }
15695
 
553 chandransh 15696
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15697
    public boolean isSetUserId() {
506 rajveer 15698
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15699
    }
15700
 
553 chandransh 15701
    public void setUserIdIsSet(boolean value) {
506 rajveer 15702
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15703
    }
15704
 
553 chandransh 15705
    public void setFieldValue(_Fields field, Object value) {
15706
      switch (field) {
15707
      case USER_ID:
15708
        if (value == null) {
15709
          unsetUserId();
15710
        } else {
15711
          setUserId((Long)value);
15712
        }
15713
        break;
15714
 
15715
      }
506 rajveer 15716
    }
15717
 
553 chandransh 15718
    public void setFieldValue(int fieldID, Object value) {
15719
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15720
    }
15721
 
15722
    public Object getFieldValue(_Fields field) {
15723
      switch (field) {
15724
      case USER_ID:
15725
        return new Long(getUserId());
15726
 
15727
      }
15728
      throw new IllegalStateException();
15729
    }
15730
 
15731
    public Object getFieldValue(int fieldId) {
15732
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15733
    }
15734
 
15735
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15736
    public boolean isSet(_Fields field) {
15737
      switch (field) {
15738
      case USER_ID:
15739
        return isSetUserId();
15740
      }
15741
      throw new IllegalStateException();
15742
    }
15743
 
15744
    public boolean isSet(int fieldID) {
15745
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15746
    }
15747
 
15748
    @Override
15749
    public boolean equals(Object that) {
15750
      if (that == null)
15751
        return false;
15752
      if (that instanceof getCurrentCart_args)
15753
        return this.equals((getCurrentCart_args)that);
15754
      return false;
15755
    }
15756
 
15757
    public boolean equals(getCurrentCart_args that) {
15758
      if (that == null)
15759
        return false;
15760
 
15761
      boolean this_present_userId = true;
15762
      boolean that_present_userId = true;
15763
      if (this_present_userId || that_present_userId) {
15764
        if (!(this_present_userId && that_present_userId))
15765
          return false;
15766
        if (this.userId != that.userId)
15767
          return false;
15768
      }
15769
 
15770
      return true;
15771
    }
15772
 
15773
    @Override
15774
    public int hashCode() {
15775
      return 0;
15776
    }
15777
 
15778
    public int compareTo(getCurrentCart_args other) {
15779
      if (!getClass().equals(other.getClass())) {
15780
        return getClass().getName().compareTo(other.getClass().getName());
15781
      }
15782
 
15783
      int lastComparison = 0;
15784
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
15785
 
15786
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15787
      if (lastComparison != 0) {
15788
        return lastComparison;
15789
      }
15790
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15791
      if (lastComparison != 0) {
15792
        return lastComparison;
15793
      }
15794
      return 0;
15795
    }
15796
 
15797
    public void read(TProtocol iprot) throws TException {
15798
      TField field;
15799
      iprot.readStructBegin();
15800
      while (true)
15801
      {
15802
        field = iprot.readFieldBegin();
15803
        if (field.type == TType.STOP) { 
15804
          break;
15805
        }
15806
        _Fields fieldId = _Fields.findByThriftId(field.id);
15807
        if (fieldId == null) {
15808
          TProtocolUtil.skip(iprot, field.type);
15809
        } else {
15810
          switch (fieldId) {
15811
            case USER_ID:
15812
              if (field.type == TType.I64) {
15813
                this.userId = iprot.readI64();
15814
                setUserIdIsSet(true);
15815
              } else { 
15816
                TProtocolUtil.skip(iprot, field.type);
15817
              }
15818
              break;
15819
          }
15820
          iprot.readFieldEnd();
15821
        }
15822
      }
15823
      iprot.readStructEnd();
15824
      validate();
15825
    }
15826
 
15827
    public void write(TProtocol oprot) throws TException {
15828
      validate();
15829
 
15830
      oprot.writeStructBegin(STRUCT_DESC);
15831
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15832
      oprot.writeI64(this.userId);
15833
      oprot.writeFieldEnd();
15834
      oprot.writeFieldStop();
15835
      oprot.writeStructEnd();
15836
    }
15837
 
15838
    @Override
15839
    public String toString() {
15840
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
15841
      boolean first = true;
15842
 
15843
      sb.append("userId:");
15844
      sb.append(this.userId);
15845
      first = false;
15846
      sb.append(")");
15847
      return sb.toString();
15848
    }
15849
 
15850
    public void validate() throws TException {
15851
      // check for required fields
15852
    }
15853
 
15854
  }
15855
 
15856
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
15857
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
15858
 
15859
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
15860
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
15861
 
15862
    private Cart success;
15863
    private ShoppingCartException scx;
15864
 
15865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15866
    public enum _Fields implements TFieldIdEnum {
15867
      SUCCESS((short)0, "success"),
15868
      SCX((short)1, "scx");
15869
 
15870
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15871
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15872
 
15873
      static {
15874
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15875
          byId.put((int)field._thriftId, field);
15876
          byName.put(field.getFieldName(), field);
15877
        }
15878
      }
15879
 
15880
      /**
15881
       * Find the _Fields constant that matches fieldId, or null if its not found.
15882
       */
15883
      public static _Fields findByThriftId(int fieldId) {
15884
        return byId.get(fieldId);
15885
      }
15886
 
15887
      /**
15888
       * Find the _Fields constant that matches fieldId, throwing an exception
15889
       * if it is not found.
15890
       */
15891
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15892
        _Fields fields = findByThriftId(fieldId);
15893
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15894
        return fields;
15895
      }
15896
 
15897
      /**
15898
       * Find the _Fields constant that matches name, or null if its not found.
15899
       */
15900
      public static _Fields findByName(String name) {
15901
        return byName.get(name);
15902
      }
15903
 
15904
      private final short _thriftId;
15905
      private final String _fieldName;
15906
 
15907
      _Fields(short thriftId, String fieldName) {
15908
        _thriftId = thriftId;
15909
        _fieldName = fieldName;
15910
      }
15911
 
15912
      public short getThriftFieldId() {
15913
        return _thriftId;
15914
      }
15915
 
15916
      public String getFieldName() {
15917
        return _fieldName;
15918
      }
15919
    }
15920
 
15921
    // isset id assignments
15922
 
15923
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15924
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15925
          new StructMetaData(TType.STRUCT, Cart.class)));
15926
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
15927
          new FieldValueMetaData(TType.STRUCT)));
15928
    }});
15929
 
15930
    static {
15931
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
15932
    }
15933
 
15934
    public getCurrentCart_result() {
15935
    }
15936
 
15937
    public getCurrentCart_result(
15938
      Cart success,
15939
      ShoppingCartException scx)
15940
    {
15941
      this();
15942
      this.success = success;
15943
      this.scx = scx;
15944
    }
15945
 
15946
    /**
15947
     * Performs a deep copy on <i>other</i>.
15948
     */
15949
    public getCurrentCart_result(getCurrentCart_result other) {
15950
      if (other.isSetSuccess()) {
15951
        this.success = new Cart(other.success);
15952
      }
15953
      if (other.isSetScx()) {
15954
        this.scx = new ShoppingCartException(other.scx);
15955
      }
15956
    }
15957
 
15958
    public getCurrentCart_result deepCopy() {
15959
      return new getCurrentCart_result(this);
15960
    }
15961
 
15962
    @Deprecated
15963
    public getCurrentCart_result clone() {
15964
      return new getCurrentCart_result(this);
15965
    }
15966
 
15967
    public Cart getSuccess() {
15968
      return this.success;
15969
    }
15970
 
15971
    public getCurrentCart_result setSuccess(Cart success) {
15972
      this.success = success;
506 rajveer 15973
      return this;
15974
    }
15975
 
553 chandransh 15976
    public void unsetSuccess() {
15977
      this.success = null;
506 rajveer 15978
    }
15979
 
553 chandransh 15980
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15981
    public boolean isSetSuccess() {
15982
      return this.success != null;
506 rajveer 15983
    }
15984
 
553 chandransh 15985
    public void setSuccessIsSet(boolean value) {
15986
      if (!value) {
15987
        this.success = null;
15988
      }
506 rajveer 15989
    }
15990
 
553 chandransh 15991
    public ShoppingCartException getScx() {
15992
      return this.scx;
15993
    }
15994
 
15995
    public getCurrentCart_result setScx(ShoppingCartException scx) {
15996
      this.scx = scx;
15997
      return this;
15998
    }
15999
 
16000
    public void unsetScx() {
16001
      this.scx = null;
16002
    }
16003
 
16004
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16005
    public boolean isSetScx() {
16006
      return this.scx != null;
16007
    }
16008
 
16009
    public void setScxIsSet(boolean value) {
16010
      if (!value) {
16011
        this.scx = null;
16012
      }
16013
    }
16014
 
506 rajveer 16015
    public void setFieldValue(_Fields field, Object value) {
16016
      switch (field) {
553 chandransh 16017
      case SUCCESS:
506 rajveer 16018
        if (value == null) {
553 chandransh 16019
          unsetSuccess();
506 rajveer 16020
        } else {
553 chandransh 16021
          setSuccess((Cart)value);
506 rajveer 16022
        }
16023
        break;
16024
 
553 chandransh 16025
      case SCX:
506 rajveer 16026
        if (value == null) {
553 chandransh 16027
          unsetScx();
506 rajveer 16028
        } else {
553 chandransh 16029
          setScx((ShoppingCartException)value);
506 rajveer 16030
        }
16031
        break;
16032
 
16033
      }
16034
    }
16035
 
16036
    public void setFieldValue(int fieldID, Object value) {
16037
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16038
    }
16039
 
16040
    public Object getFieldValue(_Fields field) {
16041
      switch (field) {
553 chandransh 16042
      case SUCCESS:
16043
        return getSuccess();
506 rajveer 16044
 
553 chandransh 16045
      case SCX:
16046
        return getScx();
506 rajveer 16047
 
16048
      }
16049
      throw new IllegalStateException();
16050
    }
16051
 
16052
    public Object getFieldValue(int fieldId) {
16053
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16054
    }
16055
 
16056
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16057
    public boolean isSet(_Fields field) {
16058
      switch (field) {
553 chandransh 16059
      case SUCCESS:
16060
        return isSetSuccess();
16061
      case SCX:
16062
        return isSetScx();
506 rajveer 16063
      }
16064
      throw new IllegalStateException();
16065
    }
16066
 
16067
    public boolean isSet(int fieldID) {
16068
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16069
    }
16070
 
16071
    @Override
16072
    public boolean equals(Object that) {
16073
      if (that == null)
16074
        return false;
553 chandransh 16075
      if (that instanceof getCurrentCart_result)
16076
        return this.equals((getCurrentCart_result)that);
506 rajveer 16077
      return false;
16078
    }
16079
 
553 chandransh 16080
    public boolean equals(getCurrentCart_result that) {
506 rajveer 16081
      if (that == null)
16082
        return false;
16083
 
553 chandransh 16084
      boolean this_present_success = true && this.isSetSuccess();
16085
      boolean that_present_success = true && that.isSetSuccess();
16086
      if (this_present_success || that_present_success) {
16087
        if (!(this_present_success && that_present_success))
506 rajveer 16088
          return false;
553 chandransh 16089
        if (!this.success.equals(that.success))
506 rajveer 16090
          return false;
16091
      }
16092
 
553 chandransh 16093
      boolean this_present_scx = true && this.isSetScx();
16094
      boolean that_present_scx = true && that.isSetScx();
16095
      if (this_present_scx || that_present_scx) {
16096
        if (!(this_present_scx && that_present_scx))
506 rajveer 16097
          return false;
553 chandransh 16098
        if (!this.scx.equals(that.scx))
506 rajveer 16099
          return false;
16100
      }
16101
 
16102
      return true;
16103
    }
16104
 
16105
    @Override
16106
    public int hashCode() {
16107
      return 0;
16108
    }
16109
 
553 chandransh 16110
    public int compareTo(getCurrentCart_result other) {
506 rajveer 16111
      if (!getClass().equals(other.getClass())) {
16112
        return getClass().getName().compareTo(other.getClass().getName());
16113
      }
16114
 
16115
      int lastComparison = 0;
553 chandransh 16116
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 16117
 
553 chandransh 16118
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 16119
      if (lastComparison != 0) {
16120
        return lastComparison;
16121
      }
553 chandransh 16122
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 16123
      if (lastComparison != 0) {
16124
        return lastComparison;
16125
      }
553 chandransh 16126
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16127
      if (lastComparison != 0) {
16128
        return lastComparison;
16129
      }
553 chandransh 16130
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16131
      if (lastComparison != 0) {
16132
        return lastComparison;
16133
      }
16134
      return 0;
16135
    }
16136
 
16137
    public void read(TProtocol iprot) throws TException {
16138
      TField field;
16139
      iprot.readStructBegin();
16140
      while (true)
16141
      {
16142
        field = iprot.readFieldBegin();
16143
        if (field.type == TType.STOP) { 
16144
          break;
16145
        }
16146
        _Fields fieldId = _Fields.findByThriftId(field.id);
16147
        if (fieldId == null) {
16148
          TProtocolUtil.skip(iprot, field.type);
16149
        } else {
16150
          switch (fieldId) {
553 chandransh 16151
            case SUCCESS:
16152
              if (field.type == TType.STRUCT) {
16153
                this.success = new Cart();
16154
                this.success.read(iprot);
506 rajveer 16155
              } else { 
16156
                TProtocolUtil.skip(iprot, field.type);
16157
              }
16158
              break;
553 chandransh 16159
            case SCX:
16160
              if (field.type == TType.STRUCT) {
16161
                this.scx = new ShoppingCartException();
16162
                this.scx.read(iprot);
16163
              } else { 
16164
                TProtocolUtil.skip(iprot, field.type);
16165
              }
16166
              break;
16167
          }
16168
          iprot.readFieldEnd();
16169
        }
16170
      }
16171
      iprot.readStructEnd();
16172
      validate();
16173
    }
16174
 
16175
    public void write(TProtocol oprot) throws TException {
16176
      oprot.writeStructBegin(STRUCT_DESC);
16177
 
16178
      if (this.isSetSuccess()) {
16179
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16180
        this.success.write(oprot);
16181
        oprot.writeFieldEnd();
16182
      } else if (this.isSetScx()) {
16183
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16184
        this.scx.write(oprot);
16185
        oprot.writeFieldEnd();
16186
      }
16187
      oprot.writeFieldStop();
16188
      oprot.writeStructEnd();
16189
    }
16190
 
16191
    @Override
16192
    public String toString() {
16193
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
16194
      boolean first = true;
16195
 
16196
      sb.append("success:");
16197
      if (this.success == null) {
16198
        sb.append("null");
16199
      } else {
16200
        sb.append(this.success);
16201
      }
16202
      first = false;
16203
      if (!first) sb.append(", ");
16204
      sb.append("scx:");
16205
      if (this.scx == null) {
16206
        sb.append("null");
16207
      } else {
16208
        sb.append(this.scx);
16209
      }
16210
      first = false;
16211
      sb.append(")");
16212
      return sb.toString();
16213
    }
16214
 
16215
    public void validate() throws TException {
16216
      // check for required fields
16217
    }
16218
 
16219
  }
16220
 
16221
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
16222
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
16223
 
16224
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16225
 
16226
    private long cartId;
16227
 
16228
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16229
    public enum _Fields implements TFieldIdEnum {
16230
      CART_ID((short)1, "cartId");
16231
 
16232
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16233
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16234
 
16235
      static {
16236
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16237
          byId.put((int)field._thriftId, field);
16238
          byName.put(field.getFieldName(), field);
16239
        }
16240
      }
16241
 
16242
      /**
16243
       * Find the _Fields constant that matches fieldId, or null if its not found.
16244
       */
16245
      public static _Fields findByThriftId(int fieldId) {
16246
        return byId.get(fieldId);
16247
      }
16248
 
16249
      /**
16250
       * Find the _Fields constant that matches fieldId, throwing an exception
16251
       * if it is not found.
16252
       */
16253
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16254
        _Fields fields = findByThriftId(fieldId);
16255
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16256
        return fields;
16257
      }
16258
 
16259
      /**
16260
       * Find the _Fields constant that matches name, or null if its not found.
16261
       */
16262
      public static _Fields findByName(String name) {
16263
        return byName.get(name);
16264
      }
16265
 
16266
      private final short _thriftId;
16267
      private final String _fieldName;
16268
 
16269
      _Fields(short thriftId, String fieldName) {
16270
        _thriftId = thriftId;
16271
        _fieldName = fieldName;
16272
      }
16273
 
16274
      public short getThriftFieldId() {
16275
        return _thriftId;
16276
      }
16277
 
16278
      public String getFieldName() {
16279
        return _fieldName;
16280
      }
16281
    }
16282
 
16283
    // isset id assignments
16284
    private static final int __CARTID_ISSET_ID = 0;
16285
    private BitSet __isset_bit_vector = new BitSet(1);
16286
 
16287
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16288
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
16289
          new FieldValueMetaData(TType.I64)));
16290
    }});
16291
 
16292
    static {
16293
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
16294
    }
16295
 
16296
    public getCart_args() {
16297
    }
16298
 
16299
    public getCart_args(
16300
      long cartId)
16301
    {
16302
      this();
16303
      this.cartId = cartId;
16304
      setCartIdIsSet(true);
16305
    }
16306
 
16307
    /**
16308
     * Performs a deep copy on <i>other</i>.
16309
     */
16310
    public getCart_args(getCart_args other) {
16311
      __isset_bit_vector.clear();
16312
      __isset_bit_vector.or(other.__isset_bit_vector);
16313
      this.cartId = other.cartId;
16314
    }
16315
 
16316
    public getCart_args deepCopy() {
16317
      return new getCart_args(this);
16318
    }
16319
 
16320
    @Deprecated
16321
    public getCart_args clone() {
16322
      return new getCart_args(this);
16323
    }
16324
 
16325
    public long getCartId() {
16326
      return this.cartId;
16327
    }
16328
 
16329
    public getCart_args setCartId(long cartId) {
16330
      this.cartId = cartId;
16331
      setCartIdIsSet(true);
16332
      return this;
16333
    }
16334
 
16335
    public void unsetCartId() {
16336
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
16337
    }
16338
 
16339
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
16340
    public boolean isSetCartId() {
16341
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
16342
    }
16343
 
16344
    public void setCartIdIsSet(boolean value) {
16345
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
16346
    }
16347
 
16348
    public void setFieldValue(_Fields field, Object value) {
16349
      switch (field) {
16350
      case CART_ID:
16351
        if (value == null) {
16352
          unsetCartId();
16353
        } else {
16354
          setCartId((Long)value);
16355
        }
16356
        break;
16357
 
16358
      }
16359
    }
16360
 
16361
    public void setFieldValue(int fieldID, Object value) {
16362
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16363
    }
16364
 
16365
    public Object getFieldValue(_Fields field) {
16366
      switch (field) {
16367
      case CART_ID:
16368
        return new Long(getCartId());
16369
 
16370
      }
16371
      throw new IllegalStateException();
16372
    }
16373
 
16374
    public Object getFieldValue(int fieldId) {
16375
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16376
    }
16377
 
16378
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16379
    public boolean isSet(_Fields field) {
16380
      switch (field) {
16381
      case CART_ID:
16382
        return isSetCartId();
16383
      }
16384
      throw new IllegalStateException();
16385
    }
16386
 
16387
    public boolean isSet(int fieldID) {
16388
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16389
    }
16390
 
16391
    @Override
16392
    public boolean equals(Object that) {
16393
      if (that == null)
16394
        return false;
16395
      if (that instanceof getCart_args)
16396
        return this.equals((getCart_args)that);
16397
      return false;
16398
    }
16399
 
16400
    public boolean equals(getCart_args that) {
16401
      if (that == null)
16402
        return false;
16403
 
16404
      boolean this_present_cartId = true;
16405
      boolean that_present_cartId = true;
16406
      if (this_present_cartId || that_present_cartId) {
16407
        if (!(this_present_cartId && that_present_cartId))
16408
          return false;
16409
        if (this.cartId != that.cartId)
16410
          return false;
16411
      }
16412
 
16413
      return true;
16414
    }
16415
 
16416
    @Override
16417
    public int hashCode() {
16418
      return 0;
16419
    }
16420
 
16421
    public int compareTo(getCart_args other) {
16422
      if (!getClass().equals(other.getClass())) {
16423
        return getClass().getName().compareTo(other.getClass().getName());
16424
      }
16425
 
16426
      int lastComparison = 0;
16427
      getCart_args typedOther = (getCart_args)other;
16428
 
16429
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
16430
      if (lastComparison != 0) {
16431
        return lastComparison;
16432
      }
16433
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
16434
      if (lastComparison != 0) {
16435
        return lastComparison;
16436
      }
16437
      return 0;
16438
    }
16439
 
16440
    public void read(TProtocol iprot) throws TException {
16441
      TField field;
16442
      iprot.readStructBegin();
16443
      while (true)
16444
      {
16445
        field = iprot.readFieldBegin();
16446
        if (field.type == TType.STOP) { 
16447
          break;
16448
        }
16449
        _Fields fieldId = _Fields.findByThriftId(field.id);
16450
        if (fieldId == null) {
16451
          TProtocolUtil.skip(iprot, field.type);
16452
        } else {
16453
          switch (fieldId) {
16454
            case CART_ID:
506 rajveer 16455
              if (field.type == TType.I64) {
553 chandransh 16456
                this.cartId = iprot.readI64();
16457
                setCartIdIsSet(true);
506 rajveer 16458
              } else { 
16459
                TProtocolUtil.skip(iprot, field.type);
16460
              }
16461
              break;
16462
          }
16463
          iprot.readFieldEnd();
16464
        }
16465
      }
16466
      iprot.readStructEnd();
16467
      validate();
16468
    }
16469
 
16470
    public void write(TProtocol oprot) throws TException {
16471
      validate();
16472
 
16473
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 16474
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
16475
      oprot.writeI64(this.cartId);
506 rajveer 16476
      oprot.writeFieldEnd();
16477
      oprot.writeFieldStop();
16478
      oprot.writeStructEnd();
16479
    }
16480
 
16481
    @Override
16482
    public String toString() {
553 chandransh 16483
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 16484
      boolean first = true;
16485
 
553 chandransh 16486
      sb.append("cartId:");
16487
      sb.append(this.cartId);
506 rajveer 16488
      first = false;
16489
      sb.append(")");
16490
      return sb.toString();
16491
    }
16492
 
16493
    public void validate() throws TException {
16494
      // check for required fields
16495
    }
16496
 
16497
  }
16498
 
553 chandransh 16499
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
16500
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 16501
 
553 chandransh 16502
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16503
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 16504
 
553 chandransh 16505
    private Cart success;
16506
    private ShoppingCartException scx;
506 rajveer 16507
 
16508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16509
    public enum _Fields implements TFieldIdEnum {
16510
      SUCCESS((short)0, "success"),
553 chandransh 16511
      SCX((short)1, "scx");
506 rajveer 16512
 
16513
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16515
 
16516
      static {
16517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16518
          byId.put((int)field._thriftId, field);
16519
          byName.put(field.getFieldName(), field);
16520
        }
16521
      }
16522
 
16523
      /**
16524
       * Find the _Fields constant that matches fieldId, or null if its not found.
16525
       */
16526
      public static _Fields findByThriftId(int fieldId) {
16527
        return byId.get(fieldId);
16528
      }
16529
 
16530
      /**
16531
       * Find the _Fields constant that matches fieldId, throwing an exception
16532
       * if it is not found.
16533
       */
16534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16535
        _Fields fields = findByThriftId(fieldId);
16536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16537
        return fields;
16538
      }
16539
 
16540
      /**
16541
       * Find the _Fields constant that matches name, or null if its not found.
16542
       */
16543
      public static _Fields findByName(String name) {
16544
        return byName.get(name);
16545
      }
16546
 
16547
      private final short _thriftId;
16548
      private final String _fieldName;
16549
 
16550
      _Fields(short thriftId, String fieldName) {
16551
        _thriftId = thriftId;
16552
        _fieldName = fieldName;
16553
      }
16554
 
16555
      public short getThriftFieldId() {
16556
        return _thriftId;
16557
      }
16558
 
16559
      public String getFieldName() {
16560
        return _fieldName;
16561
      }
16562
    }
16563
 
16564
    // isset id assignments
16565
 
16566
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16567
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 16568
          new StructMetaData(TType.STRUCT, Cart.class)));
16569
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 16570
          new FieldValueMetaData(TType.STRUCT)));
16571
    }});
16572
 
16573
    static {
553 chandransh 16574
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 16575
    }
16576
 
553 chandransh 16577
    public getCart_result() {
506 rajveer 16578
    }
16579
 
553 chandransh 16580
    public getCart_result(
16581
      Cart success,
16582
      ShoppingCartException scx)
506 rajveer 16583
    {
16584
      this();
16585
      this.success = success;
553 chandransh 16586
      this.scx = scx;
506 rajveer 16587
    }
16588
 
16589
    /**
16590
     * Performs a deep copy on <i>other</i>.
16591
     */
553 chandransh 16592
    public getCart_result(getCart_result other) {
16593
      if (other.isSetSuccess()) {
16594
        this.success = new Cart(other.success);
506 rajveer 16595
      }
553 chandransh 16596
      if (other.isSetScx()) {
16597
        this.scx = new ShoppingCartException(other.scx);
16598
      }
506 rajveer 16599
    }
16600
 
553 chandransh 16601
    public getCart_result deepCopy() {
16602
      return new getCart_result(this);
506 rajveer 16603
    }
16604
 
16605
    @Deprecated
553 chandransh 16606
    public getCart_result clone() {
16607
      return new getCart_result(this);
506 rajveer 16608
    }
16609
 
553 chandransh 16610
    public Cart getSuccess() {
506 rajveer 16611
      return this.success;
16612
    }
16613
 
553 chandransh 16614
    public getCart_result setSuccess(Cart success) {
506 rajveer 16615
      this.success = success;
16616
      return this;
16617
    }
16618
 
16619
    public void unsetSuccess() {
553 chandransh 16620
      this.success = null;
506 rajveer 16621
    }
16622
 
16623
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16624
    public boolean isSetSuccess() {
553 chandransh 16625
      return this.success != null;
506 rajveer 16626
    }
16627
 
16628
    public void setSuccessIsSet(boolean value) {
553 chandransh 16629
      if (!value) {
16630
        this.success = null;
16631
      }
506 rajveer 16632
    }
16633
 
553 chandransh 16634
    public ShoppingCartException getScx() {
16635
      return this.scx;
506 rajveer 16636
    }
16637
 
553 chandransh 16638
    public getCart_result setScx(ShoppingCartException scx) {
16639
      this.scx = scx;
506 rajveer 16640
      return this;
16641
    }
16642
 
553 chandransh 16643
    public void unsetScx() {
16644
      this.scx = null;
506 rajveer 16645
    }
16646
 
553 chandransh 16647
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16648
    public boolean isSetScx() {
16649
      return this.scx != null;
506 rajveer 16650
    }
16651
 
553 chandransh 16652
    public void setScxIsSet(boolean value) {
506 rajveer 16653
      if (!value) {
553 chandransh 16654
        this.scx = null;
506 rajveer 16655
      }
16656
    }
16657
 
16658
    public void setFieldValue(_Fields field, Object value) {
16659
      switch (field) {
16660
      case SUCCESS:
16661
        if (value == null) {
16662
          unsetSuccess();
16663
        } else {
553 chandransh 16664
          setSuccess((Cart)value);
506 rajveer 16665
        }
16666
        break;
16667
 
553 chandransh 16668
      case SCX:
506 rajveer 16669
        if (value == null) {
553 chandransh 16670
          unsetScx();
506 rajveer 16671
        } else {
553 chandransh 16672
          setScx((ShoppingCartException)value);
506 rajveer 16673
        }
16674
        break;
16675
 
16676
      }
16677
    }
16678
 
16679
    public void setFieldValue(int fieldID, Object value) {
16680
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16681
    }
16682
 
16683
    public Object getFieldValue(_Fields field) {
16684
      switch (field) {
16685
      case SUCCESS:
553 chandransh 16686
        return getSuccess();
506 rajveer 16687
 
553 chandransh 16688
      case SCX:
16689
        return getScx();
506 rajveer 16690
 
16691
      }
16692
      throw new IllegalStateException();
16693
    }
16694
 
16695
    public Object getFieldValue(int fieldId) {
16696
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16697
    }
16698
 
16699
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16700
    public boolean isSet(_Fields field) {
16701
      switch (field) {
16702
      case SUCCESS:
16703
        return isSetSuccess();
553 chandransh 16704
      case SCX:
16705
        return isSetScx();
506 rajveer 16706
      }
16707
      throw new IllegalStateException();
16708
    }
16709
 
16710
    public boolean isSet(int fieldID) {
16711
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16712
    }
16713
 
16714
    @Override
16715
    public boolean equals(Object that) {
16716
      if (that == null)
16717
        return false;
553 chandransh 16718
      if (that instanceof getCart_result)
16719
        return this.equals((getCart_result)that);
506 rajveer 16720
      return false;
16721
    }
16722
 
553 chandransh 16723
    public boolean equals(getCart_result that) {
506 rajveer 16724
      if (that == null)
16725
        return false;
16726
 
553 chandransh 16727
      boolean this_present_success = true && this.isSetSuccess();
16728
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 16729
      if (this_present_success || that_present_success) {
16730
        if (!(this_present_success && that_present_success))
16731
          return false;
553 chandransh 16732
        if (!this.success.equals(that.success))
506 rajveer 16733
          return false;
16734
      }
16735
 
553 chandransh 16736
      boolean this_present_scx = true && this.isSetScx();
16737
      boolean that_present_scx = true && that.isSetScx();
16738
      if (this_present_scx || that_present_scx) {
16739
        if (!(this_present_scx && that_present_scx))
506 rajveer 16740
          return false;
553 chandransh 16741
        if (!this.scx.equals(that.scx))
506 rajveer 16742
          return false;
16743
      }
16744
 
16745
      return true;
16746
    }
16747
 
16748
    @Override
16749
    public int hashCode() {
16750
      return 0;
16751
    }
16752
 
553 chandransh 16753
    public int compareTo(getCart_result other) {
506 rajveer 16754
      if (!getClass().equals(other.getClass())) {
16755
        return getClass().getName().compareTo(other.getClass().getName());
16756
      }
16757
 
16758
      int lastComparison = 0;
553 chandransh 16759
      getCart_result typedOther = (getCart_result)other;
506 rajveer 16760
 
16761
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16762
      if (lastComparison != 0) {
16763
        return lastComparison;
16764
      }
16765
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16766
      if (lastComparison != 0) {
16767
        return lastComparison;
16768
      }
553 chandransh 16769
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16770
      if (lastComparison != 0) {
16771
        return lastComparison;
16772
      }
553 chandransh 16773
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16774
      if (lastComparison != 0) {
16775
        return lastComparison;
16776
      }
16777
      return 0;
16778
    }
16779
 
16780
    public void read(TProtocol iprot) throws TException {
16781
      TField field;
16782
      iprot.readStructBegin();
16783
      while (true)
16784
      {
16785
        field = iprot.readFieldBegin();
16786
        if (field.type == TType.STOP) { 
16787
          break;
16788
        }
16789
        _Fields fieldId = _Fields.findByThriftId(field.id);
16790
        if (fieldId == null) {
16791
          TProtocolUtil.skip(iprot, field.type);
16792
        } else {
16793
          switch (fieldId) {
16794
            case SUCCESS:
553 chandransh 16795
              if (field.type == TType.STRUCT) {
16796
                this.success = new Cart();
16797
                this.success.read(iprot);
506 rajveer 16798
              } else { 
16799
                TProtocolUtil.skip(iprot, field.type);
16800
              }
16801
              break;
553 chandransh 16802
            case SCX:
506 rajveer 16803
              if (field.type == TType.STRUCT) {
553 chandransh 16804
                this.scx = new ShoppingCartException();
16805
                this.scx.read(iprot);
506 rajveer 16806
              } else { 
16807
                TProtocolUtil.skip(iprot, field.type);
16808
              }
16809
              break;
16810
          }
16811
          iprot.readFieldEnd();
16812
        }
16813
      }
16814
      iprot.readStructEnd();
16815
      validate();
16816
    }
16817
 
16818
    public void write(TProtocol oprot) throws TException {
16819
      oprot.writeStructBegin(STRUCT_DESC);
16820
 
16821
      if (this.isSetSuccess()) {
16822
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 16823
        this.success.write(oprot);
506 rajveer 16824
        oprot.writeFieldEnd();
553 chandransh 16825
      } else if (this.isSetScx()) {
16826
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16827
        this.scx.write(oprot);
506 rajveer 16828
        oprot.writeFieldEnd();
16829
      }
16830
      oprot.writeFieldStop();
16831
      oprot.writeStructEnd();
16832
    }
16833
 
16834
    @Override
16835
    public String toString() {
553 chandransh 16836
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 16837
      boolean first = true;
16838
 
16839
      sb.append("success:");
553 chandransh 16840
      if (this.success == null) {
16841
        sb.append("null");
16842
      } else {
16843
        sb.append(this.success);
16844
      }
506 rajveer 16845
      first = false;
16846
      if (!first) sb.append(", ");
553 chandransh 16847
      sb.append("scx:");
16848
      if (this.scx == null) {
506 rajveer 16849
        sb.append("null");
16850
      } else {
553 chandransh 16851
        sb.append(this.scx);
506 rajveer 16852
      }
16853
      first = false;
16854
      sb.append(")");
16855
      return sb.toString();
16856
    }
16857
 
16858
    public void validate() throws TException {
16859
      // check for required fields
16860
    }
16861
 
16862
  }
16863
 
553 chandransh 16864
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
16865
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 16866
 
553 chandransh 16867
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16868
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 16869
 
553 chandransh 16870
    private long userId;
16871
    private CartStatus status;
48 ashish 16872
 
16873
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16874
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16875
      USER_ID((short)1, "userId"),
16876
      /**
16877
       * 
16878
       * @see CartStatus
16879
       */
16880
      STATUS((short)2, "status");
48 ashish 16881
 
16882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16884
 
16885
      static {
16886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16887
          byId.put((int)field._thriftId, field);
16888
          byName.put(field.getFieldName(), field);
16889
        }
16890
      }
16891
 
16892
      /**
16893
       * Find the _Fields constant that matches fieldId, or null if its not found.
16894
       */
16895
      public static _Fields findByThriftId(int fieldId) {
16896
        return byId.get(fieldId);
16897
      }
16898
 
16899
      /**
16900
       * Find the _Fields constant that matches fieldId, throwing an exception
16901
       * if it is not found.
16902
       */
16903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16904
        _Fields fields = findByThriftId(fieldId);
16905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16906
        return fields;
16907
      }
16908
 
16909
      /**
16910
       * Find the _Fields constant that matches name, or null if its not found.
16911
       */
16912
      public static _Fields findByName(String name) {
16913
        return byName.get(name);
16914
      }
16915
 
16916
      private final short _thriftId;
16917
      private final String _fieldName;
16918
 
16919
      _Fields(short thriftId, String fieldName) {
16920
        _thriftId = thriftId;
16921
        _fieldName = fieldName;
16922
      }
16923
 
16924
      public short getThriftFieldId() {
16925
        return _thriftId;
16926
      }
16927
 
16928
      public String getFieldName() {
16929
        return _fieldName;
16930
      }
16931
    }
16932
 
16933
    // isset id assignments
16934
    private static final int __USERID_ISSET_ID = 0;
16935
    private BitSet __isset_bit_vector = new BitSet(1);
16936
 
16937
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16938
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 16939
          new FieldValueMetaData(TType.I64)));
553 chandransh 16940
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16941
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 16942
    }});
16943
 
16944
    static {
553 chandransh 16945
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 16946
    }
16947
 
553 chandransh 16948
    public getCartsForUser_args() {
48 ashish 16949
    }
16950
 
553 chandransh 16951
    public getCartsForUser_args(
16952
      long userId,
16953
      CartStatus status)
48 ashish 16954
    {
16955
      this();
553 chandransh 16956
      this.userId = userId;
16957
      setUserIdIsSet(true);
16958
      this.status = status;
48 ashish 16959
    }
16960
 
16961
    /**
16962
     * Performs a deep copy on <i>other</i>.
16963
     */
553 chandransh 16964
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 16965
      __isset_bit_vector.clear();
16966
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16967
      this.userId = other.userId;
16968
      if (other.isSetStatus()) {
16969
        this.status = other.status;
48 ashish 16970
      }
16971
    }
16972
 
553 chandransh 16973
    public getCartsForUser_args deepCopy() {
16974
      return new getCartsForUser_args(this);
48 ashish 16975
    }
16976
 
16977
    @Deprecated
553 chandransh 16978
    public getCartsForUser_args clone() {
16979
      return new getCartsForUser_args(this);
48 ashish 16980
    }
16981
 
553 chandransh 16982
    public long getUserId() {
16983
      return this.userId;
48 ashish 16984
    }
16985
 
553 chandransh 16986
    public getCartsForUser_args setUserId(long userId) {
16987
      this.userId = userId;
16988
      setUserIdIsSet(true);
48 ashish 16989
      return this;
16990
    }
16991
 
553 chandransh 16992
    public void unsetUserId() {
48 ashish 16993
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16994
    }
16995
 
553 chandransh 16996
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16997
    public boolean isSetUserId() {
48 ashish 16998
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16999
    }
17000
 
553 chandransh 17001
    public void setUserIdIsSet(boolean value) {
48 ashish 17002
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17003
    }
17004
 
553 chandransh 17005
    /**
17006
     * 
17007
     * @see CartStatus
17008
     */
17009
    public CartStatus getStatus() {
17010
      return this.status;
48 ashish 17011
    }
17012
 
553 chandransh 17013
    /**
17014
     * 
17015
     * @see CartStatus
17016
     */
17017
    public getCartsForUser_args setStatus(CartStatus status) {
17018
      this.status = status;
48 ashish 17019
      return this;
17020
    }
17021
 
553 chandransh 17022
    public void unsetStatus() {
17023
      this.status = null;
48 ashish 17024
    }
17025
 
553 chandransh 17026
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17027
    public boolean isSetStatus() {
17028
      return this.status != null;
48 ashish 17029
    }
17030
 
553 chandransh 17031
    public void setStatusIsSet(boolean value) {
48 ashish 17032
      if (!value) {
553 chandransh 17033
        this.status = null;
48 ashish 17034
      }
17035
    }
17036
 
17037
    public void setFieldValue(_Fields field, Object value) {
17038
      switch (field) {
553 chandransh 17039
      case USER_ID:
48 ashish 17040
        if (value == null) {
553 chandransh 17041
          unsetUserId();
48 ashish 17042
        } else {
553 chandransh 17043
          setUserId((Long)value);
48 ashish 17044
        }
17045
        break;
17046
 
553 chandransh 17047
      case STATUS:
48 ashish 17048
        if (value == null) {
553 chandransh 17049
          unsetStatus();
48 ashish 17050
        } else {
553 chandransh 17051
          setStatus((CartStatus)value);
48 ashish 17052
        }
17053
        break;
17054
 
17055
      }
17056
    }
17057
 
17058
    public void setFieldValue(int fieldID, Object value) {
17059
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17060
    }
17061
 
17062
    public Object getFieldValue(_Fields field) {
17063
      switch (field) {
553 chandransh 17064
      case USER_ID:
17065
        return new Long(getUserId());
48 ashish 17066
 
553 chandransh 17067
      case STATUS:
17068
        return getStatus();
48 ashish 17069
 
17070
      }
17071
      throw new IllegalStateException();
17072
    }
17073
 
17074
    public Object getFieldValue(int fieldId) {
17075
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17076
    }
17077
 
17078
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17079
    public boolean isSet(_Fields field) {
17080
      switch (field) {
553 chandransh 17081
      case USER_ID:
17082
        return isSetUserId();
17083
      case STATUS:
17084
        return isSetStatus();
48 ashish 17085
      }
17086
      throw new IllegalStateException();
17087
    }
17088
 
17089
    public boolean isSet(int fieldID) {
17090
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17091
    }
17092
 
17093
    @Override
17094
    public boolean equals(Object that) {
17095
      if (that == null)
17096
        return false;
553 chandransh 17097
      if (that instanceof getCartsForUser_args)
17098
        return this.equals((getCartsForUser_args)that);
48 ashish 17099
      return false;
17100
    }
17101
 
553 chandransh 17102
    public boolean equals(getCartsForUser_args that) {
48 ashish 17103
      if (that == null)
17104
        return false;
17105
 
553 chandransh 17106
      boolean this_present_userId = true;
17107
      boolean that_present_userId = true;
17108
      if (this_present_userId || that_present_userId) {
17109
        if (!(this_present_userId && that_present_userId))
48 ashish 17110
          return false;
553 chandransh 17111
        if (this.userId != that.userId)
48 ashish 17112
          return false;
17113
      }
17114
 
553 chandransh 17115
      boolean this_present_status = true && this.isSetStatus();
17116
      boolean that_present_status = true && that.isSetStatus();
17117
      if (this_present_status || that_present_status) {
17118
        if (!(this_present_status && that_present_status))
48 ashish 17119
          return false;
553 chandransh 17120
        if (!this.status.equals(that.status))
48 ashish 17121
          return false;
17122
      }
17123
 
17124
      return true;
17125
    }
17126
 
17127
    @Override
17128
    public int hashCode() {
17129
      return 0;
17130
    }
17131
 
553 chandransh 17132
    public int compareTo(getCartsForUser_args other) {
48 ashish 17133
      if (!getClass().equals(other.getClass())) {
17134
        return getClass().getName().compareTo(other.getClass().getName());
17135
      }
17136
 
17137
      int lastComparison = 0;
553 chandransh 17138
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 17139
 
553 chandransh 17140
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17141
      if (lastComparison != 0) {
17142
        return lastComparison;
17143
      }
553 chandransh 17144
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17145
      if (lastComparison != 0) {
17146
        return lastComparison;
17147
      }
553 chandransh 17148
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 17149
      if (lastComparison != 0) {
17150
        return lastComparison;
17151
      }
553 chandransh 17152
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 17153
      if (lastComparison != 0) {
17154
        return lastComparison;
17155
      }
17156
      return 0;
17157
    }
17158
 
17159
    public void read(TProtocol iprot) throws TException {
17160
      TField field;
17161
      iprot.readStructBegin();
17162
      while (true)
17163
      {
17164
        field = iprot.readFieldBegin();
17165
        if (field.type == TType.STOP) { 
17166
          break;
17167
        }
17168
        _Fields fieldId = _Fields.findByThriftId(field.id);
17169
        if (fieldId == null) {
17170
          TProtocolUtil.skip(iprot, field.type);
17171
        } else {
17172
          switch (fieldId) {
553 chandransh 17173
            case USER_ID:
48 ashish 17174
              if (field.type == TType.I64) {
553 chandransh 17175
                this.userId = iprot.readI64();
17176
                setUserIdIsSet(true);
48 ashish 17177
              } else { 
17178
                TProtocolUtil.skip(iprot, field.type);
17179
              }
17180
              break;
553 chandransh 17181
            case STATUS:
17182
              if (field.type == TType.I32) {
17183
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 17184
              } else { 
17185
                TProtocolUtil.skip(iprot, field.type);
17186
              }
17187
              break;
17188
          }
17189
          iprot.readFieldEnd();
17190
        }
17191
      }
17192
      iprot.readStructEnd();
17193
      validate();
17194
    }
17195
 
17196
    public void write(TProtocol oprot) throws TException {
17197
      validate();
17198
 
17199
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17200
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17201
      oprot.writeI64(this.userId);
48 ashish 17202
      oprot.writeFieldEnd();
553 chandransh 17203
      if (this.status != null) {
17204
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17205
        oprot.writeI32(this.status.getValue());
48 ashish 17206
        oprot.writeFieldEnd();
17207
      }
17208
      oprot.writeFieldStop();
17209
      oprot.writeStructEnd();
17210
    }
17211
 
17212
    @Override
17213
    public String toString() {
553 chandransh 17214
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 17215
      boolean first = true;
17216
 
553 chandransh 17217
      sb.append("userId:");
17218
      sb.append(this.userId);
48 ashish 17219
      first = false;
17220
      if (!first) sb.append(", ");
553 chandransh 17221
      sb.append("status:");
17222
      if (this.status == null) {
48 ashish 17223
        sb.append("null");
17224
      } else {
553 chandransh 17225
        String status_name = status.name();
17226
        if (status_name != null) {
17227
          sb.append(status_name);
17228
          sb.append(" (");
17229
        }
17230
        sb.append(this.status);
17231
        if (status_name != null) {
17232
          sb.append(")");
17233
        }
48 ashish 17234
      }
17235
      first = false;
17236
      sb.append(")");
17237
      return sb.toString();
17238
    }
17239
 
17240
    public void validate() throws TException {
17241
      // check for required fields
17242
    }
17243
 
17244
  }
17245
 
553 chandransh 17246
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
17247
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 17248
 
553 chandransh 17249
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17250
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17251
 
553 chandransh 17252
    private List<Cart> success;
17253
    private ShoppingCartException scx;
48 ashish 17254
 
17255
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17256
    public enum _Fields implements TFieldIdEnum {
17257
      SUCCESS((short)0, "success"),
553 chandransh 17258
      SCX((short)1, "scx");
48 ashish 17259
 
17260
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17261
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17262
 
17263
      static {
17264
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17265
          byId.put((int)field._thriftId, field);
17266
          byName.put(field.getFieldName(), field);
17267
        }
17268
      }
17269
 
17270
      /**
17271
       * Find the _Fields constant that matches fieldId, or null if its not found.
17272
       */
17273
      public static _Fields findByThriftId(int fieldId) {
17274
        return byId.get(fieldId);
17275
      }
17276
 
17277
      /**
17278
       * Find the _Fields constant that matches fieldId, throwing an exception
17279
       * if it is not found.
17280
       */
17281
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17282
        _Fields fields = findByThriftId(fieldId);
17283
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17284
        return fields;
17285
      }
17286
 
17287
      /**
17288
       * Find the _Fields constant that matches name, or null if its not found.
17289
       */
17290
      public static _Fields findByName(String name) {
17291
        return byName.get(name);
17292
      }
17293
 
17294
      private final short _thriftId;
17295
      private final String _fieldName;
17296
 
17297
      _Fields(short thriftId, String fieldName) {
17298
        _thriftId = thriftId;
17299
        _fieldName = fieldName;
17300
      }
17301
 
17302
      public short getThriftFieldId() {
17303
        return _thriftId;
17304
      }
17305
 
17306
      public String getFieldName() {
17307
        return _fieldName;
17308
      }
17309
    }
17310
 
17311
    // isset id assignments
17312
 
17313
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17314
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17315
          new ListMetaData(TType.LIST, 
17316
              new StructMetaData(TType.STRUCT, Cart.class))));
17317
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17318
          new FieldValueMetaData(TType.STRUCT)));
17319
    }});
17320
 
17321
    static {
553 chandransh 17322
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 17323
    }
17324
 
553 chandransh 17325
    public getCartsForUser_result() {
48 ashish 17326
    }
17327
 
553 chandransh 17328
    public getCartsForUser_result(
17329
      List<Cart> success,
17330
      ShoppingCartException scx)
48 ashish 17331
    {
17332
      this();
17333
      this.success = success;
553 chandransh 17334
      this.scx = scx;
48 ashish 17335
    }
17336
 
17337
    /**
17338
     * Performs a deep copy on <i>other</i>.
17339
     */
553 chandransh 17340
    public getCartsForUser_result(getCartsForUser_result other) {
17341
      if (other.isSetSuccess()) {
17342
        List<Cart> __this__success = new ArrayList<Cart>();
17343
        for (Cart other_element : other.success) {
17344
          __this__success.add(new Cart(other_element));
17345
        }
17346
        this.success = __this__success;
48 ashish 17347
      }
553 chandransh 17348
      if (other.isSetScx()) {
17349
        this.scx = new ShoppingCartException(other.scx);
17350
      }
48 ashish 17351
    }
17352
 
553 chandransh 17353
    public getCartsForUser_result deepCopy() {
17354
      return new getCartsForUser_result(this);
48 ashish 17355
    }
17356
 
17357
    @Deprecated
553 chandransh 17358
    public getCartsForUser_result clone() {
17359
      return new getCartsForUser_result(this);
48 ashish 17360
    }
17361
 
553 chandransh 17362
    public int getSuccessSize() {
17363
      return (this.success == null) ? 0 : this.success.size();
17364
    }
17365
 
17366
    public java.util.Iterator<Cart> getSuccessIterator() {
17367
      return (this.success == null) ? null : this.success.iterator();
17368
    }
17369
 
17370
    public void addToSuccess(Cart elem) {
17371
      if (this.success == null) {
17372
        this.success = new ArrayList<Cart>();
17373
      }
17374
      this.success.add(elem);
17375
    }
17376
 
17377
    public List<Cart> getSuccess() {
48 ashish 17378
      return this.success;
17379
    }
17380
 
553 chandransh 17381
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 17382
      this.success = success;
17383
      return this;
17384
    }
17385
 
17386
    public void unsetSuccess() {
553 chandransh 17387
      this.success = null;
48 ashish 17388
    }
17389
 
17390
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17391
    public boolean isSetSuccess() {
553 chandransh 17392
      return this.success != null;
48 ashish 17393
    }
17394
 
17395
    public void setSuccessIsSet(boolean value) {
553 chandransh 17396
      if (!value) {
17397
        this.success = null;
17398
      }
48 ashish 17399
    }
17400
 
553 chandransh 17401
    public ShoppingCartException getScx() {
17402
      return this.scx;
48 ashish 17403
    }
17404
 
553 chandransh 17405
    public getCartsForUser_result setScx(ShoppingCartException scx) {
17406
      this.scx = scx;
48 ashish 17407
      return this;
17408
    }
17409
 
553 chandransh 17410
    public void unsetScx() {
17411
      this.scx = null;
48 ashish 17412
    }
17413
 
553 chandransh 17414
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17415
    public boolean isSetScx() {
17416
      return this.scx != null;
48 ashish 17417
    }
17418
 
553 chandransh 17419
    public void setScxIsSet(boolean value) {
48 ashish 17420
      if (!value) {
553 chandransh 17421
        this.scx = null;
48 ashish 17422
      }
17423
    }
17424
 
17425
    public void setFieldValue(_Fields field, Object value) {
17426
      switch (field) {
17427
      case SUCCESS:
17428
        if (value == null) {
17429
          unsetSuccess();
17430
        } else {
553 chandransh 17431
          setSuccess((List<Cart>)value);
48 ashish 17432
        }
17433
        break;
17434
 
553 chandransh 17435
      case SCX:
48 ashish 17436
        if (value == null) {
553 chandransh 17437
          unsetScx();
48 ashish 17438
        } else {
553 chandransh 17439
          setScx((ShoppingCartException)value);
48 ashish 17440
        }
17441
        break;
17442
 
17443
      }
17444
    }
17445
 
17446
    public void setFieldValue(int fieldID, Object value) {
17447
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17448
    }
17449
 
17450
    public Object getFieldValue(_Fields field) {
17451
      switch (field) {
17452
      case SUCCESS:
553 chandransh 17453
        return getSuccess();
48 ashish 17454
 
553 chandransh 17455
      case SCX:
17456
        return getScx();
48 ashish 17457
 
17458
      }
17459
      throw new IllegalStateException();
17460
    }
17461
 
17462
    public Object getFieldValue(int fieldId) {
17463
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17464
    }
17465
 
17466
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17467
    public boolean isSet(_Fields field) {
17468
      switch (field) {
17469
      case SUCCESS:
17470
        return isSetSuccess();
553 chandransh 17471
      case SCX:
17472
        return isSetScx();
48 ashish 17473
      }
17474
      throw new IllegalStateException();
17475
    }
17476
 
17477
    public boolean isSet(int fieldID) {
17478
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17479
    }
17480
 
17481
    @Override
17482
    public boolean equals(Object that) {
17483
      if (that == null)
17484
        return false;
553 chandransh 17485
      if (that instanceof getCartsForUser_result)
17486
        return this.equals((getCartsForUser_result)that);
48 ashish 17487
      return false;
17488
    }
17489
 
553 chandransh 17490
    public boolean equals(getCartsForUser_result that) {
48 ashish 17491
      if (that == null)
17492
        return false;
17493
 
553 chandransh 17494
      boolean this_present_success = true && this.isSetSuccess();
17495
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 17496
      if (this_present_success || that_present_success) {
17497
        if (!(this_present_success && that_present_success))
17498
          return false;
553 chandransh 17499
        if (!this.success.equals(that.success))
48 ashish 17500
          return false;
17501
      }
17502
 
553 chandransh 17503
      boolean this_present_scx = true && this.isSetScx();
17504
      boolean that_present_scx = true && that.isSetScx();
17505
      if (this_present_scx || that_present_scx) {
17506
        if (!(this_present_scx && that_present_scx))
48 ashish 17507
          return false;
553 chandransh 17508
        if (!this.scx.equals(that.scx))
48 ashish 17509
          return false;
17510
      }
17511
 
17512
      return true;
17513
    }
17514
 
17515
    @Override
17516
    public int hashCode() {
17517
      return 0;
17518
    }
17519
 
553 chandransh 17520
    public int compareTo(getCartsForUser_result other) {
48 ashish 17521
      if (!getClass().equals(other.getClass())) {
17522
        return getClass().getName().compareTo(other.getClass().getName());
17523
      }
17524
 
17525
      int lastComparison = 0;
553 chandransh 17526
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 17527
 
17528
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17529
      if (lastComparison != 0) {
17530
        return lastComparison;
17531
      }
17532
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17533
      if (lastComparison != 0) {
17534
        return lastComparison;
17535
      }
553 chandransh 17536
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 17537
      if (lastComparison != 0) {
17538
        return lastComparison;
17539
      }
553 chandransh 17540
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 17541
      if (lastComparison != 0) {
17542
        return lastComparison;
17543
      }
17544
      return 0;
17545
    }
17546
 
17547
    public void read(TProtocol iprot) throws TException {
17548
      TField field;
17549
      iprot.readStructBegin();
17550
      while (true)
17551
      {
17552
        field = iprot.readFieldBegin();
17553
        if (field.type == TType.STOP) { 
17554
          break;
17555
        }
17556
        _Fields fieldId = _Fields.findByThriftId(field.id);
17557
        if (fieldId == null) {
17558
          TProtocolUtil.skip(iprot, field.type);
17559
        } else {
17560
          switch (fieldId) {
17561
            case SUCCESS:
553 chandransh 17562
              if (field.type == TType.LIST) {
17563
                {
593 rajveer 17564
                  TList _list25 = iprot.readListBegin();
17565
                  this.success = new ArrayList<Cart>(_list25.size);
17566
                  for (int _i26 = 0; _i26 < _list25.size; ++_i26)
553 chandransh 17567
                  {
593 rajveer 17568
                    Cart _elem27;
17569
                    _elem27 = new Cart();
17570
                    _elem27.read(iprot);
17571
                    this.success.add(_elem27);
553 chandransh 17572
                  }
17573
                  iprot.readListEnd();
17574
                }
48 ashish 17575
              } else { 
17576
                TProtocolUtil.skip(iprot, field.type);
17577
              }
17578
              break;
553 chandransh 17579
            case SCX:
48 ashish 17580
              if (field.type == TType.STRUCT) {
553 chandransh 17581
                this.scx = new ShoppingCartException();
17582
                this.scx.read(iprot);
48 ashish 17583
              } else { 
17584
                TProtocolUtil.skip(iprot, field.type);
17585
              }
17586
              break;
17587
          }
17588
          iprot.readFieldEnd();
17589
        }
17590
      }
17591
      iprot.readStructEnd();
17592
      validate();
17593
    }
17594
 
17595
    public void write(TProtocol oprot) throws TException {
17596
      oprot.writeStructBegin(STRUCT_DESC);
17597
 
17598
      if (this.isSetSuccess()) {
17599
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17600
        {
17601
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 17602
          for (Cart _iter28 : this.success)
553 chandransh 17603
          {
593 rajveer 17604
            _iter28.write(oprot);
553 chandransh 17605
          }
17606
          oprot.writeListEnd();
17607
        }
48 ashish 17608
        oprot.writeFieldEnd();
553 chandransh 17609
      } else if (this.isSetScx()) {
17610
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17611
        this.scx.write(oprot);
48 ashish 17612
        oprot.writeFieldEnd();
17613
      }
17614
      oprot.writeFieldStop();
17615
      oprot.writeStructEnd();
17616
    }
17617
 
17618
    @Override
17619
    public String toString() {
553 chandransh 17620
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 17621
      boolean first = true;
17622
 
17623
      sb.append("success:");
553 chandransh 17624
      if (this.success == null) {
17625
        sb.append("null");
17626
      } else {
17627
        sb.append(this.success);
17628
      }
48 ashish 17629
      first = false;
17630
      if (!first) sb.append(", ");
553 chandransh 17631
      sb.append("scx:");
17632
      if (this.scx == null) {
48 ashish 17633
        sb.append("null");
17634
      } else {
553 chandransh 17635
        sb.append(this.scx);
48 ashish 17636
      }
17637
      first = false;
17638
      sb.append(")");
17639
      return sb.toString();
17640
    }
17641
 
17642
    public void validate() throws TException {
17643
      // check for required fields
17644
    }
17645
 
17646
  }
17647
 
553 chandransh 17648
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
17649
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 17650
 
553 chandransh 17651
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 17652
 
553 chandransh 17653
    private CartStatus status;
48 ashish 17654
 
17655
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17656
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17657
      /**
17658
       * 
17659
       * @see CartStatus
17660
       */
17661
      STATUS((short)1, "status");
48 ashish 17662
 
17663
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17665
 
17666
      static {
17667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17668
          byId.put((int)field._thriftId, field);
17669
          byName.put(field.getFieldName(), field);
17670
        }
17671
      }
17672
 
17673
      /**
17674
       * Find the _Fields constant that matches fieldId, or null if its not found.
17675
       */
17676
      public static _Fields findByThriftId(int fieldId) {
17677
        return byId.get(fieldId);
17678
      }
17679
 
17680
      /**
17681
       * Find the _Fields constant that matches fieldId, throwing an exception
17682
       * if it is not found.
17683
       */
17684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17685
        _Fields fields = findByThriftId(fieldId);
17686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17687
        return fields;
17688
      }
17689
 
17690
      /**
17691
       * Find the _Fields constant that matches name, or null if its not found.
17692
       */
17693
      public static _Fields findByName(String name) {
17694
        return byName.get(name);
17695
      }
17696
 
17697
      private final short _thriftId;
17698
      private final String _fieldName;
17699
 
17700
      _Fields(short thriftId, String fieldName) {
17701
        _thriftId = thriftId;
17702
        _fieldName = fieldName;
17703
      }
17704
 
17705
      public short getThriftFieldId() {
17706
        return _thriftId;
17707
      }
17708
 
17709
      public String getFieldName() {
17710
        return _fieldName;
17711
      }
17712
    }
17713
 
17714
    // isset id assignments
553 chandransh 17715
 
17716
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17717
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17718
          new EnumMetaData(TType.ENUM, CartStatus.class)));
17719
    }});
17720
 
17721
    static {
17722
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
17723
    }
17724
 
17725
    public getCartsByStatus_args() {
17726
    }
17727
 
17728
    public getCartsByStatus_args(
17729
      CartStatus status)
17730
    {
17731
      this();
17732
      this.status = status;
17733
    }
17734
 
17735
    /**
17736
     * Performs a deep copy on <i>other</i>.
17737
     */
17738
    public getCartsByStatus_args(getCartsByStatus_args other) {
17739
      if (other.isSetStatus()) {
17740
        this.status = other.status;
17741
      }
17742
    }
17743
 
17744
    public getCartsByStatus_args deepCopy() {
17745
      return new getCartsByStatus_args(this);
17746
    }
17747
 
17748
    @Deprecated
17749
    public getCartsByStatus_args clone() {
17750
      return new getCartsByStatus_args(this);
17751
    }
17752
 
17753
    /**
17754
     * 
17755
     * @see CartStatus
17756
     */
17757
    public CartStatus getStatus() {
17758
      return this.status;
17759
    }
17760
 
17761
    /**
17762
     * 
17763
     * @see CartStatus
17764
     */
17765
    public getCartsByStatus_args setStatus(CartStatus status) {
17766
      this.status = status;
17767
      return this;
17768
    }
17769
 
17770
    public void unsetStatus() {
17771
      this.status = null;
17772
    }
17773
 
17774
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17775
    public boolean isSetStatus() {
17776
      return this.status != null;
17777
    }
17778
 
17779
    public void setStatusIsSet(boolean value) {
17780
      if (!value) {
17781
        this.status = null;
17782
      }
17783
    }
17784
 
17785
    public void setFieldValue(_Fields field, Object value) {
17786
      switch (field) {
17787
      case STATUS:
17788
        if (value == null) {
17789
          unsetStatus();
17790
        } else {
17791
          setStatus((CartStatus)value);
17792
        }
17793
        break;
17794
 
17795
      }
17796
    }
17797
 
17798
    public void setFieldValue(int fieldID, Object value) {
17799
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17800
    }
17801
 
17802
    public Object getFieldValue(_Fields field) {
17803
      switch (field) {
17804
      case STATUS:
17805
        return getStatus();
17806
 
17807
      }
17808
      throw new IllegalStateException();
17809
    }
17810
 
17811
    public Object getFieldValue(int fieldId) {
17812
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17813
    }
17814
 
17815
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17816
    public boolean isSet(_Fields field) {
17817
      switch (field) {
17818
      case STATUS:
17819
        return isSetStatus();
17820
      }
17821
      throw new IllegalStateException();
17822
    }
17823
 
17824
    public boolean isSet(int fieldID) {
17825
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17826
    }
17827
 
17828
    @Override
17829
    public boolean equals(Object that) {
17830
      if (that == null)
17831
        return false;
17832
      if (that instanceof getCartsByStatus_args)
17833
        return this.equals((getCartsByStatus_args)that);
17834
      return false;
17835
    }
17836
 
17837
    public boolean equals(getCartsByStatus_args that) {
17838
      if (that == null)
17839
        return false;
17840
 
17841
      boolean this_present_status = true && this.isSetStatus();
17842
      boolean that_present_status = true && that.isSetStatus();
17843
      if (this_present_status || that_present_status) {
17844
        if (!(this_present_status && that_present_status))
17845
          return false;
17846
        if (!this.status.equals(that.status))
17847
          return false;
17848
      }
17849
 
17850
      return true;
17851
    }
17852
 
17853
    @Override
17854
    public int hashCode() {
17855
      return 0;
17856
    }
17857
 
17858
    public int compareTo(getCartsByStatus_args other) {
17859
      if (!getClass().equals(other.getClass())) {
17860
        return getClass().getName().compareTo(other.getClass().getName());
17861
      }
17862
 
17863
      int lastComparison = 0;
17864
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
17865
 
17866
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17867
      if (lastComparison != 0) {
17868
        return lastComparison;
17869
      }
17870
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17871
      if (lastComparison != 0) {
17872
        return lastComparison;
17873
      }
17874
      return 0;
17875
    }
17876
 
17877
    public void read(TProtocol iprot) throws TException {
17878
      TField field;
17879
      iprot.readStructBegin();
17880
      while (true)
17881
      {
17882
        field = iprot.readFieldBegin();
17883
        if (field.type == TType.STOP) { 
17884
          break;
17885
        }
17886
        _Fields fieldId = _Fields.findByThriftId(field.id);
17887
        if (fieldId == null) {
17888
          TProtocolUtil.skip(iprot, field.type);
17889
        } else {
17890
          switch (fieldId) {
17891
            case STATUS:
17892
              if (field.type == TType.I32) {
17893
                this.status = CartStatus.findByValue(iprot.readI32());
17894
              } else { 
17895
                TProtocolUtil.skip(iprot, field.type);
17896
              }
17897
              break;
17898
          }
17899
          iprot.readFieldEnd();
17900
        }
17901
      }
17902
      iprot.readStructEnd();
17903
      validate();
17904
    }
17905
 
17906
    public void write(TProtocol oprot) throws TException {
17907
      validate();
17908
 
17909
      oprot.writeStructBegin(STRUCT_DESC);
17910
      if (this.status != null) {
17911
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17912
        oprot.writeI32(this.status.getValue());
17913
        oprot.writeFieldEnd();
17914
      }
17915
      oprot.writeFieldStop();
17916
      oprot.writeStructEnd();
17917
    }
17918
 
17919
    @Override
17920
    public String toString() {
17921
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
17922
      boolean first = true;
17923
 
17924
      sb.append("status:");
17925
      if (this.status == null) {
17926
        sb.append("null");
17927
      } else {
17928
        String status_name = status.name();
17929
        if (status_name != null) {
17930
          sb.append(status_name);
17931
          sb.append(" (");
17932
        }
17933
        sb.append(this.status);
17934
        if (status_name != null) {
17935
          sb.append(")");
17936
        }
17937
      }
17938
      first = false;
17939
      sb.append(")");
17940
      return sb.toString();
17941
    }
17942
 
17943
    public void validate() throws TException {
17944
      // check for required fields
17945
    }
17946
 
17947
  }
17948
 
17949
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
17950
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
17951
 
17952
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17953
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
17954
 
17955
    private List<Cart> success;
17956
    private ShoppingCartException scx;
17957
 
17958
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17959
    public enum _Fields implements TFieldIdEnum {
17960
      SUCCESS((short)0, "success"),
17961
      SCX((short)1, "scx");
17962
 
17963
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17964
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17965
 
17966
      static {
17967
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17968
          byId.put((int)field._thriftId, field);
17969
          byName.put(field.getFieldName(), field);
17970
        }
17971
      }
17972
 
17973
      /**
17974
       * Find the _Fields constant that matches fieldId, or null if its not found.
17975
       */
17976
      public static _Fields findByThriftId(int fieldId) {
17977
        return byId.get(fieldId);
17978
      }
17979
 
17980
      /**
17981
       * Find the _Fields constant that matches fieldId, throwing an exception
17982
       * if it is not found.
17983
       */
17984
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17985
        _Fields fields = findByThriftId(fieldId);
17986
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17987
        return fields;
17988
      }
17989
 
17990
      /**
17991
       * Find the _Fields constant that matches name, or null if its not found.
17992
       */
17993
      public static _Fields findByName(String name) {
17994
        return byName.get(name);
17995
      }
17996
 
17997
      private final short _thriftId;
17998
      private final String _fieldName;
17999
 
18000
      _Fields(short thriftId, String fieldName) {
18001
        _thriftId = thriftId;
18002
        _fieldName = fieldName;
18003
      }
18004
 
18005
      public short getThriftFieldId() {
18006
        return _thriftId;
18007
      }
18008
 
18009
      public String getFieldName() {
18010
        return _fieldName;
18011
      }
18012
    }
18013
 
18014
    // isset id assignments
18015
 
18016
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18017
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18018
          new ListMetaData(TType.LIST, 
18019
              new StructMetaData(TType.STRUCT, Cart.class))));
18020
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18021
          new FieldValueMetaData(TType.STRUCT)));
18022
    }});
18023
 
18024
    static {
18025
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
18026
    }
18027
 
18028
    public getCartsByStatus_result() {
18029
    }
18030
 
18031
    public getCartsByStatus_result(
18032
      List<Cart> success,
18033
      ShoppingCartException scx)
18034
    {
18035
      this();
18036
      this.success = success;
18037
      this.scx = scx;
18038
    }
18039
 
18040
    /**
18041
     * Performs a deep copy on <i>other</i>.
18042
     */
18043
    public getCartsByStatus_result(getCartsByStatus_result other) {
18044
      if (other.isSetSuccess()) {
18045
        List<Cart> __this__success = new ArrayList<Cart>();
18046
        for (Cart other_element : other.success) {
18047
          __this__success.add(new Cart(other_element));
18048
        }
18049
        this.success = __this__success;
18050
      }
18051
      if (other.isSetScx()) {
18052
        this.scx = new ShoppingCartException(other.scx);
18053
      }
18054
    }
18055
 
18056
    public getCartsByStatus_result deepCopy() {
18057
      return new getCartsByStatus_result(this);
18058
    }
18059
 
18060
    @Deprecated
18061
    public getCartsByStatus_result clone() {
18062
      return new getCartsByStatus_result(this);
18063
    }
18064
 
18065
    public int getSuccessSize() {
18066
      return (this.success == null) ? 0 : this.success.size();
18067
    }
18068
 
18069
    public java.util.Iterator<Cart> getSuccessIterator() {
18070
      return (this.success == null) ? null : this.success.iterator();
18071
    }
18072
 
18073
    public void addToSuccess(Cart elem) {
18074
      if (this.success == null) {
18075
        this.success = new ArrayList<Cart>();
18076
      }
18077
      this.success.add(elem);
18078
    }
18079
 
18080
    public List<Cart> getSuccess() {
18081
      return this.success;
18082
    }
18083
 
18084
    public getCartsByStatus_result setSuccess(List<Cart> success) {
18085
      this.success = success;
18086
      return this;
18087
    }
18088
 
18089
    public void unsetSuccess() {
18090
      this.success = null;
18091
    }
18092
 
18093
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18094
    public boolean isSetSuccess() {
18095
      return this.success != null;
18096
    }
18097
 
18098
    public void setSuccessIsSet(boolean value) {
18099
      if (!value) {
18100
        this.success = null;
18101
      }
18102
    }
18103
 
18104
    public ShoppingCartException getScx() {
18105
      return this.scx;
18106
    }
18107
 
18108
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
18109
      this.scx = scx;
18110
      return this;
18111
    }
18112
 
18113
    public void unsetScx() {
18114
      this.scx = null;
18115
    }
18116
 
18117
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18118
    public boolean isSetScx() {
18119
      return this.scx != null;
18120
    }
18121
 
18122
    public void setScxIsSet(boolean value) {
18123
      if (!value) {
18124
        this.scx = null;
18125
      }
18126
    }
18127
 
18128
    public void setFieldValue(_Fields field, Object value) {
18129
      switch (field) {
18130
      case SUCCESS:
18131
        if (value == null) {
18132
          unsetSuccess();
18133
        } else {
18134
          setSuccess((List<Cart>)value);
18135
        }
18136
        break;
18137
 
18138
      case SCX:
18139
        if (value == null) {
18140
          unsetScx();
18141
        } else {
18142
          setScx((ShoppingCartException)value);
18143
        }
18144
        break;
18145
 
18146
      }
18147
    }
18148
 
18149
    public void setFieldValue(int fieldID, Object value) {
18150
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18151
    }
18152
 
18153
    public Object getFieldValue(_Fields field) {
18154
      switch (field) {
18155
      case SUCCESS:
18156
        return getSuccess();
18157
 
18158
      case SCX:
18159
        return getScx();
18160
 
18161
      }
18162
      throw new IllegalStateException();
18163
    }
18164
 
18165
    public Object getFieldValue(int fieldId) {
18166
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18167
    }
18168
 
18169
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18170
    public boolean isSet(_Fields field) {
18171
      switch (field) {
18172
      case SUCCESS:
18173
        return isSetSuccess();
18174
      case SCX:
18175
        return isSetScx();
18176
      }
18177
      throw new IllegalStateException();
18178
    }
18179
 
18180
    public boolean isSet(int fieldID) {
18181
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18182
    }
18183
 
18184
    @Override
18185
    public boolean equals(Object that) {
18186
      if (that == null)
18187
        return false;
18188
      if (that instanceof getCartsByStatus_result)
18189
        return this.equals((getCartsByStatus_result)that);
18190
      return false;
18191
    }
18192
 
18193
    public boolean equals(getCartsByStatus_result that) {
18194
      if (that == null)
18195
        return false;
18196
 
18197
      boolean this_present_success = true && this.isSetSuccess();
18198
      boolean that_present_success = true && that.isSetSuccess();
18199
      if (this_present_success || that_present_success) {
18200
        if (!(this_present_success && that_present_success))
18201
          return false;
18202
        if (!this.success.equals(that.success))
18203
          return false;
18204
      }
18205
 
18206
      boolean this_present_scx = true && this.isSetScx();
18207
      boolean that_present_scx = true && that.isSetScx();
18208
      if (this_present_scx || that_present_scx) {
18209
        if (!(this_present_scx && that_present_scx))
18210
          return false;
18211
        if (!this.scx.equals(that.scx))
18212
          return false;
18213
      }
18214
 
18215
      return true;
18216
    }
18217
 
18218
    @Override
18219
    public int hashCode() {
18220
      return 0;
18221
    }
18222
 
18223
    public int compareTo(getCartsByStatus_result other) {
18224
      if (!getClass().equals(other.getClass())) {
18225
        return getClass().getName().compareTo(other.getClass().getName());
18226
      }
18227
 
18228
      int lastComparison = 0;
18229
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
18230
 
18231
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18232
      if (lastComparison != 0) {
18233
        return lastComparison;
18234
      }
18235
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18236
      if (lastComparison != 0) {
18237
        return lastComparison;
18238
      }
18239
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18240
      if (lastComparison != 0) {
18241
        return lastComparison;
18242
      }
18243
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18244
      if (lastComparison != 0) {
18245
        return lastComparison;
18246
      }
18247
      return 0;
18248
    }
18249
 
18250
    public void read(TProtocol iprot) throws TException {
18251
      TField field;
18252
      iprot.readStructBegin();
18253
      while (true)
18254
      {
18255
        field = iprot.readFieldBegin();
18256
        if (field.type == TType.STOP) { 
18257
          break;
18258
        }
18259
        _Fields fieldId = _Fields.findByThriftId(field.id);
18260
        if (fieldId == null) {
18261
          TProtocolUtil.skip(iprot, field.type);
18262
        } else {
18263
          switch (fieldId) {
18264
            case SUCCESS:
18265
              if (field.type == TType.LIST) {
18266
                {
593 rajveer 18267
                  TList _list29 = iprot.readListBegin();
18268
                  this.success = new ArrayList<Cart>(_list29.size);
18269
                  for (int _i30 = 0; _i30 < _list29.size; ++_i30)
553 chandransh 18270
                  {
593 rajveer 18271
                    Cart _elem31;
18272
                    _elem31 = new Cart();
18273
                    _elem31.read(iprot);
18274
                    this.success.add(_elem31);
553 chandransh 18275
                  }
18276
                  iprot.readListEnd();
18277
                }
18278
              } else { 
18279
                TProtocolUtil.skip(iprot, field.type);
18280
              }
18281
              break;
18282
            case SCX:
18283
              if (field.type == TType.STRUCT) {
18284
                this.scx = new ShoppingCartException();
18285
                this.scx.read(iprot);
18286
              } else { 
18287
                TProtocolUtil.skip(iprot, field.type);
18288
              }
18289
              break;
18290
          }
18291
          iprot.readFieldEnd();
18292
        }
18293
      }
18294
      iprot.readStructEnd();
18295
      validate();
18296
    }
18297
 
18298
    public void write(TProtocol oprot) throws TException {
18299
      oprot.writeStructBegin(STRUCT_DESC);
18300
 
18301
      if (this.isSetSuccess()) {
18302
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18303
        {
18304
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 18305
          for (Cart _iter32 : this.success)
553 chandransh 18306
          {
593 rajveer 18307
            _iter32.write(oprot);
553 chandransh 18308
          }
18309
          oprot.writeListEnd();
18310
        }
18311
        oprot.writeFieldEnd();
18312
      } else if (this.isSetScx()) {
18313
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18314
        this.scx.write(oprot);
18315
        oprot.writeFieldEnd();
18316
      }
18317
      oprot.writeFieldStop();
18318
      oprot.writeStructEnd();
18319
    }
18320
 
18321
    @Override
18322
    public String toString() {
18323
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
18324
      boolean first = true;
18325
 
18326
      sb.append("success:");
18327
      if (this.success == null) {
18328
        sb.append("null");
18329
      } else {
18330
        sb.append(this.success);
18331
      }
18332
      first = false;
18333
      if (!first) sb.append(", ");
18334
      sb.append("scx:");
18335
      if (this.scx == null) {
18336
        sb.append("null");
18337
      } else {
18338
        sb.append(this.scx);
18339
      }
18340
      first = false;
18341
      sb.append(")");
18342
      return sb.toString();
18343
    }
18344
 
18345
    public void validate() throws TException {
18346
      // check for required fields
18347
    }
18348
 
18349
  }
18350
 
18351
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
18352
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
18353
 
18354
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
18355
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
18356
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
18357
 
18358
    private long from_time;
18359
    private long to_time;
18360
    private CartStatus status;
18361
 
18362
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18363
    public enum _Fields implements TFieldIdEnum {
18364
      FROM_TIME((short)1, "from_time"),
18365
      TO_TIME((short)2, "to_time"),
18366
      /**
18367
       * 
18368
       * @see CartStatus
18369
       */
18370
      STATUS((short)3, "status");
18371
 
18372
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18373
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18374
 
18375
      static {
18376
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18377
          byId.put((int)field._thriftId, field);
18378
          byName.put(field.getFieldName(), field);
18379
        }
18380
      }
18381
 
18382
      /**
18383
       * Find the _Fields constant that matches fieldId, or null if its not found.
18384
       */
18385
      public static _Fields findByThriftId(int fieldId) {
18386
        return byId.get(fieldId);
18387
      }
18388
 
18389
      /**
18390
       * Find the _Fields constant that matches fieldId, throwing an exception
18391
       * if it is not found.
18392
       */
18393
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18394
        _Fields fields = findByThriftId(fieldId);
18395
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18396
        return fields;
18397
      }
18398
 
18399
      /**
18400
       * Find the _Fields constant that matches name, or null if its not found.
18401
       */
18402
      public static _Fields findByName(String name) {
18403
        return byName.get(name);
18404
      }
18405
 
18406
      private final short _thriftId;
18407
      private final String _fieldName;
18408
 
18409
      _Fields(short thriftId, String fieldName) {
18410
        _thriftId = thriftId;
18411
        _fieldName = fieldName;
18412
      }
18413
 
18414
      public short getThriftFieldId() {
18415
        return _thriftId;
18416
      }
18417
 
18418
      public String getFieldName() {
18419
        return _fieldName;
18420
      }
18421
    }
18422
 
18423
    // isset id assignments
18424
    private static final int __FROM_TIME_ISSET_ID = 0;
18425
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 18426
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 18427
 
18428
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18429
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 18430
          new FieldValueMetaData(TType.I64)));
553 chandransh 18431
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
18432
          new FieldValueMetaData(TType.I64)));
18433
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18434
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 18435
    }});
18436
 
18437
    static {
553 chandransh 18438
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 18439
    }
18440
 
553 chandransh 18441
    public getCartsByTime_args() {
48 ashish 18442
    }
18443
 
553 chandransh 18444
    public getCartsByTime_args(
18445
      long from_time,
18446
      long to_time,
18447
      CartStatus status)
48 ashish 18448
    {
18449
      this();
553 chandransh 18450
      this.from_time = from_time;
18451
      setFrom_timeIsSet(true);
18452
      this.to_time = to_time;
18453
      setTo_timeIsSet(true);
18454
      this.status = status;
48 ashish 18455
    }
18456
 
18457
    /**
18458
     * Performs a deep copy on <i>other</i>.
18459
     */
553 chandransh 18460
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 18461
      __isset_bit_vector.clear();
18462
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18463
      this.from_time = other.from_time;
18464
      this.to_time = other.to_time;
18465
      if (other.isSetStatus()) {
18466
        this.status = other.status;
18467
      }
48 ashish 18468
    }
18469
 
553 chandransh 18470
    public getCartsByTime_args deepCopy() {
18471
      return new getCartsByTime_args(this);
48 ashish 18472
    }
18473
 
18474
    @Deprecated
553 chandransh 18475
    public getCartsByTime_args clone() {
18476
      return new getCartsByTime_args(this);
48 ashish 18477
    }
18478
 
553 chandransh 18479
    public long getFrom_time() {
18480
      return this.from_time;
48 ashish 18481
    }
18482
 
553 chandransh 18483
    public getCartsByTime_args setFrom_time(long from_time) {
18484
      this.from_time = from_time;
18485
      setFrom_timeIsSet(true);
48 ashish 18486
      return this;
18487
    }
18488
 
553 chandransh 18489
    public void unsetFrom_time() {
18490
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 18491
    }
18492
 
553 chandransh 18493
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
18494
    public boolean isSetFrom_time() {
18495
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 18496
    }
18497
 
553 chandransh 18498
    public void setFrom_timeIsSet(boolean value) {
18499
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 18500
    }
18501
 
553 chandransh 18502
    public long getTo_time() {
18503
      return this.to_time;
123 ashish 18504
    }
18505
 
553 chandransh 18506
    public getCartsByTime_args setTo_time(long to_time) {
18507
      this.to_time = to_time;
18508
      setTo_timeIsSet(true);
123 ashish 18509
      return this;
18510
    }
18511
 
553 chandransh 18512
    public void unsetTo_time() {
18513
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 18514
    }
18515
 
553 chandransh 18516
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
18517
    public boolean isSetTo_time() {
18518
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 18519
    }
18520
 
553 chandransh 18521
    public void setTo_timeIsSet(boolean value) {
18522
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 18523
    }
18524
 
553 chandransh 18525
    /**
18526
     * 
18527
     * @see CartStatus
18528
     */
18529
    public CartStatus getStatus() {
18530
      return this.status;
18531
    }
18532
 
18533
    /**
18534
     * 
18535
     * @see CartStatus
18536
     */
18537
    public getCartsByTime_args setStatus(CartStatus status) {
18538
      this.status = status;
18539
      return this;
18540
    }
18541
 
18542
    public void unsetStatus() {
18543
      this.status = null;
18544
    }
18545
 
18546
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
18547
    public boolean isSetStatus() {
18548
      return this.status != null;
18549
    }
18550
 
18551
    public void setStatusIsSet(boolean value) {
18552
      if (!value) {
18553
        this.status = null;
18554
      }
18555
    }
18556
 
48 ashish 18557
    public void setFieldValue(_Fields field, Object value) {
18558
      switch (field) {
553 chandransh 18559
      case FROM_TIME:
48 ashish 18560
        if (value == null) {
553 chandransh 18561
          unsetFrom_time();
48 ashish 18562
        } else {
553 chandransh 18563
          setFrom_time((Long)value);
48 ashish 18564
        }
18565
        break;
18566
 
553 chandransh 18567
      case TO_TIME:
123 ashish 18568
        if (value == null) {
553 chandransh 18569
          unsetTo_time();
123 ashish 18570
        } else {
553 chandransh 18571
          setTo_time((Long)value);
123 ashish 18572
        }
18573
        break;
18574
 
553 chandransh 18575
      case STATUS:
18576
        if (value == null) {
18577
          unsetStatus();
18578
        } else {
18579
          setStatus((CartStatus)value);
18580
        }
18581
        break;
18582
 
48 ashish 18583
      }
18584
    }
18585
 
18586
    public void setFieldValue(int fieldID, Object value) {
18587
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18588
    }
18589
 
18590
    public Object getFieldValue(_Fields field) {
18591
      switch (field) {
553 chandransh 18592
      case FROM_TIME:
18593
        return new Long(getFrom_time());
48 ashish 18594
 
553 chandransh 18595
      case TO_TIME:
18596
        return new Long(getTo_time());
123 ashish 18597
 
553 chandransh 18598
      case STATUS:
18599
        return getStatus();
18600
 
48 ashish 18601
      }
18602
      throw new IllegalStateException();
18603
    }
18604
 
18605
    public Object getFieldValue(int fieldId) {
18606
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18607
    }
18608
 
18609
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18610
    public boolean isSet(_Fields field) {
18611
      switch (field) {
553 chandransh 18612
      case FROM_TIME:
18613
        return isSetFrom_time();
18614
      case TO_TIME:
18615
        return isSetTo_time();
18616
      case STATUS:
18617
        return isSetStatus();
48 ashish 18618
      }
18619
      throw new IllegalStateException();
18620
    }
18621
 
18622
    public boolean isSet(int fieldID) {
18623
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18624
    }
18625
 
18626
    @Override
18627
    public boolean equals(Object that) {
18628
      if (that == null)
18629
        return false;
553 chandransh 18630
      if (that instanceof getCartsByTime_args)
18631
        return this.equals((getCartsByTime_args)that);
48 ashish 18632
      return false;
18633
    }
18634
 
553 chandransh 18635
    public boolean equals(getCartsByTime_args that) {
48 ashish 18636
      if (that == null)
18637
        return false;
18638
 
553 chandransh 18639
      boolean this_present_from_time = true;
18640
      boolean that_present_from_time = true;
18641
      if (this_present_from_time || that_present_from_time) {
18642
        if (!(this_present_from_time && that_present_from_time))
48 ashish 18643
          return false;
553 chandransh 18644
        if (this.from_time != that.from_time)
48 ashish 18645
          return false;
18646
      }
18647
 
553 chandransh 18648
      boolean this_present_to_time = true;
18649
      boolean that_present_to_time = true;
18650
      if (this_present_to_time || that_present_to_time) {
18651
        if (!(this_present_to_time && that_present_to_time))
123 ashish 18652
          return false;
553 chandransh 18653
        if (this.to_time != that.to_time)
123 ashish 18654
          return false;
18655
      }
18656
 
553 chandransh 18657
      boolean this_present_status = true && this.isSetStatus();
18658
      boolean that_present_status = true && that.isSetStatus();
18659
      if (this_present_status || that_present_status) {
18660
        if (!(this_present_status && that_present_status))
18661
          return false;
18662
        if (!this.status.equals(that.status))
18663
          return false;
18664
      }
18665
 
48 ashish 18666
      return true;
18667
    }
18668
 
18669
    @Override
18670
    public int hashCode() {
18671
      return 0;
18672
    }
18673
 
553 chandransh 18674
    public int compareTo(getCartsByTime_args other) {
48 ashish 18675
      if (!getClass().equals(other.getClass())) {
18676
        return getClass().getName().compareTo(other.getClass().getName());
18677
      }
18678
 
18679
      int lastComparison = 0;
553 chandransh 18680
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 18681
 
553 chandransh 18682
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 18683
      if (lastComparison != 0) {
18684
        return lastComparison;
18685
      }
553 chandransh 18686
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 18687
      if (lastComparison != 0) {
18688
        return lastComparison;
18689
      }
553 chandransh 18690
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 18691
      if (lastComparison != 0) {
18692
        return lastComparison;
18693
      }
553 chandransh 18694
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 18695
      if (lastComparison != 0) {
18696
        return lastComparison;
18697
      }
553 chandransh 18698
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
18699
      if (lastComparison != 0) {
18700
        return lastComparison;
18701
      }
18702
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
18703
      if (lastComparison != 0) {
18704
        return lastComparison;
18705
      }
48 ashish 18706
      return 0;
18707
    }
18708
 
18709
    public void read(TProtocol iprot) throws TException {
18710
      TField field;
18711
      iprot.readStructBegin();
18712
      while (true)
18713
      {
18714
        field = iprot.readFieldBegin();
18715
        if (field.type == TType.STOP) { 
18716
          break;
18717
        }
18718
        _Fields fieldId = _Fields.findByThriftId(field.id);
18719
        if (fieldId == null) {
18720
          TProtocolUtil.skip(iprot, field.type);
18721
        } else {
18722
          switch (fieldId) {
553 chandransh 18723
            case FROM_TIME:
48 ashish 18724
              if (field.type == TType.I64) {
553 chandransh 18725
                this.from_time = iprot.readI64();
18726
                setFrom_timeIsSet(true);
48 ashish 18727
              } else { 
18728
                TProtocolUtil.skip(iprot, field.type);
18729
              }
18730
              break;
553 chandransh 18731
            case TO_TIME:
18732
              if (field.type == TType.I64) {
18733
                this.to_time = iprot.readI64();
18734
                setTo_timeIsSet(true);
123 ashish 18735
              } else { 
18736
                TProtocolUtil.skip(iprot, field.type);
18737
              }
18738
              break;
553 chandransh 18739
            case STATUS:
18740
              if (field.type == TType.I32) {
18741
                this.status = CartStatus.findByValue(iprot.readI32());
18742
              } else { 
18743
                TProtocolUtil.skip(iprot, field.type);
18744
              }
18745
              break;
48 ashish 18746
          }
18747
          iprot.readFieldEnd();
18748
        }
18749
      }
18750
      iprot.readStructEnd();
18751
      validate();
18752
    }
18753
 
18754
    public void write(TProtocol oprot) throws TException {
18755
      validate();
18756
 
18757
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 18758
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
18759
      oprot.writeI64(this.from_time);
48 ashish 18760
      oprot.writeFieldEnd();
553 chandransh 18761
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
18762
      oprot.writeI64(this.to_time);
123 ashish 18763
      oprot.writeFieldEnd();
553 chandransh 18764
      if (this.status != null) {
18765
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
18766
        oprot.writeI32(this.status.getValue());
18767
        oprot.writeFieldEnd();
18768
      }
48 ashish 18769
      oprot.writeFieldStop();
18770
      oprot.writeStructEnd();
18771
    }
18772
 
18773
    @Override
18774
    public String toString() {
553 chandransh 18775
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 18776
      boolean first = true;
18777
 
553 chandransh 18778
      sb.append("from_time:");
18779
      sb.append(this.from_time);
48 ashish 18780
      first = false;
123 ashish 18781
      if (!first) sb.append(", ");
553 chandransh 18782
      sb.append("to_time:");
18783
      sb.append(this.to_time);
123 ashish 18784
      first = false;
553 chandransh 18785
      if (!first) sb.append(", ");
18786
      sb.append("status:");
18787
      if (this.status == null) {
18788
        sb.append("null");
18789
      } else {
18790
        String status_name = status.name();
18791
        if (status_name != null) {
18792
          sb.append(status_name);
18793
          sb.append(" (");
18794
        }
18795
        sb.append(this.status);
18796
        if (status_name != null) {
18797
          sb.append(")");
18798
        }
18799
      }
18800
      first = false;
48 ashish 18801
      sb.append(")");
18802
      return sb.toString();
18803
    }
18804
 
18805
    public void validate() throws TException {
18806
      // check for required fields
18807
    }
18808
 
18809
  }
18810
 
553 chandransh 18811
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
18812
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 18813
 
553 chandransh 18814
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18815
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 18816
 
553 chandransh 18817
    private List<Cart> success;
18818
    private ShoppingCartException scx;
48 ashish 18819
 
18820
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18821
    public enum _Fields implements TFieldIdEnum {
18822
      SUCCESS((short)0, "success"),
553 chandransh 18823
      SCX((short)1, "scx");
48 ashish 18824
 
18825
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18826
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18827
 
18828
      static {
18829
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18830
          byId.put((int)field._thriftId, field);
18831
          byName.put(field.getFieldName(), field);
18832
        }
18833
      }
18834
 
18835
      /**
18836
       * Find the _Fields constant that matches fieldId, or null if its not found.
18837
       */
18838
      public static _Fields findByThriftId(int fieldId) {
18839
        return byId.get(fieldId);
18840
      }
18841
 
18842
      /**
18843
       * Find the _Fields constant that matches fieldId, throwing an exception
18844
       * if it is not found.
18845
       */
18846
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18847
        _Fields fields = findByThriftId(fieldId);
18848
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18849
        return fields;
18850
      }
18851
 
18852
      /**
18853
       * Find the _Fields constant that matches name, or null if its not found.
18854
       */
18855
      public static _Fields findByName(String name) {
18856
        return byName.get(name);
18857
      }
18858
 
18859
      private final short _thriftId;
18860
      private final String _fieldName;
18861
 
18862
      _Fields(short thriftId, String fieldName) {
18863
        _thriftId = thriftId;
18864
        _fieldName = fieldName;
18865
      }
18866
 
18867
      public short getThriftFieldId() {
18868
        return _thriftId;
18869
      }
18870
 
18871
      public String getFieldName() {
18872
        return _fieldName;
18873
      }
18874
    }
18875
 
18876
    // isset id assignments
18877
 
18878
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18879
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 18880
          new ListMetaData(TType.LIST, 
18881
              new StructMetaData(TType.STRUCT, Cart.class))));
18882
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 18883
          new FieldValueMetaData(TType.STRUCT)));
18884
    }});
18885
 
18886
    static {
553 chandransh 18887
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 18888
    }
18889
 
553 chandransh 18890
    public getCartsByTime_result() {
48 ashish 18891
    }
18892
 
553 chandransh 18893
    public getCartsByTime_result(
18894
      List<Cart> success,
18895
      ShoppingCartException scx)
48 ashish 18896
    {
18897
      this();
18898
      this.success = success;
553 chandransh 18899
      this.scx = scx;
48 ashish 18900
    }
18901
 
18902
    /**
18903
     * Performs a deep copy on <i>other</i>.
18904
     */
553 chandransh 18905
    public getCartsByTime_result(getCartsByTime_result other) {
18906
      if (other.isSetSuccess()) {
18907
        List<Cart> __this__success = new ArrayList<Cart>();
18908
        for (Cart other_element : other.success) {
18909
          __this__success.add(new Cart(other_element));
18910
        }
18911
        this.success = __this__success;
48 ashish 18912
      }
553 chandransh 18913
      if (other.isSetScx()) {
18914
        this.scx = new ShoppingCartException(other.scx);
18915
      }
48 ashish 18916
    }
18917
 
553 chandransh 18918
    public getCartsByTime_result deepCopy() {
18919
      return new getCartsByTime_result(this);
48 ashish 18920
    }
18921
 
18922
    @Deprecated
553 chandransh 18923
    public getCartsByTime_result clone() {
18924
      return new getCartsByTime_result(this);
48 ashish 18925
    }
18926
 
553 chandransh 18927
    public int getSuccessSize() {
18928
      return (this.success == null) ? 0 : this.success.size();
18929
    }
18930
 
18931
    public java.util.Iterator<Cart> getSuccessIterator() {
18932
      return (this.success == null) ? null : this.success.iterator();
18933
    }
18934
 
18935
    public void addToSuccess(Cart elem) {
18936
      if (this.success == null) {
18937
        this.success = new ArrayList<Cart>();
18938
      }
18939
      this.success.add(elem);
18940
    }
18941
 
18942
    public List<Cart> getSuccess() {
48 ashish 18943
      return this.success;
18944
    }
18945
 
553 chandransh 18946
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 18947
      this.success = success;
18948
      return this;
18949
    }
18950
 
18951
    public void unsetSuccess() {
553 chandransh 18952
      this.success = null;
48 ashish 18953
    }
18954
 
18955
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18956
    public boolean isSetSuccess() {
553 chandransh 18957
      return this.success != null;
48 ashish 18958
    }
18959
 
18960
    public void setSuccessIsSet(boolean value) {
553 chandransh 18961
      if (!value) {
18962
        this.success = null;
18963
      }
48 ashish 18964
    }
18965
 
553 chandransh 18966
    public ShoppingCartException getScx() {
18967
      return this.scx;
48 ashish 18968
    }
18969
 
553 chandransh 18970
    public getCartsByTime_result setScx(ShoppingCartException scx) {
18971
      this.scx = scx;
48 ashish 18972
      return this;
18973
    }
18974
 
553 chandransh 18975
    public void unsetScx() {
18976
      this.scx = null;
48 ashish 18977
    }
18978
 
553 chandransh 18979
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18980
    public boolean isSetScx() {
18981
      return this.scx != null;
48 ashish 18982
    }
18983
 
553 chandransh 18984
    public void setScxIsSet(boolean value) {
48 ashish 18985
      if (!value) {
553 chandransh 18986
        this.scx = null;
48 ashish 18987
      }
18988
    }
18989
 
18990
    public void setFieldValue(_Fields field, Object value) {
18991
      switch (field) {
18992
      case SUCCESS:
18993
        if (value == null) {
18994
          unsetSuccess();
18995
        } else {
553 chandransh 18996
          setSuccess((List<Cart>)value);
48 ashish 18997
        }
18998
        break;
18999
 
553 chandransh 19000
      case SCX:
48 ashish 19001
        if (value == null) {
553 chandransh 19002
          unsetScx();
48 ashish 19003
        } else {
553 chandransh 19004
          setScx((ShoppingCartException)value);
48 ashish 19005
        }
19006
        break;
19007
 
19008
      }
19009
    }
19010
 
19011
    public void setFieldValue(int fieldID, Object value) {
19012
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19013
    }
19014
 
19015
    public Object getFieldValue(_Fields field) {
19016
      switch (field) {
19017
      case SUCCESS:
553 chandransh 19018
        return getSuccess();
48 ashish 19019
 
553 chandransh 19020
      case SCX:
19021
        return getScx();
48 ashish 19022
 
19023
      }
19024
      throw new IllegalStateException();
19025
    }
19026
 
19027
    public Object getFieldValue(int fieldId) {
19028
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19029
    }
19030
 
19031
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19032
    public boolean isSet(_Fields field) {
19033
      switch (field) {
19034
      case SUCCESS:
19035
        return isSetSuccess();
553 chandransh 19036
      case SCX:
19037
        return isSetScx();
48 ashish 19038
      }
19039
      throw new IllegalStateException();
19040
    }
19041
 
19042
    public boolean isSet(int fieldID) {
19043
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19044
    }
19045
 
19046
    @Override
19047
    public boolean equals(Object that) {
19048
      if (that == null)
19049
        return false;
553 chandransh 19050
      if (that instanceof getCartsByTime_result)
19051
        return this.equals((getCartsByTime_result)that);
48 ashish 19052
      return false;
19053
    }
19054
 
553 chandransh 19055
    public boolean equals(getCartsByTime_result that) {
48 ashish 19056
      if (that == null)
19057
        return false;
19058
 
553 chandransh 19059
      boolean this_present_success = true && this.isSetSuccess();
19060
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 19061
      if (this_present_success || that_present_success) {
19062
        if (!(this_present_success && that_present_success))
19063
          return false;
553 chandransh 19064
        if (!this.success.equals(that.success))
48 ashish 19065
          return false;
19066
      }
19067
 
553 chandransh 19068
      boolean this_present_scx = true && this.isSetScx();
19069
      boolean that_present_scx = true && that.isSetScx();
19070
      if (this_present_scx || that_present_scx) {
19071
        if (!(this_present_scx && that_present_scx))
48 ashish 19072
          return false;
553 chandransh 19073
        if (!this.scx.equals(that.scx))
48 ashish 19074
          return false;
19075
      }
19076
 
19077
      return true;
19078
    }
19079
 
19080
    @Override
19081
    public int hashCode() {
19082
      return 0;
19083
    }
19084
 
553 chandransh 19085
    public int compareTo(getCartsByTime_result other) {
48 ashish 19086
      if (!getClass().equals(other.getClass())) {
19087
        return getClass().getName().compareTo(other.getClass().getName());
19088
      }
19089
 
19090
      int lastComparison = 0;
553 chandransh 19091
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 19092
 
19093
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19094
      if (lastComparison != 0) {
19095
        return lastComparison;
19096
      }
19097
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19098
      if (lastComparison != 0) {
19099
        return lastComparison;
19100
      }
553 chandransh 19101
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19102
      if (lastComparison != 0) {
19103
        return lastComparison;
19104
      }
553 chandransh 19105
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19106
      if (lastComparison != 0) {
19107
        return lastComparison;
19108
      }
19109
      return 0;
19110
    }
19111
 
19112
    public void read(TProtocol iprot) throws TException {
19113
      TField field;
19114
      iprot.readStructBegin();
19115
      while (true)
19116
      {
19117
        field = iprot.readFieldBegin();
19118
        if (field.type == TType.STOP) { 
19119
          break;
19120
        }
19121
        _Fields fieldId = _Fields.findByThriftId(field.id);
19122
        if (fieldId == null) {
19123
          TProtocolUtil.skip(iprot, field.type);
19124
        } else {
19125
          switch (fieldId) {
19126
            case SUCCESS:
553 chandransh 19127
              if (field.type == TType.LIST) {
19128
                {
593 rajveer 19129
                  TList _list33 = iprot.readListBegin();
19130
                  this.success = new ArrayList<Cart>(_list33.size);
19131
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34)
553 chandransh 19132
                  {
593 rajveer 19133
                    Cart _elem35;
19134
                    _elem35 = new Cart();
19135
                    _elem35.read(iprot);
19136
                    this.success.add(_elem35);
553 chandransh 19137
                  }
19138
                  iprot.readListEnd();
19139
                }
48 ashish 19140
              } else { 
19141
                TProtocolUtil.skip(iprot, field.type);
19142
              }
19143
              break;
553 chandransh 19144
            case SCX:
48 ashish 19145
              if (field.type == TType.STRUCT) {
553 chandransh 19146
                this.scx = new ShoppingCartException();
19147
                this.scx.read(iprot);
48 ashish 19148
              } else { 
19149
                TProtocolUtil.skip(iprot, field.type);
19150
              }
19151
              break;
19152
          }
19153
          iprot.readFieldEnd();
19154
        }
19155
      }
19156
      iprot.readStructEnd();
19157
      validate();
19158
    }
19159
 
19160
    public void write(TProtocol oprot) throws TException {
19161
      oprot.writeStructBegin(STRUCT_DESC);
19162
 
19163
      if (this.isSetSuccess()) {
19164
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19165
        {
19166
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
593 rajveer 19167
          for (Cart _iter36 : this.success)
553 chandransh 19168
          {
593 rajveer 19169
            _iter36.write(oprot);
553 chandransh 19170
          }
19171
          oprot.writeListEnd();
19172
        }
48 ashish 19173
        oprot.writeFieldEnd();
553 chandransh 19174
      } else if (this.isSetScx()) {
19175
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19176
        this.scx.write(oprot);
48 ashish 19177
        oprot.writeFieldEnd();
19178
      }
19179
      oprot.writeFieldStop();
19180
      oprot.writeStructEnd();
19181
    }
19182
 
19183
    @Override
19184
    public String toString() {
553 chandransh 19185
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 19186
      boolean first = true;
19187
 
19188
      sb.append("success:");
553 chandransh 19189
      if (this.success == null) {
19190
        sb.append("null");
19191
      } else {
19192
        sb.append(this.success);
19193
      }
48 ashish 19194
      first = false;
19195
      if (!first) sb.append(", ");
553 chandransh 19196
      sb.append("scx:");
19197
      if (this.scx == null) {
48 ashish 19198
        sb.append("null");
19199
      } else {
553 chandransh 19200
        sb.append(this.scx);
48 ashish 19201
      }
19202
      first = false;
19203
      sb.append(")");
19204
      return sb.toString();
19205
    }
19206
 
19207
    public void validate() throws TException {
19208
      // check for required fields
19209
    }
19210
 
19211
  }
19212
 
553 chandransh 19213
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
19214
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 19215
 
553 chandransh 19216
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19217
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 19218
 
553 chandransh 19219
    private long cartId;
19220
    private CartStatus status;
48 ashish 19221
 
19222
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19223
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19224
      CART_ID((short)1, "cartId"),
19225
      /**
19226
       * 
19227
       * @see CartStatus
19228
       */
19229
      STATUS((short)2, "status");
48 ashish 19230
 
19231
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19233
 
19234
      static {
19235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19236
          byId.put((int)field._thriftId, field);
19237
          byName.put(field.getFieldName(), field);
19238
        }
19239
      }
19240
 
19241
      /**
19242
       * Find the _Fields constant that matches fieldId, or null if its not found.
19243
       */
19244
      public static _Fields findByThriftId(int fieldId) {
19245
        return byId.get(fieldId);
19246
      }
19247
 
19248
      /**
19249
       * Find the _Fields constant that matches fieldId, throwing an exception
19250
       * if it is not found.
19251
       */
19252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19253
        _Fields fields = findByThriftId(fieldId);
19254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19255
        return fields;
19256
      }
19257
 
19258
      /**
19259
       * Find the _Fields constant that matches name, or null if its not found.
19260
       */
19261
      public static _Fields findByName(String name) {
19262
        return byName.get(name);
19263
      }
19264
 
19265
      private final short _thriftId;
19266
      private final String _fieldName;
19267
 
19268
      _Fields(short thriftId, String fieldName) {
19269
        _thriftId = thriftId;
19270
        _fieldName = fieldName;
19271
      }
19272
 
19273
      public short getThriftFieldId() {
19274
        return _thriftId;
19275
      }
19276
 
19277
      public String getFieldName() {
19278
        return _fieldName;
19279
      }
19280
    }
19281
 
19282
    // isset id assignments
553 chandransh 19283
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 19284
    private BitSet __isset_bit_vector = new BitSet(1);
19285
 
19286
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19287
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 19288
          new FieldValueMetaData(TType.I64)));
553 chandransh 19289
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19290
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19291
    }});
19292
 
19293
    static {
553 chandransh 19294
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 19295
    }
19296
 
553 chandransh 19297
    public changeCartStatus_args() {
48 ashish 19298
    }
19299
 
553 chandransh 19300
    public changeCartStatus_args(
19301
      long cartId,
19302
      CartStatus status)
48 ashish 19303
    {
19304
      this();
553 chandransh 19305
      this.cartId = cartId;
19306
      setCartIdIsSet(true);
19307
      this.status = status;
48 ashish 19308
    }
19309
 
19310
    /**
19311
     * Performs a deep copy on <i>other</i>.
19312
     */
553 chandransh 19313
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 19314
      __isset_bit_vector.clear();
19315
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19316
      this.cartId = other.cartId;
19317
      if (other.isSetStatus()) {
19318
        this.status = other.status;
19319
      }
48 ashish 19320
    }
19321
 
553 chandransh 19322
    public changeCartStatus_args deepCopy() {
19323
      return new changeCartStatus_args(this);
48 ashish 19324
    }
19325
 
19326
    @Deprecated
553 chandransh 19327
    public changeCartStatus_args clone() {
19328
      return new changeCartStatus_args(this);
48 ashish 19329
    }
19330
 
553 chandransh 19331
    public long getCartId() {
19332
      return this.cartId;
48 ashish 19333
    }
19334
 
553 chandransh 19335
    public changeCartStatus_args setCartId(long cartId) {
19336
      this.cartId = cartId;
19337
      setCartIdIsSet(true);
48 ashish 19338
      return this;
19339
    }
19340
 
553 chandransh 19341
    public void unsetCartId() {
19342
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19343
    }
19344
 
553 chandransh 19345
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19346
    public boolean isSetCartId() {
19347
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19348
    }
19349
 
553 chandransh 19350
    public void setCartIdIsSet(boolean value) {
19351
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19352
    }
19353
 
553 chandransh 19354
    /**
19355
     * 
19356
     * @see CartStatus
19357
     */
19358
    public CartStatus getStatus() {
19359
      return this.status;
19360
    }
19361
 
19362
    /**
19363
     * 
19364
     * @see CartStatus
19365
     */
19366
    public changeCartStatus_args setStatus(CartStatus status) {
19367
      this.status = status;
19368
      return this;
19369
    }
19370
 
19371
    public void unsetStatus() {
19372
      this.status = null;
19373
    }
19374
 
19375
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19376
    public boolean isSetStatus() {
19377
      return this.status != null;
19378
    }
19379
 
19380
    public void setStatusIsSet(boolean value) {
19381
      if (!value) {
19382
        this.status = null;
19383
      }
19384
    }
19385
 
48 ashish 19386
    public void setFieldValue(_Fields field, Object value) {
19387
      switch (field) {
553 chandransh 19388
      case CART_ID:
48 ashish 19389
        if (value == null) {
553 chandransh 19390
          unsetCartId();
48 ashish 19391
        } else {
553 chandransh 19392
          setCartId((Long)value);
48 ashish 19393
        }
19394
        break;
19395
 
553 chandransh 19396
      case STATUS:
19397
        if (value == null) {
19398
          unsetStatus();
19399
        } else {
19400
          setStatus((CartStatus)value);
19401
        }
19402
        break;
19403
 
48 ashish 19404
      }
19405
    }
19406
 
19407
    public void setFieldValue(int fieldID, Object value) {
19408
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19409
    }
19410
 
19411
    public Object getFieldValue(_Fields field) {
19412
      switch (field) {
553 chandransh 19413
      case CART_ID:
19414
        return new Long(getCartId());
48 ashish 19415
 
553 chandransh 19416
      case STATUS:
19417
        return getStatus();
19418
 
48 ashish 19419
      }
19420
      throw new IllegalStateException();
19421
    }
19422
 
19423
    public Object getFieldValue(int fieldId) {
19424
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19425
    }
19426
 
19427
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19428
    public boolean isSet(_Fields field) {
19429
      switch (field) {
553 chandransh 19430
      case CART_ID:
19431
        return isSetCartId();
19432
      case STATUS:
19433
        return isSetStatus();
48 ashish 19434
      }
19435
      throw new IllegalStateException();
19436
    }
19437
 
19438
    public boolean isSet(int fieldID) {
19439
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19440
    }
19441
 
19442
    @Override
19443
    public boolean equals(Object that) {
19444
      if (that == null)
19445
        return false;
553 chandransh 19446
      if (that instanceof changeCartStatus_args)
19447
        return this.equals((changeCartStatus_args)that);
48 ashish 19448
      return false;
19449
    }
19450
 
553 chandransh 19451
    public boolean equals(changeCartStatus_args that) {
48 ashish 19452
      if (that == null)
19453
        return false;
19454
 
553 chandransh 19455
      boolean this_present_cartId = true;
19456
      boolean that_present_cartId = true;
19457
      if (this_present_cartId || that_present_cartId) {
19458
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19459
          return false;
553 chandransh 19460
        if (this.cartId != that.cartId)
48 ashish 19461
          return false;
19462
      }
19463
 
553 chandransh 19464
      boolean this_present_status = true && this.isSetStatus();
19465
      boolean that_present_status = true && that.isSetStatus();
19466
      if (this_present_status || that_present_status) {
19467
        if (!(this_present_status && that_present_status))
19468
          return false;
19469
        if (!this.status.equals(that.status))
19470
          return false;
19471
      }
19472
 
48 ashish 19473
      return true;
19474
    }
19475
 
19476
    @Override
19477
    public int hashCode() {
19478
      return 0;
19479
    }
19480
 
553 chandransh 19481
    public int compareTo(changeCartStatus_args other) {
48 ashish 19482
      if (!getClass().equals(other.getClass())) {
19483
        return getClass().getName().compareTo(other.getClass().getName());
19484
      }
19485
 
19486
      int lastComparison = 0;
553 chandransh 19487
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 19488
 
553 chandransh 19489
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19490
      if (lastComparison != 0) {
19491
        return lastComparison;
19492
      }
553 chandransh 19493
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19494
      if (lastComparison != 0) {
19495
        return lastComparison;
19496
      }
553 chandransh 19497
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19498
      if (lastComparison != 0) {
19499
        return lastComparison;
19500
      }
19501
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19502
      if (lastComparison != 0) {
19503
        return lastComparison;
19504
      }
48 ashish 19505
      return 0;
19506
    }
19507
 
19508
    public void read(TProtocol iprot) throws TException {
19509
      TField field;
19510
      iprot.readStructBegin();
19511
      while (true)
19512
      {
19513
        field = iprot.readFieldBegin();
19514
        if (field.type == TType.STOP) { 
19515
          break;
19516
        }
19517
        _Fields fieldId = _Fields.findByThriftId(field.id);
19518
        if (fieldId == null) {
19519
          TProtocolUtil.skip(iprot, field.type);
19520
        } else {
19521
          switch (fieldId) {
553 chandransh 19522
            case CART_ID:
48 ashish 19523
              if (field.type == TType.I64) {
553 chandransh 19524
                this.cartId = iprot.readI64();
19525
                setCartIdIsSet(true);
48 ashish 19526
              } else { 
19527
                TProtocolUtil.skip(iprot, field.type);
19528
              }
19529
              break;
553 chandransh 19530
            case STATUS:
19531
              if (field.type == TType.I32) {
19532
                this.status = CartStatus.findByValue(iprot.readI32());
19533
              } else { 
19534
                TProtocolUtil.skip(iprot, field.type);
19535
              }
19536
              break;
48 ashish 19537
          }
19538
          iprot.readFieldEnd();
19539
        }
19540
      }
19541
      iprot.readStructEnd();
19542
      validate();
19543
    }
19544
 
19545
    public void write(TProtocol oprot) throws TException {
19546
      validate();
19547
 
19548
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19549
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19550
      oprot.writeI64(this.cartId);
48 ashish 19551
      oprot.writeFieldEnd();
553 chandransh 19552
      if (this.status != null) {
19553
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19554
        oprot.writeI32(this.status.getValue());
19555
        oprot.writeFieldEnd();
19556
      }
48 ashish 19557
      oprot.writeFieldStop();
19558
      oprot.writeStructEnd();
19559
    }
19560
 
19561
    @Override
19562
    public String toString() {
553 chandransh 19563
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 19564
      boolean first = true;
19565
 
553 chandransh 19566
      sb.append("cartId:");
19567
      sb.append(this.cartId);
48 ashish 19568
      first = false;
553 chandransh 19569
      if (!first) sb.append(", ");
19570
      sb.append("status:");
19571
      if (this.status == null) {
19572
        sb.append("null");
19573
      } else {
19574
        String status_name = status.name();
19575
        if (status_name != null) {
19576
          sb.append(status_name);
19577
          sb.append(" (");
19578
        }
19579
        sb.append(this.status);
19580
        if (status_name != null) {
19581
          sb.append(")");
19582
        }
19583
      }
19584
      first = false;
48 ashish 19585
      sb.append(")");
19586
      return sb.toString();
19587
    }
19588
 
19589
    public void validate() throws TException {
19590
      // check for required fields
19591
    }
19592
 
19593
  }
19594
 
553 chandransh 19595
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
19596
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 19597
 
553 chandransh 19598
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19599
 
553 chandransh 19600
    private ShoppingCartException scx;
48 ashish 19601
 
19602
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19603
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19604
      SCX((short)1, "scx");
48 ashish 19605
 
19606
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19607
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19608
 
19609
      static {
19610
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19611
          byId.put((int)field._thriftId, field);
19612
          byName.put(field.getFieldName(), field);
19613
        }
19614
      }
19615
 
19616
      /**
19617
       * Find the _Fields constant that matches fieldId, or null if its not found.
19618
       */
19619
      public static _Fields findByThriftId(int fieldId) {
19620
        return byId.get(fieldId);
19621
      }
19622
 
19623
      /**
19624
       * Find the _Fields constant that matches fieldId, throwing an exception
19625
       * if it is not found.
19626
       */
19627
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19628
        _Fields fields = findByThriftId(fieldId);
19629
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19630
        return fields;
19631
      }
19632
 
19633
      /**
19634
       * Find the _Fields constant that matches name, or null if its not found.
19635
       */
19636
      public static _Fields findByName(String name) {
19637
        return byName.get(name);
19638
      }
19639
 
19640
      private final short _thriftId;
19641
      private final String _fieldName;
19642
 
19643
      _Fields(short thriftId, String fieldName) {
19644
        _thriftId = thriftId;
19645
        _fieldName = fieldName;
19646
      }
19647
 
19648
      public short getThriftFieldId() {
19649
        return _thriftId;
19650
      }
19651
 
19652
      public String getFieldName() {
19653
        return _fieldName;
19654
      }
19655
    }
19656
 
19657
    // isset id assignments
19658
 
19659
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19660
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19661
          new FieldValueMetaData(TType.STRUCT)));
19662
    }});
19663
 
19664
    static {
553 chandransh 19665
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 19666
    }
19667
 
553 chandransh 19668
    public changeCartStatus_result() {
48 ashish 19669
    }
19670
 
553 chandransh 19671
    public changeCartStatus_result(
19672
      ShoppingCartException scx)
48 ashish 19673
    {
19674
      this();
553 chandransh 19675
      this.scx = scx;
48 ashish 19676
    }
19677
 
19678
    /**
19679
     * Performs a deep copy on <i>other</i>.
19680
     */
553 chandransh 19681
    public changeCartStatus_result(changeCartStatus_result other) {
19682
      if (other.isSetScx()) {
19683
        this.scx = new ShoppingCartException(other.scx);
19684
      }
19685
    }
19686
 
19687
    public changeCartStatus_result deepCopy() {
19688
      return new changeCartStatus_result(this);
19689
    }
19690
 
19691
    @Deprecated
19692
    public changeCartStatus_result clone() {
19693
      return new changeCartStatus_result(this);
19694
    }
19695
 
19696
    public ShoppingCartException getScx() {
19697
      return this.scx;
19698
    }
19699
 
19700
    public changeCartStatus_result setScx(ShoppingCartException scx) {
19701
      this.scx = scx;
19702
      return this;
19703
    }
19704
 
19705
    public void unsetScx() {
19706
      this.scx = null;
19707
    }
19708
 
19709
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19710
    public boolean isSetScx() {
19711
      return this.scx != null;
19712
    }
19713
 
19714
    public void setScxIsSet(boolean value) {
19715
      if (!value) {
19716
        this.scx = null;
19717
      }
19718
    }
19719
 
19720
    public void setFieldValue(_Fields field, Object value) {
19721
      switch (field) {
19722
      case SCX:
19723
        if (value == null) {
19724
          unsetScx();
19725
        } else {
19726
          setScx((ShoppingCartException)value);
19727
        }
19728
        break;
19729
 
19730
      }
19731
    }
19732
 
19733
    public void setFieldValue(int fieldID, Object value) {
19734
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19735
    }
19736
 
19737
    public Object getFieldValue(_Fields field) {
19738
      switch (field) {
19739
      case SCX:
19740
        return getScx();
19741
 
19742
      }
19743
      throw new IllegalStateException();
19744
    }
19745
 
19746
    public Object getFieldValue(int fieldId) {
19747
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19748
    }
19749
 
19750
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19751
    public boolean isSet(_Fields field) {
19752
      switch (field) {
19753
      case SCX:
19754
        return isSetScx();
19755
      }
19756
      throw new IllegalStateException();
19757
    }
19758
 
19759
    public boolean isSet(int fieldID) {
19760
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19761
    }
19762
 
19763
    @Override
19764
    public boolean equals(Object that) {
19765
      if (that == null)
19766
        return false;
19767
      if (that instanceof changeCartStatus_result)
19768
        return this.equals((changeCartStatus_result)that);
19769
      return false;
19770
    }
19771
 
19772
    public boolean equals(changeCartStatus_result that) {
19773
      if (that == null)
19774
        return false;
19775
 
19776
      boolean this_present_scx = true && this.isSetScx();
19777
      boolean that_present_scx = true && that.isSetScx();
19778
      if (this_present_scx || that_present_scx) {
19779
        if (!(this_present_scx && that_present_scx))
19780
          return false;
19781
        if (!this.scx.equals(that.scx))
19782
          return false;
19783
      }
19784
 
19785
      return true;
19786
    }
19787
 
19788
    @Override
19789
    public int hashCode() {
19790
      return 0;
19791
    }
19792
 
19793
    public int compareTo(changeCartStatus_result other) {
19794
      if (!getClass().equals(other.getClass())) {
19795
        return getClass().getName().compareTo(other.getClass().getName());
19796
      }
19797
 
19798
      int lastComparison = 0;
19799
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
19800
 
19801
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
19802
      if (lastComparison != 0) {
19803
        return lastComparison;
19804
      }
19805
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
19806
      if (lastComparison != 0) {
19807
        return lastComparison;
19808
      }
19809
      return 0;
19810
    }
19811
 
19812
    public void read(TProtocol iprot) throws TException {
19813
      TField field;
19814
      iprot.readStructBegin();
19815
      while (true)
19816
      {
19817
        field = iprot.readFieldBegin();
19818
        if (field.type == TType.STOP) { 
19819
          break;
19820
        }
19821
        _Fields fieldId = _Fields.findByThriftId(field.id);
19822
        if (fieldId == null) {
19823
          TProtocolUtil.skip(iprot, field.type);
19824
        } else {
19825
          switch (fieldId) {
19826
            case SCX:
19827
              if (field.type == TType.STRUCT) {
19828
                this.scx = new ShoppingCartException();
19829
                this.scx.read(iprot);
19830
              } else { 
19831
                TProtocolUtil.skip(iprot, field.type);
19832
              }
19833
              break;
19834
          }
19835
          iprot.readFieldEnd();
19836
        }
19837
      }
19838
      iprot.readStructEnd();
19839
      validate();
19840
    }
19841
 
19842
    public void write(TProtocol oprot) throws TException {
19843
      oprot.writeStructBegin(STRUCT_DESC);
19844
 
19845
      if (this.isSetScx()) {
19846
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19847
        this.scx.write(oprot);
19848
        oprot.writeFieldEnd();
19849
      }
19850
      oprot.writeFieldStop();
19851
      oprot.writeStructEnd();
19852
    }
19853
 
19854
    @Override
19855
    public String toString() {
19856
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
19857
      boolean first = true;
19858
 
19859
      sb.append("scx:");
19860
      if (this.scx == null) {
19861
        sb.append("null");
19862
      } else {
19863
        sb.append(this.scx);
19864
      }
19865
      first = false;
19866
      sb.append(")");
19867
      return sb.toString();
19868
    }
19869
 
19870
    public void validate() throws TException {
19871
      // check for required fields
19872
    }
19873
 
19874
  }
19875
 
19876
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
19877
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
19878
 
19879
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19880
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
19881
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
19882
 
19883
    private long cartId;
19884
    private long itemId;
19885
    private long quantity;
19886
 
19887
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19888
    public enum _Fields implements TFieldIdEnum {
19889
      CART_ID((short)1, "cartId"),
19890
      ITEM_ID((short)2, "itemId"),
19891
      QUANTITY((short)3, "quantity");
19892
 
19893
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19894
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19895
 
19896
      static {
19897
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19898
          byId.put((int)field._thriftId, field);
19899
          byName.put(field.getFieldName(), field);
19900
        }
19901
      }
19902
 
19903
      /**
19904
       * Find the _Fields constant that matches fieldId, or null if its not found.
19905
       */
19906
      public static _Fields findByThriftId(int fieldId) {
19907
        return byId.get(fieldId);
19908
      }
19909
 
19910
      /**
19911
       * Find the _Fields constant that matches fieldId, throwing an exception
19912
       * if it is not found.
19913
       */
19914
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19915
        _Fields fields = findByThriftId(fieldId);
19916
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19917
        return fields;
19918
      }
19919
 
19920
      /**
19921
       * Find the _Fields constant that matches name, or null if its not found.
19922
       */
19923
      public static _Fields findByName(String name) {
19924
        return byName.get(name);
19925
      }
19926
 
19927
      private final short _thriftId;
19928
      private final String _fieldName;
19929
 
19930
      _Fields(short thriftId, String fieldName) {
19931
        _thriftId = thriftId;
19932
        _fieldName = fieldName;
19933
      }
19934
 
19935
      public short getThriftFieldId() {
19936
        return _thriftId;
19937
      }
19938
 
19939
      public String getFieldName() {
19940
        return _fieldName;
19941
      }
19942
    }
19943
 
19944
    // isset id assignments
19945
    private static final int __CARTID_ISSET_ID = 0;
19946
    private static final int __ITEMID_ISSET_ID = 1;
19947
    private static final int __QUANTITY_ISSET_ID = 2;
19948
    private BitSet __isset_bit_vector = new BitSet(3);
19949
 
19950
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19951
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
19952
          new FieldValueMetaData(TType.I64)));
19953
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
19954
          new FieldValueMetaData(TType.I64)));
19955
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
19956
          new FieldValueMetaData(TType.I64)));
19957
    }});
19958
 
19959
    static {
19960
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
19961
    }
19962
 
19963
    public addItemToCart_args() {
19964
    }
19965
 
19966
    public addItemToCart_args(
19967
      long cartId,
19968
      long itemId,
19969
      long quantity)
19970
    {
19971
      this();
19972
      this.cartId = cartId;
19973
      setCartIdIsSet(true);
19974
      this.itemId = itemId;
19975
      setItemIdIsSet(true);
19976
      this.quantity = quantity;
19977
      setQuantityIsSet(true);
19978
    }
19979
 
19980
    /**
19981
     * Performs a deep copy on <i>other</i>.
19982
     */
19983
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 19984
      __isset_bit_vector.clear();
19985
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19986
      this.cartId = other.cartId;
19987
      this.itemId = other.itemId;
19988
      this.quantity = other.quantity;
48 ashish 19989
    }
19990
 
553 chandransh 19991
    public addItemToCart_args deepCopy() {
19992
      return new addItemToCart_args(this);
48 ashish 19993
    }
19994
 
19995
    @Deprecated
553 chandransh 19996
    public addItemToCart_args clone() {
19997
      return new addItemToCart_args(this);
48 ashish 19998
    }
19999
 
553 chandransh 20000
    public long getCartId() {
20001
      return this.cartId;
48 ashish 20002
    }
20003
 
553 chandransh 20004
    public addItemToCart_args setCartId(long cartId) {
20005
      this.cartId = cartId;
20006
      setCartIdIsSet(true);
48 ashish 20007
      return this;
20008
    }
20009
 
553 chandransh 20010
    public void unsetCartId() {
20011
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20012
    }
20013
 
553 chandransh 20014
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20015
    public boolean isSetCartId() {
20016
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20017
    }
20018
 
553 chandransh 20019
    public void setCartIdIsSet(boolean value) {
20020
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20021
    }
20022
 
553 chandransh 20023
    public long getItemId() {
20024
      return this.itemId;
48 ashish 20025
    }
20026
 
553 chandransh 20027
    public addItemToCart_args setItemId(long itemId) {
20028
      this.itemId = itemId;
20029
      setItemIdIsSet(true);
48 ashish 20030
      return this;
20031
    }
20032
 
553 chandransh 20033
    public void unsetItemId() {
20034
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 20035
    }
20036
 
553 chandransh 20037
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20038
    public boolean isSetItemId() {
20039
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 20040
    }
20041
 
553 chandransh 20042
    public void setItemIdIsSet(boolean value) {
20043
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20044
    }
20045
 
20046
    public long getQuantity() {
20047
      return this.quantity;
20048
    }
20049
 
20050
    public addItemToCart_args setQuantity(long quantity) {
20051
      this.quantity = quantity;
20052
      setQuantityIsSet(true);
20053
      return this;
20054
    }
20055
 
20056
    public void unsetQuantity() {
20057
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
20058
    }
20059
 
20060
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
20061
    public boolean isSetQuantity() {
20062
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
20063
    }
20064
 
20065
    public void setQuantityIsSet(boolean value) {
20066
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
20067
    }
20068
 
20069
    public void setFieldValue(_Fields field, Object value) {
20070
      switch (field) {
20071
      case CART_ID:
20072
        if (value == null) {
20073
          unsetCartId();
20074
        } else {
20075
          setCartId((Long)value);
20076
        }
20077
        break;
20078
 
20079
      case ITEM_ID:
20080
        if (value == null) {
20081
          unsetItemId();
20082
        } else {
20083
          setItemId((Long)value);
20084
        }
20085
        break;
20086
 
20087
      case QUANTITY:
20088
        if (value == null) {
20089
          unsetQuantity();
20090
        } else {
20091
          setQuantity((Long)value);
20092
        }
20093
        break;
20094
 
20095
      }
20096
    }
20097
 
20098
    public void setFieldValue(int fieldID, Object value) {
20099
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20100
    }
20101
 
20102
    public Object getFieldValue(_Fields field) {
20103
      switch (field) {
20104
      case CART_ID:
20105
        return new Long(getCartId());
20106
 
20107
      case ITEM_ID:
20108
        return new Long(getItemId());
20109
 
20110
      case QUANTITY:
20111
        return new Long(getQuantity());
20112
 
20113
      }
20114
      throw new IllegalStateException();
20115
    }
20116
 
20117
    public Object getFieldValue(int fieldId) {
20118
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20119
    }
20120
 
20121
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20122
    public boolean isSet(_Fields field) {
20123
      switch (field) {
20124
      case CART_ID:
20125
        return isSetCartId();
20126
      case ITEM_ID:
20127
        return isSetItemId();
20128
      case QUANTITY:
20129
        return isSetQuantity();
20130
      }
20131
      throw new IllegalStateException();
20132
    }
20133
 
20134
    public boolean isSet(int fieldID) {
20135
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20136
    }
20137
 
20138
    @Override
20139
    public boolean equals(Object that) {
20140
      if (that == null)
20141
        return false;
20142
      if (that instanceof addItemToCart_args)
20143
        return this.equals((addItemToCart_args)that);
20144
      return false;
20145
    }
20146
 
20147
    public boolean equals(addItemToCart_args that) {
20148
      if (that == null)
20149
        return false;
20150
 
20151
      boolean this_present_cartId = true;
20152
      boolean that_present_cartId = true;
20153
      if (this_present_cartId || that_present_cartId) {
20154
        if (!(this_present_cartId && that_present_cartId))
20155
          return false;
20156
        if (this.cartId != that.cartId)
20157
          return false;
20158
      }
20159
 
20160
      boolean this_present_itemId = true;
20161
      boolean that_present_itemId = true;
20162
      if (this_present_itemId || that_present_itemId) {
20163
        if (!(this_present_itemId && that_present_itemId))
20164
          return false;
20165
        if (this.itemId != that.itemId)
20166
          return false;
20167
      }
20168
 
20169
      boolean this_present_quantity = true;
20170
      boolean that_present_quantity = true;
20171
      if (this_present_quantity || that_present_quantity) {
20172
        if (!(this_present_quantity && that_present_quantity))
20173
          return false;
20174
        if (this.quantity != that.quantity)
20175
          return false;
20176
      }
20177
 
20178
      return true;
20179
    }
20180
 
20181
    @Override
20182
    public int hashCode() {
20183
      return 0;
20184
    }
20185
 
20186
    public int compareTo(addItemToCart_args other) {
20187
      if (!getClass().equals(other.getClass())) {
20188
        return getClass().getName().compareTo(other.getClass().getName());
20189
      }
20190
 
20191
      int lastComparison = 0;
20192
      addItemToCart_args typedOther = (addItemToCart_args)other;
20193
 
20194
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20195
      if (lastComparison != 0) {
20196
        return lastComparison;
20197
      }
20198
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20199
      if (lastComparison != 0) {
20200
        return lastComparison;
20201
      }
20202
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
20203
      if (lastComparison != 0) {
20204
        return lastComparison;
20205
      }
20206
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
20207
      if (lastComparison != 0) {
20208
        return lastComparison;
20209
      }
20210
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
20211
      if (lastComparison != 0) {
20212
        return lastComparison;
20213
      }
20214
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
20215
      if (lastComparison != 0) {
20216
        return lastComparison;
20217
      }
20218
      return 0;
20219
    }
20220
 
20221
    public void read(TProtocol iprot) throws TException {
20222
      TField field;
20223
      iprot.readStructBegin();
20224
      while (true)
20225
      {
20226
        field = iprot.readFieldBegin();
20227
        if (field.type == TType.STOP) { 
20228
          break;
20229
        }
20230
        _Fields fieldId = _Fields.findByThriftId(field.id);
20231
        if (fieldId == null) {
20232
          TProtocolUtil.skip(iprot, field.type);
20233
        } else {
20234
          switch (fieldId) {
20235
            case CART_ID:
20236
              if (field.type == TType.I64) {
20237
                this.cartId = iprot.readI64();
20238
                setCartIdIsSet(true);
20239
              } else { 
20240
                TProtocolUtil.skip(iprot, field.type);
20241
              }
20242
              break;
20243
            case ITEM_ID:
20244
              if (field.type == TType.I64) {
20245
                this.itemId = iprot.readI64();
20246
                setItemIdIsSet(true);
20247
              } else { 
20248
                TProtocolUtil.skip(iprot, field.type);
20249
              }
20250
              break;
20251
            case QUANTITY:
20252
              if (field.type == TType.I64) {
20253
                this.quantity = iprot.readI64();
20254
                setQuantityIsSet(true);
20255
              } else { 
20256
                TProtocolUtil.skip(iprot, field.type);
20257
              }
20258
              break;
20259
          }
20260
          iprot.readFieldEnd();
20261
        }
20262
      }
20263
      iprot.readStructEnd();
20264
      validate();
20265
    }
20266
 
20267
    public void write(TProtocol oprot) throws TException {
20268
      validate();
20269
 
20270
      oprot.writeStructBegin(STRUCT_DESC);
20271
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20272
      oprot.writeI64(this.cartId);
20273
      oprot.writeFieldEnd();
20274
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20275
      oprot.writeI64(this.itemId);
20276
      oprot.writeFieldEnd();
20277
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
20278
      oprot.writeI64(this.quantity);
20279
      oprot.writeFieldEnd();
20280
      oprot.writeFieldStop();
20281
      oprot.writeStructEnd();
20282
    }
20283
 
20284
    @Override
20285
    public String toString() {
20286
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
20287
      boolean first = true;
20288
 
20289
      sb.append("cartId:");
20290
      sb.append(this.cartId);
20291
      first = false;
20292
      if (!first) sb.append(", ");
20293
      sb.append("itemId:");
20294
      sb.append(this.itemId);
20295
      first = false;
20296
      if (!first) sb.append(", ");
20297
      sb.append("quantity:");
20298
      sb.append(this.quantity);
20299
      first = false;
20300
      sb.append(")");
20301
      return sb.toString();
20302
    }
20303
 
20304
    public void validate() throws TException {
20305
      // check for required fields
20306
    }
20307
 
20308
  }
20309
 
20310
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
20311
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
20312
 
20313
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20314
 
20315
    private ShoppingCartException scx;
20316
 
20317
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20318
    public enum _Fields implements TFieldIdEnum {
20319
      SCX((short)1, "scx");
20320
 
20321
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20323
 
20324
      static {
20325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20326
          byId.put((int)field._thriftId, field);
20327
          byName.put(field.getFieldName(), field);
20328
        }
20329
      }
20330
 
20331
      /**
20332
       * Find the _Fields constant that matches fieldId, or null if its not found.
20333
       */
20334
      public static _Fields findByThriftId(int fieldId) {
20335
        return byId.get(fieldId);
20336
      }
20337
 
20338
      /**
20339
       * Find the _Fields constant that matches fieldId, throwing an exception
20340
       * if it is not found.
20341
       */
20342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20343
        _Fields fields = findByThriftId(fieldId);
20344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20345
        return fields;
20346
      }
20347
 
20348
      /**
20349
       * Find the _Fields constant that matches name, or null if its not found.
20350
       */
20351
      public static _Fields findByName(String name) {
20352
        return byName.get(name);
20353
      }
20354
 
20355
      private final short _thriftId;
20356
      private final String _fieldName;
20357
 
20358
      _Fields(short thriftId, String fieldName) {
20359
        _thriftId = thriftId;
20360
        _fieldName = fieldName;
20361
      }
20362
 
20363
      public short getThriftFieldId() {
20364
        return _thriftId;
20365
      }
20366
 
20367
      public String getFieldName() {
20368
        return _fieldName;
20369
      }
20370
    }
20371
 
20372
    // isset id assignments
20373
 
20374
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20375
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20376
          new FieldValueMetaData(TType.STRUCT)));
20377
    }});
20378
 
20379
    static {
20380
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
20381
    }
20382
 
20383
    public addItemToCart_result() {
20384
    }
20385
 
20386
    public addItemToCart_result(
20387
      ShoppingCartException scx)
20388
    {
20389
      this();
20390
      this.scx = scx;
20391
    }
20392
 
20393
    /**
20394
     * Performs a deep copy on <i>other</i>.
20395
     */
20396
    public addItemToCart_result(addItemToCart_result other) {
20397
      if (other.isSetScx()) {
20398
        this.scx = new ShoppingCartException(other.scx);
20399
      }
20400
    }
20401
 
20402
    public addItemToCart_result deepCopy() {
20403
      return new addItemToCart_result(this);
20404
    }
20405
 
20406
    @Deprecated
20407
    public addItemToCart_result clone() {
20408
      return new addItemToCart_result(this);
20409
    }
20410
 
20411
    public ShoppingCartException getScx() {
20412
      return this.scx;
20413
    }
20414
 
20415
    public addItemToCart_result setScx(ShoppingCartException scx) {
20416
      this.scx = scx;
20417
      return this;
20418
    }
20419
 
20420
    public void unsetScx() {
20421
      this.scx = null;
20422
    }
20423
 
20424
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20425
    public boolean isSetScx() {
20426
      return this.scx != null;
20427
    }
20428
 
20429
    public void setScxIsSet(boolean value) {
48 ashish 20430
      if (!value) {
553 chandransh 20431
        this.scx = null;
48 ashish 20432
      }
20433
    }
20434
 
20435
    public void setFieldValue(_Fields field, Object value) {
20436
      switch (field) {
553 chandransh 20437
      case SCX:
48 ashish 20438
        if (value == null) {
553 chandransh 20439
          unsetScx();
48 ashish 20440
        } else {
553 chandransh 20441
          setScx((ShoppingCartException)value);
48 ashish 20442
        }
20443
        break;
20444
 
553 chandransh 20445
      }
20446
    }
20447
 
20448
    public void setFieldValue(int fieldID, Object value) {
20449
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20450
    }
20451
 
20452
    public Object getFieldValue(_Fields field) {
20453
      switch (field) {
20454
      case SCX:
20455
        return getScx();
20456
 
20457
      }
20458
      throw new IllegalStateException();
20459
    }
20460
 
20461
    public Object getFieldValue(int fieldId) {
20462
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20463
    }
20464
 
20465
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20466
    public boolean isSet(_Fields field) {
20467
      switch (field) {
20468
      case SCX:
20469
        return isSetScx();
20470
      }
20471
      throw new IllegalStateException();
20472
    }
20473
 
20474
    public boolean isSet(int fieldID) {
20475
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20476
    }
20477
 
20478
    @Override
20479
    public boolean equals(Object that) {
20480
      if (that == null)
20481
        return false;
20482
      if (that instanceof addItemToCart_result)
20483
        return this.equals((addItemToCart_result)that);
20484
      return false;
20485
    }
20486
 
20487
    public boolean equals(addItemToCart_result that) {
20488
      if (that == null)
20489
        return false;
20490
 
20491
      boolean this_present_scx = true && this.isSetScx();
20492
      boolean that_present_scx = true && that.isSetScx();
20493
      if (this_present_scx || that_present_scx) {
20494
        if (!(this_present_scx && that_present_scx))
20495
          return false;
20496
        if (!this.scx.equals(that.scx))
20497
          return false;
20498
      }
20499
 
20500
      return true;
20501
    }
20502
 
20503
    @Override
20504
    public int hashCode() {
20505
      return 0;
20506
    }
20507
 
20508
    public int compareTo(addItemToCart_result other) {
20509
      if (!getClass().equals(other.getClass())) {
20510
        return getClass().getName().compareTo(other.getClass().getName());
20511
      }
20512
 
20513
      int lastComparison = 0;
20514
      addItemToCart_result typedOther = (addItemToCart_result)other;
20515
 
20516
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20517
      if (lastComparison != 0) {
20518
        return lastComparison;
20519
      }
20520
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20521
      if (lastComparison != 0) {
20522
        return lastComparison;
20523
      }
20524
      return 0;
20525
    }
20526
 
20527
    public void read(TProtocol iprot) throws TException {
20528
      TField field;
20529
      iprot.readStructBegin();
20530
      while (true)
20531
      {
20532
        field = iprot.readFieldBegin();
20533
        if (field.type == TType.STOP) { 
20534
          break;
20535
        }
20536
        _Fields fieldId = _Fields.findByThriftId(field.id);
20537
        if (fieldId == null) {
20538
          TProtocolUtil.skip(iprot, field.type);
20539
        } else {
20540
          switch (fieldId) {
20541
            case SCX:
20542
              if (field.type == TType.STRUCT) {
20543
                this.scx = new ShoppingCartException();
20544
                this.scx.read(iprot);
20545
              } else { 
20546
                TProtocolUtil.skip(iprot, field.type);
20547
              }
20548
              break;
20549
          }
20550
          iprot.readFieldEnd();
20551
        }
20552
      }
20553
      iprot.readStructEnd();
20554
      validate();
20555
    }
20556
 
20557
    public void write(TProtocol oprot) throws TException {
20558
      oprot.writeStructBegin(STRUCT_DESC);
20559
 
20560
      if (this.isSetScx()) {
20561
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20562
        this.scx.write(oprot);
20563
        oprot.writeFieldEnd();
20564
      }
20565
      oprot.writeFieldStop();
20566
      oprot.writeStructEnd();
20567
    }
20568
 
20569
    @Override
20570
    public String toString() {
20571
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
20572
      boolean first = true;
20573
 
20574
      sb.append("scx:");
20575
      if (this.scx == null) {
20576
        sb.append("null");
20577
      } else {
20578
        sb.append(this.scx);
20579
      }
20580
      first = false;
20581
      sb.append(")");
20582
      return sb.toString();
20583
    }
20584
 
20585
    public void validate() throws TException {
20586
      // check for required fields
20587
    }
20588
 
20589
  }
20590
 
20591
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
20592
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
20593
 
20594
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20595
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
20596
 
20597
    private long cartId;
20598
    private long itemId;
20599
 
20600
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20601
    public enum _Fields implements TFieldIdEnum {
20602
      CART_ID((short)1, "cartId"),
20603
      ITEM_ID((short)2, "itemId");
20604
 
20605
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20606
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20607
 
20608
      static {
20609
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20610
          byId.put((int)field._thriftId, field);
20611
          byName.put(field.getFieldName(), field);
20612
        }
20613
      }
20614
 
20615
      /**
20616
       * Find the _Fields constant that matches fieldId, or null if its not found.
20617
       */
20618
      public static _Fields findByThriftId(int fieldId) {
20619
        return byId.get(fieldId);
20620
      }
20621
 
20622
      /**
20623
       * Find the _Fields constant that matches fieldId, throwing an exception
20624
       * if it is not found.
20625
       */
20626
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20627
        _Fields fields = findByThriftId(fieldId);
20628
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20629
        return fields;
20630
      }
20631
 
20632
      /**
20633
       * Find the _Fields constant that matches name, or null if its not found.
20634
       */
20635
      public static _Fields findByName(String name) {
20636
        return byName.get(name);
20637
      }
20638
 
20639
      private final short _thriftId;
20640
      private final String _fieldName;
20641
 
20642
      _Fields(short thriftId, String fieldName) {
20643
        _thriftId = thriftId;
20644
        _fieldName = fieldName;
20645
      }
20646
 
20647
      public short getThriftFieldId() {
20648
        return _thriftId;
20649
      }
20650
 
20651
      public String getFieldName() {
20652
        return _fieldName;
20653
      }
20654
    }
20655
 
20656
    // isset id assignments
20657
    private static final int __CARTID_ISSET_ID = 0;
20658
    private static final int __ITEMID_ISSET_ID = 1;
20659
    private BitSet __isset_bit_vector = new BitSet(2);
20660
 
20661
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20662
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20663
          new FieldValueMetaData(TType.I64)));
20664
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
20665
          new FieldValueMetaData(TType.I64)));
20666
    }});
20667
 
20668
    static {
20669
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
20670
    }
20671
 
20672
    public deleteItemFromCart_args() {
20673
    }
20674
 
20675
    public deleteItemFromCart_args(
20676
      long cartId,
20677
      long itemId)
20678
    {
20679
      this();
20680
      this.cartId = cartId;
20681
      setCartIdIsSet(true);
20682
      this.itemId = itemId;
20683
      setItemIdIsSet(true);
20684
    }
20685
 
20686
    /**
20687
     * Performs a deep copy on <i>other</i>.
20688
     */
20689
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
20690
      __isset_bit_vector.clear();
20691
      __isset_bit_vector.or(other.__isset_bit_vector);
20692
      this.cartId = other.cartId;
20693
      this.itemId = other.itemId;
20694
    }
20695
 
20696
    public deleteItemFromCart_args deepCopy() {
20697
      return new deleteItemFromCart_args(this);
20698
    }
20699
 
20700
    @Deprecated
20701
    public deleteItemFromCart_args clone() {
20702
      return new deleteItemFromCart_args(this);
20703
    }
20704
 
20705
    public long getCartId() {
20706
      return this.cartId;
20707
    }
20708
 
20709
    public deleteItemFromCart_args setCartId(long cartId) {
20710
      this.cartId = cartId;
20711
      setCartIdIsSet(true);
20712
      return this;
20713
    }
20714
 
20715
    public void unsetCartId() {
20716
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
20717
    }
20718
 
20719
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20720
    public boolean isSetCartId() {
20721
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
20722
    }
20723
 
20724
    public void setCartIdIsSet(boolean value) {
20725
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
20726
    }
20727
 
20728
    public long getItemId() {
20729
      return this.itemId;
20730
    }
20731
 
20732
    public deleteItemFromCart_args setItemId(long itemId) {
20733
      this.itemId = itemId;
20734
      setItemIdIsSet(true);
20735
      return this;
20736
    }
20737
 
20738
    public void unsetItemId() {
20739
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
20740
    }
20741
 
20742
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20743
    public boolean isSetItemId() {
20744
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
20745
    }
20746
 
20747
    public void setItemIdIsSet(boolean value) {
20748
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20749
    }
20750
 
20751
    public void setFieldValue(_Fields field, Object value) {
20752
      switch (field) {
20753
      case CART_ID:
48 ashish 20754
        if (value == null) {
553 chandransh 20755
          unsetCartId();
48 ashish 20756
        } else {
553 chandransh 20757
          setCartId((Long)value);
48 ashish 20758
        }
20759
        break;
20760
 
553 chandransh 20761
      case ITEM_ID:
20762
        if (value == null) {
20763
          unsetItemId();
20764
        } else {
20765
          setItemId((Long)value);
20766
        }
20767
        break;
20768
 
48 ashish 20769
      }
20770
    }
20771
 
20772
    public void setFieldValue(int fieldID, Object value) {
20773
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20774
    }
20775
 
20776
    public Object getFieldValue(_Fields field) {
20777
      switch (field) {
553 chandransh 20778
      case CART_ID:
20779
        return new Long(getCartId());
48 ashish 20780
 
553 chandransh 20781
      case ITEM_ID:
20782
        return new Long(getItemId());
48 ashish 20783
 
20784
      }
20785
      throw new IllegalStateException();
20786
    }
20787
 
20788
    public Object getFieldValue(int fieldId) {
20789
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20790
    }
20791
 
20792
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20793
    public boolean isSet(_Fields field) {
20794
      switch (field) {
553 chandransh 20795
      case CART_ID:
20796
        return isSetCartId();
20797
      case ITEM_ID:
20798
        return isSetItemId();
48 ashish 20799
      }
20800
      throw new IllegalStateException();
20801
    }
20802
 
20803
    public boolean isSet(int fieldID) {
20804
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20805
    }
20806
 
20807
    @Override
20808
    public boolean equals(Object that) {
20809
      if (that == null)
20810
        return false;
553 chandransh 20811
      if (that instanceof deleteItemFromCart_args)
20812
        return this.equals((deleteItemFromCart_args)that);
48 ashish 20813
      return false;
20814
    }
20815
 
553 chandransh 20816
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 20817
      if (that == null)
20818
        return false;
20819
 
553 chandransh 20820
      boolean this_present_cartId = true;
20821
      boolean that_present_cartId = true;
20822
      if (this_present_cartId || that_present_cartId) {
20823
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20824
          return false;
553 chandransh 20825
        if (this.cartId != that.cartId)
48 ashish 20826
          return false;
20827
      }
20828
 
553 chandransh 20829
      boolean this_present_itemId = true;
20830
      boolean that_present_itemId = true;
20831
      if (this_present_itemId || that_present_itemId) {
20832
        if (!(this_present_itemId && that_present_itemId))
48 ashish 20833
          return false;
553 chandransh 20834
        if (this.itemId != that.itemId)
48 ashish 20835
          return false;
20836
      }
20837
 
20838
      return true;
20839
    }
20840
 
20841
    @Override
20842
    public int hashCode() {
20843
      return 0;
20844
    }
20845
 
553 chandransh 20846
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 20847
      if (!getClass().equals(other.getClass())) {
20848
        return getClass().getName().compareTo(other.getClass().getName());
20849
      }
20850
 
20851
      int lastComparison = 0;
553 chandransh 20852
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 20853
 
553 chandransh 20854
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20855
      if (lastComparison != 0) {
20856
        return lastComparison;
20857
      }
553 chandransh 20858
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20859
      if (lastComparison != 0) {
20860
        return lastComparison;
20861
      }
553 chandransh 20862
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 20863
      if (lastComparison != 0) {
20864
        return lastComparison;
20865
      }
553 chandransh 20866
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 20867
      if (lastComparison != 0) {
20868
        return lastComparison;
20869
      }
20870
      return 0;
20871
    }
20872
 
20873
    public void read(TProtocol iprot) throws TException {
20874
      TField field;
20875
      iprot.readStructBegin();
20876
      while (true)
20877
      {
20878
        field = iprot.readFieldBegin();
20879
        if (field.type == TType.STOP) { 
20880
          break;
20881
        }
20882
        _Fields fieldId = _Fields.findByThriftId(field.id);
20883
        if (fieldId == null) {
20884
          TProtocolUtil.skip(iprot, field.type);
20885
        } else {
20886
          switch (fieldId) {
553 chandransh 20887
            case CART_ID:
20888
              if (field.type == TType.I64) {
20889
                this.cartId = iprot.readI64();
20890
                setCartIdIsSet(true);
48 ashish 20891
              } else { 
20892
                TProtocolUtil.skip(iprot, field.type);
20893
              }
20894
              break;
553 chandransh 20895
            case ITEM_ID:
20896
              if (field.type == TType.I64) {
20897
                this.itemId = iprot.readI64();
20898
                setItemIdIsSet(true);
20899
              } else { 
20900
                TProtocolUtil.skip(iprot, field.type);
20901
              }
20902
              break;
20903
          }
20904
          iprot.readFieldEnd();
20905
        }
20906
      }
20907
      iprot.readStructEnd();
20908
      validate();
20909
    }
20910
 
20911
    public void write(TProtocol oprot) throws TException {
20912
      validate();
20913
 
20914
      oprot.writeStructBegin(STRUCT_DESC);
20915
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20916
      oprot.writeI64(this.cartId);
20917
      oprot.writeFieldEnd();
20918
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20919
      oprot.writeI64(this.itemId);
20920
      oprot.writeFieldEnd();
20921
      oprot.writeFieldStop();
20922
      oprot.writeStructEnd();
20923
    }
20924
 
20925
    @Override
20926
    public String toString() {
20927
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
20928
      boolean first = true;
20929
 
20930
      sb.append("cartId:");
20931
      sb.append(this.cartId);
20932
      first = false;
20933
      if (!first) sb.append(", ");
20934
      sb.append("itemId:");
20935
      sb.append(this.itemId);
20936
      first = false;
20937
      sb.append(")");
20938
      return sb.toString();
20939
    }
20940
 
20941
    public void validate() throws TException {
20942
      // check for required fields
20943
    }
20944
 
20945
  }
20946
 
20947
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
20948
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
20949
 
20950
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20951
 
20952
    private ShoppingCartException scx;
20953
 
20954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20955
    public enum _Fields implements TFieldIdEnum {
20956
      SCX((short)1, "scx");
20957
 
20958
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20959
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20960
 
20961
      static {
20962
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20963
          byId.put((int)field._thriftId, field);
20964
          byName.put(field.getFieldName(), field);
20965
        }
20966
      }
20967
 
20968
      /**
20969
       * Find the _Fields constant that matches fieldId, or null if its not found.
20970
       */
20971
      public static _Fields findByThriftId(int fieldId) {
20972
        return byId.get(fieldId);
20973
      }
20974
 
20975
      /**
20976
       * Find the _Fields constant that matches fieldId, throwing an exception
20977
       * if it is not found.
20978
       */
20979
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20980
        _Fields fields = findByThriftId(fieldId);
20981
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20982
        return fields;
20983
      }
20984
 
20985
      /**
20986
       * Find the _Fields constant that matches name, or null if its not found.
20987
       */
20988
      public static _Fields findByName(String name) {
20989
        return byName.get(name);
20990
      }
20991
 
20992
      private final short _thriftId;
20993
      private final String _fieldName;
20994
 
20995
      _Fields(short thriftId, String fieldName) {
20996
        _thriftId = thriftId;
20997
        _fieldName = fieldName;
20998
      }
20999
 
21000
      public short getThriftFieldId() {
21001
        return _thriftId;
21002
      }
21003
 
21004
      public String getFieldName() {
21005
        return _fieldName;
21006
      }
21007
    }
21008
 
21009
    // isset id assignments
21010
 
21011
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21012
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
21013
          new FieldValueMetaData(TType.STRUCT)));
21014
    }});
21015
 
21016
    static {
21017
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
21018
    }
21019
 
21020
    public deleteItemFromCart_result() {
21021
    }
21022
 
21023
    public deleteItemFromCart_result(
21024
      ShoppingCartException scx)
21025
    {
21026
      this();
21027
      this.scx = scx;
21028
    }
21029
 
21030
    /**
21031
     * Performs a deep copy on <i>other</i>.
21032
     */
21033
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
21034
      if (other.isSetScx()) {
21035
        this.scx = new ShoppingCartException(other.scx);
21036
      }
21037
    }
21038
 
21039
    public deleteItemFromCart_result deepCopy() {
21040
      return new deleteItemFromCart_result(this);
21041
    }
21042
 
21043
    @Deprecated
21044
    public deleteItemFromCart_result clone() {
21045
      return new deleteItemFromCart_result(this);
21046
    }
21047
 
21048
    public ShoppingCartException getScx() {
21049
      return this.scx;
21050
    }
21051
 
21052
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
21053
      this.scx = scx;
21054
      return this;
21055
    }
21056
 
21057
    public void unsetScx() {
21058
      this.scx = null;
21059
    }
21060
 
21061
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21062
    public boolean isSetScx() {
21063
      return this.scx != null;
21064
    }
21065
 
21066
    public void setScxIsSet(boolean value) {
21067
      if (!value) {
21068
        this.scx = null;
21069
      }
21070
    }
21071
 
21072
    public void setFieldValue(_Fields field, Object value) {
21073
      switch (field) {
21074
      case SCX:
21075
        if (value == null) {
21076
          unsetScx();
21077
        } else {
21078
          setScx((ShoppingCartException)value);
21079
        }
21080
        break;
21081
 
21082
      }
21083
    }
21084
 
21085
    public void setFieldValue(int fieldID, Object value) {
21086
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21087
    }
21088
 
21089
    public Object getFieldValue(_Fields field) {
21090
      switch (field) {
21091
      case SCX:
21092
        return getScx();
21093
 
21094
      }
21095
      throw new IllegalStateException();
21096
    }
21097
 
21098
    public Object getFieldValue(int fieldId) {
21099
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21100
    }
21101
 
21102
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21103
    public boolean isSet(_Fields field) {
21104
      switch (field) {
21105
      case SCX:
21106
        return isSetScx();
21107
      }
21108
      throw new IllegalStateException();
21109
    }
21110
 
21111
    public boolean isSet(int fieldID) {
21112
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21113
    }
21114
 
21115
    @Override
21116
    public boolean equals(Object that) {
21117
      if (that == null)
21118
        return false;
21119
      if (that instanceof deleteItemFromCart_result)
21120
        return this.equals((deleteItemFromCart_result)that);
21121
      return false;
21122
    }
21123
 
21124
    public boolean equals(deleteItemFromCart_result that) {
21125
      if (that == null)
21126
        return false;
21127
 
21128
      boolean this_present_scx = true && this.isSetScx();
21129
      boolean that_present_scx = true && that.isSetScx();
21130
      if (this_present_scx || that_present_scx) {
21131
        if (!(this_present_scx && that_present_scx))
21132
          return false;
21133
        if (!this.scx.equals(that.scx))
21134
          return false;
21135
      }
21136
 
21137
      return true;
21138
    }
21139
 
21140
    @Override
21141
    public int hashCode() {
21142
      return 0;
21143
    }
21144
 
21145
    public int compareTo(deleteItemFromCart_result other) {
21146
      if (!getClass().equals(other.getClass())) {
21147
        return getClass().getName().compareTo(other.getClass().getName());
21148
      }
21149
 
21150
      int lastComparison = 0;
21151
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
21152
 
21153
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21154
      if (lastComparison != 0) {
21155
        return lastComparison;
21156
      }
21157
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21158
      if (lastComparison != 0) {
21159
        return lastComparison;
21160
      }
21161
      return 0;
21162
    }
21163
 
21164
    public void read(TProtocol iprot) throws TException {
21165
      TField field;
21166
      iprot.readStructBegin();
21167
      while (true)
21168
      {
21169
        field = iprot.readFieldBegin();
21170
        if (field.type == TType.STOP) { 
21171
          break;
21172
        }
21173
        _Fields fieldId = _Fields.findByThriftId(field.id);
21174
        if (fieldId == null) {
21175
          TProtocolUtil.skip(iprot, field.type);
21176
        } else {
21177
          switch (fieldId) {
21178
            case SCX:
48 ashish 21179
              if (field.type == TType.STRUCT) {
553 chandransh 21180
                this.scx = new ShoppingCartException();
21181
                this.scx.read(iprot);
48 ashish 21182
              } else { 
21183
                TProtocolUtil.skip(iprot, field.type);
21184
              }
21185
              break;
21186
          }
21187
          iprot.readFieldEnd();
21188
        }
21189
      }
21190
      iprot.readStructEnd();
21191
      validate();
21192
    }
21193
 
21194
    public void write(TProtocol oprot) throws TException {
21195
      oprot.writeStructBegin(STRUCT_DESC);
21196
 
553 chandransh 21197
      if (this.isSetScx()) {
21198
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21199
        this.scx.write(oprot);
48 ashish 21200
        oprot.writeFieldEnd();
21201
      }
21202
      oprot.writeFieldStop();
21203
      oprot.writeStructEnd();
21204
    }
21205
 
21206
    @Override
21207
    public String toString() {
553 chandransh 21208
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 21209
      boolean first = true;
21210
 
553 chandransh 21211
      sb.append("scx:");
21212
      if (this.scx == null) {
48 ashish 21213
        sb.append("null");
21214
      } else {
553 chandransh 21215
        sb.append(this.scx);
48 ashish 21216
      }
21217
      first = false;
21218
      sb.append(")");
21219
      return sb.toString();
21220
    }
21221
 
21222
    public void validate() throws TException {
21223
      // check for required fields
21224
    }
21225
 
21226
  }
21227
 
553 chandransh 21228
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
21229
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 21230
 
553 chandransh 21231
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21232
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21233
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 21234
 
553 chandransh 21235
    private long cartId;
21236
    private long itemId;
21237
    private long quantity;
48 ashish 21238
 
21239
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21240
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21241
      CART_ID((short)1, "cartId"),
21242
      ITEM_ID((short)2, "itemId"),
21243
      QUANTITY((short)3, "quantity");
48 ashish 21244
 
21245
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21246
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21247
 
21248
      static {
21249
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21250
          byId.put((int)field._thriftId, field);
21251
          byName.put(field.getFieldName(), field);
21252
        }
21253
      }
21254
 
21255
      /**
21256
       * Find the _Fields constant that matches fieldId, or null if its not found.
21257
       */
21258
      public static _Fields findByThriftId(int fieldId) {
21259
        return byId.get(fieldId);
21260
      }
21261
 
21262
      /**
21263
       * Find the _Fields constant that matches fieldId, throwing an exception
21264
       * if it is not found.
21265
       */
21266
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21267
        _Fields fields = findByThriftId(fieldId);
21268
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21269
        return fields;
21270
      }
21271
 
21272
      /**
21273
       * Find the _Fields constant that matches name, or null if its not found.
21274
       */
21275
      public static _Fields findByName(String name) {
21276
        return byName.get(name);
21277
      }
21278
 
21279
      private final short _thriftId;
21280
      private final String _fieldName;
21281
 
21282
      _Fields(short thriftId, String fieldName) {
21283
        _thriftId = thriftId;
21284
        _fieldName = fieldName;
21285
      }
21286
 
21287
      public short getThriftFieldId() {
21288
        return _thriftId;
21289
      }
21290
 
21291
      public String getFieldName() {
21292
        return _fieldName;
21293
      }
21294
    }
21295
 
21296
    // isset id assignments
553 chandransh 21297
    private static final int __CARTID_ISSET_ID = 0;
21298
    private static final int __ITEMID_ISSET_ID = 1;
21299
    private static final int __QUANTITY_ISSET_ID = 2;
21300
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 21301
 
21302
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21303
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21304
          new FieldValueMetaData(TType.I64)));
553 chandransh 21305
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21306
          new FieldValueMetaData(TType.I64)));
21307
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
21308
          new FieldValueMetaData(TType.I64)));
48 ashish 21309
    }});
21310
 
21311
    static {
553 chandransh 21312
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 21313
    }
21314
 
553 chandransh 21315
    public changeQuantity_args() {
48 ashish 21316
    }
21317
 
553 chandransh 21318
    public changeQuantity_args(
21319
      long cartId,
21320
      long itemId,
21321
      long quantity)
48 ashish 21322
    {
21323
      this();
553 chandransh 21324
      this.cartId = cartId;
21325
      setCartIdIsSet(true);
21326
      this.itemId = itemId;
21327
      setItemIdIsSet(true);
21328
      this.quantity = quantity;
21329
      setQuantityIsSet(true);
48 ashish 21330
    }
21331
 
21332
    /**
21333
     * Performs a deep copy on <i>other</i>.
21334
     */
553 chandransh 21335
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 21336
      __isset_bit_vector.clear();
21337
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21338
      this.cartId = other.cartId;
21339
      this.itemId = other.itemId;
21340
      this.quantity = other.quantity;
48 ashish 21341
    }
21342
 
553 chandransh 21343
    public changeQuantity_args deepCopy() {
21344
      return new changeQuantity_args(this);
48 ashish 21345
    }
21346
 
21347
    @Deprecated
553 chandransh 21348
    public changeQuantity_args clone() {
21349
      return new changeQuantity_args(this);
48 ashish 21350
    }
21351
 
553 chandransh 21352
    public long getCartId() {
21353
      return this.cartId;
48 ashish 21354
    }
21355
 
553 chandransh 21356
    public changeQuantity_args setCartId(long cartId) {
21357
      this.cartId = cartId;
21358
      setCartIdIsSet(true);
48 ashish 21359
      return this;
21360
    }
21361
 
553 chandransh 21362
    public void unsetCartId() {
21363
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21364
    }
21365
 
553 chandransh 21366
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21367
    public boolean isSetCartId() {
21368
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21369
    }
21370
 
553 chandransh 21371
    public void setCartIdIsSet(boolean value) {
21372
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21373
    }
21374
 
553 chandransh 21375
    public long getItemId() {
21376
      return this.itemId;
21377
    }
21378
 
21379
    public changeQuantity_args setItemId(long itemId) {
21380
      this.itemId = itemId;
21381
      setItemIdIsSet(true);
21382
      return this;
21383
    }
21384
 
21385
    public void unsetItemId() {
21386
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
21387
    }
21388
 
21389
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
21390
    public boolean isSetItemId() {
21391
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
21392
    }
21393
 
21394
    public void setItemIdIsSet(boolean value) {
21395
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
21396
    }
21397
 
21398
    public long getQuantity() {
21399
      return this.quantity;
21400
    }
21401
 
21402
    public changeQuantity_args setQuantity(long quantity) {
21403
      this.quantity = quantity;
21404
      setQuantityIsSet(true);
21405
      return this;
21406
    }
21407
 
21408
    public void unsetQuantity() {
21409
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
21410
    }
21411
 
21412
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
21413
    public boolean isSetQuantity() {
21414
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
21415
    }
21416
 
21417
    public void setQuantityIsSet(boolean value) {
21418
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
21419
    }
21420
 
48 ashish 21421
    public void setFieldValue(_Fields field, Object value) {
21422
      switch (field) {
553 chandransh 21423
      case CART_ID:
48 ashish 21424
        if (value == null) {
553 chandransh 21425
          unsetCartId();
48 ashish 21426
        } else {
553 chandransh 21427
          setCartId((Long)value);
48 ashish 21428
        }
21429
        break;
21430
 
553 chandransh 21431
      case ITEM_ID:
21432
        if (value == null) {
21433
          unsetItemId();
21434
        } else {
21435
          setItemId((Long)value);
21436
        }
21437
        break;
21438
 
21439
      case QUANTITY:
21440
        if (value == null) {
21441
          unsetQuantity();
21442
        } else {
21443
          setQuantity((Long)value);
21444
        }
21445
        break;
21446
 
48 ashish 21447
      }
21448
    }
21449
 
21450
    public void setFieldValue(int fieldID, Object value) {
21451
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21452
    }
21453
 
21454
    public Object getFieldValue(_Fields field) {
21455
      switch (field) {
553 chandransh 21456
      case CART_ID:
21457
        return new Long(getCartId());
48 ashish 21458
 
553 chandransh 21459
      case ITEM_ID:
21460
        return new Long(getItemId());
21461
 
21462
      case QUANTITY:
21463
        return new Long(getQuantity());
21464
 
48 ashish 21465
      }
21466
      throw new IllegalStateException();
21467
    }
21468
 
21469
    public Object getFieldValue(int fieldId) {
21470
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21471
    }
21472
 
21473
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21474
    public boolean isSet(_Fields field) {
21475
      switch (field) {
553 chandransh 21476
      case CART_ID:
21477
        return isSetCartId();
21478
      case ITEM_ID:
21479
        return isSetItemId();
21480
      case QUANTITY:
21481
        return isSetQuantity();
48 ashish 21482
      }
21483
      throw new IllegalStateException();
21484
    }
21485
 
21486
    public boolean isSet(int fieldID) {
21487
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21488
    }
21489
 
21490
    @Override
21491
    public boolean equals(Object that) {
21492
      if (that == null)
21493
        return false;
553 chandransh 21494
      if (that instanceof changeQuantity_args)
21495
        return this.equals((changeQuantity_args)that);
48 ashish 21496
      return false;
21497
    }
21498
 
553 chandransh 21499
    public boolean equals(changeQuantity_args that) {
48 ashish 21500
      if (that == null)
21501
        return false;
21502
 
553 chandransh 21503
      boolean this_present_cartId = true;
21504
      boolean that_present_cartId = true;
21505
      if (this_present_cartId || that_present_cartId) {
21506
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21507
          return false;
553 chandransh 21508
        if (this.cartId != that.cartId)
48 ashish 21509
          return false;
21510
      }
21511
 
553 chandransh 21512
      boolean this_present_itemId = true;
21513
      boolean that_present_itemId = true;
21514
      if (this_present_itemId || that_present_itemId) {
21515
        if (!(this_present_itemId && that_present_itemId))
21516
          return false;
21517
        if (this.itemId != that.itemId)
21518
          return false;
21519
      }
21520
 
21521
      boolean this_present_quantity = true;
21522
      boolean that_present_quantity = true;
21523
      if (this_present_quantity || that_present_quantity) {
21524
        if (!(this_present_quantity && that_present_quantity))
21525
          return false;
21526
        if (this.quantity != that.quantity)
21527
          return false;
21528
      }
21529
 
48 ashish 21530
      return true;
21531
    }
21532
 
21533
    @Override
21534
    public int hashCode() {
21535
      return 0;
21536
    }
21537
 
553 chandransh 21538
    public int compareTo(changeQuantity_args other) {
48 ashish 21539
      if (!getClass().equals(other.getClass())) {
21540
        return getClass().getName().compareTo(other.getClass().getName());
21541
      }
21542
 
21543
      int lastComparison = 0;
553 chandransh 21544
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 21545
 
553 chandransh 21546
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21547
      if (lastComparison != 0) {
21548
        return lastComparison;
21549
      }
553 chandransh 21550
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21551
      if (lastComparison != 0) {
21552
        return lastComparison;
21553
      }
553 chandransh 21554
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
21555
      if (lastComparison != 0) {
21556
        return lastComparison;
21557
      }
21558
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
21559
      if (lastComparison != 0) {
21560
        return lastComparison;
21561
      }
21562
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
21563
      if (lastComparison != 0) {
21564
        return lastComparison;
21565
      }
21566
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
21567
      if (lastComparison != 0) {
21568
        return lastComparison;
21569
      }
48 ashish 21570
      return 0;
21571
    }
21572
 
21573
    public void read(TProtocol iprot) throws TException {
21574
      TField field;
21575
      iprot.readStructBegin();
21576
      while (true)
21577
      {
21578
        field = iprot.readFieldBegin();
21579
        if (field.type == TType.STOP) { 
21580
          break;
21581
        }
21582
        _Fields fieldId = _Fields.findByThriftId(field.id);
21583
        if (fieldId == null) {
21584
          TProtocolUtil.skip(iprot, field.type);
21585
        } else {
21586
          switch (fieldId) {
553 chandransh 21587
            case CART_ID:
48 ashish 21588
              if (field.type == TType.I64) {
553 chandransh 21589
                this.cartId = iprot.readI64();
21590
                setCartIdIsSet(true);
48 ashish 21591
              } else { 
21592
                TProtocolUtil.skip(iprot, field.type);
21593
              }
21594
              break;
553 chandransh 21595
            case ITEM_ID:
21596
              if (field.type == TType.I64) {
21597
                this.itemId = iprot.readI64();
21598
                setItemIdIsSet(true);
21599
              } else { 
21600
                TProtocolUtil.skip(iprot, field.type);
21601
              }
21602
              break;
21603
            case QUANTITY:
21604
              if (field.type == TType.I64) {
21605
                this.quantity = iprot.readI64();
21606
                setQuantityIsSet(true);
21607
              } else { 
21608
                TProtocolUtil.skip(iprot, field.type);
21609
              }
21610
              break;
48 ashish 21611
          }
21612
          iprot.readFieldEnd();
21613
        }
21614
      }
21615
      iprot.readStructEnd();
21616
      validate();
21617
    }
21618
 
21619
    public void write(TProtocol oprot) throws TException {
21620
      validate();
21621
 
21622
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21623
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21624
      oprot.writeI64(this.cartId);
48 ashish 21625
      oprot.writeFieldEnd();
553 chandransh 21626
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
21627
      oprot.writeI64(this.itemId);
21628
      oprot.writeFieldEnd();
21629
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
21630
      oprot.writeI64(this.quantity);
21631
      oprot.writeFieldEnd();
48 ashish 21632
      oprot.writeFieldStop();
21633
      oprot.writeStructEnd();
21634
    }
21635
 
21636
    @Override
21637
    public String toString() {
553 chandransh 21638
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 21639
      boolean first = true;
21640
 
553 chandransh 21641
      sb.append("cartId:");
21642
      sb.append(this.cartId);
48 ashish 21643
      first = false;
553 chandransh 21644
      if (!first) sb.append(", ");
21645
      sb.append("itemId:");
21646
      sb.append(this.itemId);
21647
      first = false;
21648
      if (!first) sb.append(", ");
21649
      sb.append("quantity:");
21650
      sb.append(this.quantity);
21651
      first = false;
48 ashish 21652
      sb.append(")");
21653
      return sb.toString();
21654
    }
21655
 
21656
    public void validate() throws TException {
21657
      // check for required fields
21658
    }
21659
 
21660
  }
21661
 
553 chandransh 21662
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
21663
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 21664
 
553 chandransh 21665
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21666
 
553 chandransh 21667
    private ShoppingCartException scx;
48 ashish 21668
 
21669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21670
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21671
      SCX((short)1, "scx");
48 ashish 21672
 
21673
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21675
 
21676
      static {
21677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21678
          byId.put((int)field._thriftId, field);
21679
          byName.put(field.getFieldName(), field);
21680
        }
21681
      }
21682
 
21683
      /**
21684
       * Find the _Fields constant that matches fieldId, or null if its not found.
21685
       */
21686
      public static _Fields findByThriftId(int fieldId) {
21687
        return byId.get(fieldId);
21688
      }
21689
 
21690
      /**
21691
       * Find the _Fields constant that matches fieldId, throwing an exception
21692
       * if it is not found.
21693
       */
21694
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21695
        _Fields fields = findByThriftId(fieldId);
21696
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21697
        return fields;
21698
      }
21699
 
21700
      /**
21701
       * Find the _Fields constant that matches name, or null if its not found.
21702
       */
21703
      public static _Fields findByName(String name) {
21704
        return byName.get(name);
21705
      }
21706
 
21707
      private final short _thriftId;
21708
      private final String _fieldName;
21709
 
21710
      _Fields(short thriftId, String fieldName) {
21711
        _thriftId = thriftId;
21712
        _fieldName = fieldName;
21713
      }
21714
 
21715
      public short getThriftFieldId() {
21716
        return _thriftId;
21717
      }
21718
 
21719
      public String getFieldName() {
21720
        return _fieldName;
21721
      }
21722
    }
21723
 
21724
    // isset id assignments
21725
 
21726
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21727
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21728
          new FieldValueMetaData(TType.STRUCT)));
21729
    }});
21730
 
21731
    static {
553 chandransh 21732
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 21733
    }
21734
 
553 chandransh 21735
    public changeQuantity_result() {
48 ashish 21736
    }
21737
 
553 chandransh 21738
    public changeQuantity_result(
21739
      ShoppingCartException scx)
48 ashish 21740
    {
21741
      this();
553 chandransh 21742
      this.scx = scx;
48 ashish 21743
    }
21744
 
21745
    /**
21746
     * Performs a deep copy on <i>other</i>.
21747
     */
553 chandransh 21748
    public changeQuantity_result(changeQuantity_result other) {
21749
      if (other.isSetScx()) {
21750
        this.scx = new ShoppingCartException(other.scx);
21751
      }
21752
    }
21753
 
21754
    public changeQuantity_result deepCopy() {
21755
      return new changeQuantity_result(this);
21756
    }
21757
 
21758
    @Deprecated
21759
    public changeQuantity_result clone() {
21760
      return new changeQuantity_result(this);
21761
    }
21762
 
21763
    public ShoppingCartException getScx() {
21764
      return this.scx;
21765
    }
21766
 
21767
    public changeQuantity_result setScx(ShoppingCartException scx) {
21768
      this.scx = scx;
21769
      return this;
21770
    }
21771
 
21772
    public void unsetScx() {
21773
      this.scx = null;
21774
    }
21775
 
21776
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21777
    public boolean isSetScx() {
21778
      return this.scx != null;
21779
    }
21780
 
21781
    public void setScxIsSet(boolean value) {
21782
      if (!value) {
21783
        this.scx = null;
21784
      }
21785
    }
21786
 
21787
    public void setFieldValue(_Fields field, Object value) {
21788
      switch (field) {
21789
      case SCX:
21790
        if (value == null) {
21791
          unsetScx();
21792
        } else {
21793
          setScx((ShoppingCartException)value);
21794
        }
21795
        break;
21796
 
21797
      }
21798
    }
21799
 
21800
    public void setFieldValue(int fieldID, Object value) {
21801
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21802
    }
21803
 
21804
    public Object getFieldValue(_Fields field) {
21805
      switch (field) {
21806
      case SCX:
21807
        return getScx();
21808
 
21809
      }
21810
      throw new IllegalStateException();
21811
    }
21812
 
21813
    public Object getFieldValue(int fieldId) {
21814
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21815
    }
21816
 
21817
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21818
    public boolean isSet(_Fields field) {
21819
      switch (field) {
21820
      case SCX:
21821
        return isSetScx();
21822
      }
21823
      throw new IllegalStateException();
21824
    }
21825
 
21826
    public boolean isSet(int fieldID) {
21827
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21828
    }
21829
 
21830
    @Override
21831
    public boolean equals(Object that) {
21832
      if (that == null)
21833
        return false;
21834
      if (that instanceof changeQuantity_result)
21835
        return this.equals((changeQuantity_result)that);
21836
      return false;
21837
    }
21838
 
21839
    public boolean equals(changeQuantity_result that) {
21840
      if (that == null)
21841
        return false;
21842
 
21843
      boolean this_present_scx = true && this.isSetScx();
21844
      boolean that_present_scx = true && that.isSetScx();
21845
      if (this_present_scx || that_present_scx) {
21846
        if (!(this_present_scx && that_present_scx))
21847
          return false;
21848
        if (!this.scx.equals(that.scx))
21849
          return false;
21850
      }
21851
 
21852
      return true;
21853
    }
21854
 
21855
    @Override
21856
    public int hashCode() {
21857
      return 0;
21858
    }
21859
 
21860
    public int compareTo(changeQuantity_result other) {
21861
      if (!getClass().equals(other.getClass())) {
21862
        return getClass().getName().compareTo(other.getClass().getName());
21863
      }
21864
 
21865
      int lastComparison = 0;
21866
      changeQuantity_result typedOther = (changeQuantity_result)other;
21867
 
21868
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21869
      if (lastComparison != 0) {
21870
        return lastComparison;
21871
      }
21872
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21873
      if (lastComparison != 0) {
21874
        return lastComparison;
21875
      }
21876
      return 0;
21877
    }
21878
 
21879
    public void read(TProtocol iprot) throws TException {
21880
      TField field;
21881
      iprot.readStructBegin();
21882
      while (true)
21883
      {
21884
        field = iprot.readFieldBegin();
21885
        if (field.type == TType.STOP) { 
21886
          break;
21887
        }
21888
        _Fields fieldId = _Fields.findByThriftId(field.id);
21889
        if (fieldId == null) {
21890
          TProtocolUtil.skip(iprot, field.type);
21891
        } else {
21892
          switch (fieldId) {
21893
            case SCX:
21894
              if (field.type == TType.STRUCT) {
21895
                this.scx = new ShoppingCartException();
21896
                this.scx.read(iprot);
21897
              } else { 
21898
                TProtocolUtil.skip(iprot, field.type);
21899
              }
21900
              break;
21901
          }
21902
          iprot.readFieldEnd();
21903
        }
21904
      }
21905
      iprot.readStructEnd();
21906
      validate();
21907
    }
21908
 
21909
    public void write(TProtocol oprot) throws TException {
21910
      oprot.writeStructBegin(STRUCT_DESC);
21911
 
21912
      if (this.isSetScx()) {
21913
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21914
        this.scx.write(oprot);
21915
        oprot.writeFieldEnd();
21916
      }
21917
      oprot.writeFieldStop();
21918
      oprot.writeStructEnd();
21919
    }
21920
 
21921
    @Override
21922
    public String toString() {
21923
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
21924
      boolean first = true;
21925
 
21926
      sb.append("scx:");
21927
      if (this.scx == null) {
21928
        sb.append("null");
21929
      } else {
21930
        sb.append(this.scx);
21931
      }
21932
      first = false;
21933
      sb.append(")");
21934
      return sb.toString();
21935
    }
21936
 
21937
    public void validate() throws TException {
21938
      // check for required fields
21939
    }
21940
 
21941
  }
21942
 
21943
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
21944
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
21945
 
21946
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21947
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21948
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
21949
 
21950
    private long cartId;
21951
    private long itemId;
21952
    private LineStatus status;
21953
 
21954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21955
    public enum _Fields implements TFieldIdEnum {
21956
      CART_ID((short)1, "cartId"),
21957
      ITEM_ID((short)2, "itemId"),
21958
      /**
21959
       * 
21960
       * @see LineStatus
21961
       */
21962
      STATUS((short)3, "status");
21963
 
21964
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21966
 
21967
      static {
21968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21969
          byId.put((int)field._thriftId, field);
21970
          byName.put(field.getFieldName(), field);
21971
        }
21972
      }
21973
 
21974
      /**
21975
       * Find the _Fields constant that matches fieldId, or null if its not found.
21976
       */
21977
      public static _Fields findByThriftId(int fieldId) {
21978
        return byId.get(fieldId);
21979
      }
21980
 
21981
      /**
21982
       * Find the _Fields constant that matches fieldId, throwing an exception
21983
       * if it is not found.
21984
       */
21985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21986
        _Fields fields = findByThriftId(fieldId);
21987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21988
        return fields;
21989
      }
21990
 
21991
      /**
21992
       * Find the _Fields constant that matches name, or null if its not found.
21993
       */
21994
      public static _Fields findByName(String name) {
21995
        return byName.get(name);
21996
      }
21997
 
21998
      private final short _thriftId;
21999
      private final String _fieldName;
22000
 
22001
      _Fields(short thriftId, String fieldName) {
22002
        _thriftId = thriftId;
22003
        _fieldName = fieldName;
22004
      }
22005
 
22006
      public short getThriftFieldId() {
22007
        return _thriftId;
22008
      }
22009
 
22010
      public String getFieldName() {
22011
        return _fieldName;
22012
      }
22013
    }
22014
 
22015
    // isset id assignments
22016
    private static final int __CARTID_ISSET_ID = 0;
22017
    private static final int __ITEMID_ISSET_ID = 1;
22018
    private BitSet __isset_bit_vector = new BitSet(2);
22019
 
22020
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22021
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22022
          new FieldValueMetaData(TType.I64)));
22023
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22024
          new FieldValueMetaData(TType.I64)));
22025
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
22026
          new EnumMetaData(TType.ENUM, LineStatus.class)));
22027
    }});
22028
 
22029
    static {
22030
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
22031
    }
22032
 
22033
    public changeItemStatus_args() {
22034
    }
22035
 
22036
    public changeItemStatus_args(
22037
      long cartId,
22038
      long itemId,
22039
      LineStatus status)
22040
    {
22041
      this();
22042
      this.cartId = cartId;
22043
      setCartIdIsSet(true);
22044
      this.itemId = itemId;
22045
      setItemIdIsSet(true);
22046
      this.status = status;
22047
    }
22048
 
22049
    /**
22050
     * Performs a deep copy on <i>other</i>.
22051
     */
22052
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 22053
      __isset_bit_vector.clear();
22054
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22055
      this.cartId = other.cartId;
22056
      this.itemId = other.itemId;
22057
      if (other.isSetStatus()) {
22058
        this.status = other.status;
48 ashish 22059
      }
22060
    }
22061
 
553 chandransh 22062
    public changeItemStatus_args deepCopy() {
22063
      return new changeItemStatus_args(this);
48 ashish 22064
    }
22065
 
22066
    @Deprecated
553 chandransh 22067
    public changeItemStatus_args clone() {
22068
      return new changeItemStatus_args(this);
48 ashish 22069
    }
22070
 
553 chandransh 22071
    public long getCartId() {
22072
      return this.cartId;
48 ashish 22073
    }
22074
 
553 chandransh 22075
    public changeItemStatus_args setCartId(long cartId) {
22076
      this.cartId = cartId;
22077
      setCartIdIsSet(true);
48 ashish 22078
      return this;
22079
    }
22080
 
553 chandransh 22081
    public void unsetCartId() {
22082
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22083
    }
22084
 
553 chandransh 22085
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22086
    public boolean isSetCartId() {
22087
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22088
    }
22089
 
553 chandransh 22090
    public void setCartIdIsSet(boolean value) {
22091
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22092
    }
22093
 
553 chandransh 22094
    public long getItemId() {
22095
      return this.itemId;
48 ashish 22096
    }
22097
 
553 chandransh 22098
    public changeItemStatus_args setItemId(long itemId) {
22099
      this.itemId = itemId;
22100
      setItemIdIsSet(true);
48 ashish 22101
      return this;
22102
    }
22103
 
553 chandransh 22104
    public void unsetItemId() {
22105
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22106
    }
22107
 
553 chandransh 22108
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22109
    public boolean isSetItemId() {
22110
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22111
    }
22112
 
553 chandransh 22113
    public void setItemIdIsSet(boolean value) {
22114
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22115
    }
22116
 
22117
    /**
22118
     * 
22119
     * @see LineStatus
22120
     */
22121
    public LineStatus getStatus() {
22122
      return this.status;
22123
    }
22124
 
22125
    /**
22126
     * 
22127
     * @see LineStatus
22128
     */
22129
    public changeItemStatus_args setStatus(LineStatus status) {
22130
      this.status = status;
22131
      return this;
22132
    }
22133
 
22134
    public void unsetStatus() {
22135
      this.status = null;
22136
    }
22137
 
22138
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22139
    public boolean isSetStatus() {
22140
      return this.status != null;
22141
    }
22142
 
22143
    public void setStatusIsSet(boolean value) {
48 ashish 22144
      if (!value) {
553 chandransh 22145
        this.status = null;
48 ashish 22146
      }
22147
    }
22148
 
22149
    public void setFieldValue(_Fields field, Object value) {
22150
      switch (field) {
553 chandransh 22151
      case CART_ID:
48 ashish 22152
        if (value == null) {
553 chandransh 22153
          unsetCartId();
48 ashish 22154
        } else {
553 chandransh 22155
          setCartId((Long)value);
48 ashish 22156
        }
22157
        break;
22158
 
553 chandransh 22159
      case ITEM_ID:
48 ashish 22160
        if (value == null) {
553 chandransh 22161
          unsetItemId();
48 ashish 22162
        } else {
553 chandransh 22163
          setItemId((Long)value);
48 ashish 22164
        }
22165
        break;
22166
 
553 chandransh 22167
      case STATUS:
22168
        if (value == null) {
22169
          unsetStatus();
22170
        } else {
22171
          setStatus((LineStatus)value);
22172
        }
22173
        break;
22174
 
48 ashish 22175
      }
22176
    }
22177
 
22178
    public void setFieldValue(int fieldID, Object value) {
22179
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22180
    }
22181
 
22182
    public Object getFieldValue(_Fields field) {
22183
      switch (field) {
553 chandransh 22184
      case CART_ID:
22185
        return new Long(getCartId());
48 ashish 22186
 
553 chandransh 22187
      case ITEM_ID:
22188
        return new Long(getItemId());
48 ashish 22189
 
553 chandransh 22190
      case STATUS:
22191
        return getStatus();
22192
 
48 ashish 22193
      }
22194
      throw new IllegalStateException();
22195
    }
22196
 
22197
    public Object getFieldValue(int fieldId) {
22198
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22199
    }
22200
 
22201
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22202
    public boolean isSet(_Fields field) {
22203
      switch (field) {
553 chandransh 22204
      case CART_ID:
22205
        return isSetCartId();
22206
      case ITEM_ID:
22207
        return isSetItemId();
22208
      case STATUS:
22209
        return isSetStatus();
48 ashish 22210
      }
22211
      throw new IllegalStateException();
22212
    }
22213
 
22214
    public boolean isSet(int fieldID) {
22215
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22216
    }
22217
 
22218
    @Override
22219
    public boolean equals(Object that) {
22220
      if (that == null)
22221
        return false;
553 chandransh 22222
      if (that instanceof changeItemStatus_args)
22223
        return this.equals((changeItemStatus_args)that);
48 ashish 22224
      return false;
22225
    }
22226
 
553 chandransh 22227
    public boolean equals(changeItemStatus_args that) {
48 ashish 22228
      if (that == null)
22229
        return false;
22230
 
553 chandransh 22231
      boolean this_present_cartId = true;
22232
      boolean that_present_cartId = true;
22233
      if (this_present_cartId || that_present_cartId) {
22234
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22235
          return false;
553 chandransh 22236
        if (this.cartId != that.cartId)
48 ashish 22237
          return false;
22238
      }
22239
 
553 chandransh 22240
      boolean this_present_itemId = true;
22241
      boolean that_present_itemId = true;
22242
      if (this_present_itemId || that_present_itemId) {
22243
        if (!(this_present_itemId && that_present_itemId))
48 ashish 22244
          return false;
553 chandransh 22245
        if (this.itemId != that.itemId)
48 ashish 22246
          return false;
22247
      }
22248
 
553 chandransh 22249
      boolean this_present_status = true && this.isSetStatus();
22250
      boolean that_present_status = true && that.isSetStatus();
22251
      if (this_present_status || that_present_status) {
22252
        if (!(this_present_status && that_present_status))
22253
          return false;
22254
        if (!this.status.equals(that.status))
22255
          return false;
22256
      }
22257
 
48 ashish 22258
      return true;
22259
    }
22260
 
22261
    @Override
22262
    public int hashCode() {
22263
      return 0;
22264
    }
22265
 
553 chandransh 22266
    public int compareTo(changeItemStatus_args other) {
48 ashish 22267
      if (!getClass().equals(other.getClass())) {
22268
        return getClass().getName().compareTo(other.getClass().getName());
22269
      }
22270
 
22271
      int lastComparison = 0;
553 chandransh 22272
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 22273
 
553 chandransh 22274
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22275
      if (lastComparison != 0) {
22276
        return lastComparison;
22277
      }
553 chandransh 22278
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22279
      if (lastComparison != 0) {
22280
        return lastComparison;
22281
      }
553 chandransh 22282
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 22283
      if (lastComparison != 0) {
22284
        return lastComparison;
22285
      }
553 chandransh 22286
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 22287
      if (lastComparison != 0) {
22288
        return lastComparison;
22289
      }
553 chandransh 22290
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22291
      if (lastComparison != 0) {
22292
        return lastComparison;
22293
      }
22294
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22295
      if (lastComparison != 0) {
22296
        return lastComparison;
22297
      }
48 ashish 22298
      return 0;
22299
    }
22300
 
22301
    public void read(TProtocol iprot) throws TException {
22302
      TField field;
22303
      iprot.readStructBegin();
22304
      while (true)
22305
      {
22306
        field = iprot.readFieldBegin();
22307
        if (field.type == TType.STOP) { 
22308
          break;
22309
        }
22310
        _Fields fieldId = _Fields.findByThriftId(field.id);
22311
        if (fieldId == null) {
22312
          TProtocolUtil.skip(iprot, field.type);
22313
        } else {
22314
          switch (fieldId) {
553 chandransh 22315
            case CART_ID:
22316
              if (field.type == TType.I64) {
22317
                this.cartId = iprot.readI64();
22318
                setCartIdIsSet(true);
48 ashish 22319
              } else { 
22320
                TProtocolUtil.skip(iprot, field.type);
22321
              }
22322
              break;
553 chandransh 22323
            case ITEM_ID:
22324
              if (field.type == TType.I64) {
22325
                this.itemId = iprot.readI64();
22326
                setItemIdIsSet(true);
48 ashish 22327
              } else { 
22328
                TProtocolUtil.skip(iprot, field.type);
22329
              }
22330
              break;
553 chandransh 22331
            case STATUS:
22332
              if (field.type == TType.I32) {
22333
                this.status = LineStatus.findByValue(iprot.readI32());
22334
              } else { 
22335
                TProtocolUtil.skip(iprot, field.type);
22336
              }
22337
              break;
48 ashish 22338
          }
22339
          iprot.readFieldEnd();
22340
        }
22341
      }
22342
      iprot.readStructEnd();
22343
      validate();
22344
    }
22345
 
22346
    public void write(TProtocol oprot) throws TException {
553 chandransh 22347
      validate();
22348
 
48 ashish 22349
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22350
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22351
      oprot.writeI64(this.cartId);
22352
      oprot.writeFieldEnd();
22353
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22354
      oprot.writeI64(this.itemId);
22355
      oprot.writeFieldEnd();
22356
      if (this.status != null) {
22357
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22358
        oprot.writeI32(this.status.getValue());
48 ashish 22359
        oprot.writeFieldEnd();
22360
      }
22361
      oprot.writeFieldStop();
22362
      oprot.writeStructEnd();
22363
    }
22364
 
22365
    @Override
22366
    public String toString() {
553 chandransh 22367
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 22368
      boolean first = true;
22369
 
553 chandransh 22370
      sb.append("cartId:");
22371
      sb.append(this.cartId);
48 ashish 22372
      first = false;
22373
      if (!first) sb.append(", ");
553 chandransh 22374
      sb.append("itemId:");
22375
      sb.append(this.itemId);
22376
      first = false;
22377
      if (!first) sb.append(", ");
22378
      sb.append("status:");
22379
      if (this.status == null) {
48 ashish 22380
        sb.append("null");
22381
      } else {
553 chandransh 22382
        String status_name = status.name();
22383
        if (status_name != null) {
22384
          sb.append(status_name);
22385
          sb.append(" (");
22386
        }
22387
        sb.append(this.status);
22388
        if (status_name != null) {
22389
          sb.append(")");
22390
        }
48 ashish 22391
      }
22392
      first = false;
22393
      sb.append(")");
22394
      return sb.toString();
22395
    }
22396
 
22397
    public void validate() throws TException {
22398
      // check for required fields
22399
    }
22400
 
22401
  }
22402
 
553 chandransh 22403
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
22404
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 22405
 
553 chandransh 22406
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22407
 
553 chandransh 22408
    private ShoppingCartException scx;
48 ashish 22409
 
22410
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22411
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22412
      SCX((short)1, "scx");
48 ashish 22413
 
22414
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22415
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22416
 
22417
      static {
22418
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22419
          byId.put((int)field._thriftId, field);
22420
          byName.put(field.getFieldName(), field);
22421
        }
22422
      }
22423
 
22424
      /**
22425
       * Find the _Fields constant that matches fieldId, or null if its not found.
22426
       */
22427
      public static _Fields findByThriftId(int fieldId) {
22428
        return byId.get(fieldId);
22429
      }
22430
 
22431
      /**
22432
       * Find the _Fields constant that matches fieldId, throwing an exception
22433
       * if it is not found.
22434
       */
22435
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22436
        _Fields fields = findByThriftId(fieldId);
22437
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22438
        return fields;
22439
      }
22440
 
22441
      /**
22442
       * Find the _Fields constant that matches name, or null if its not found.
22443
       */
22444
      public static _Fields findByName(String name) {
22445
        return byName.get(name);
22446
      }
22447
 
22448
      private final short _thriftId;
22449
      private final String _fieldName;
22450
 
22451
      _Fields(short thriftId, String fieldName) {
22452
        _thriftId = thriftId;
22453
        _fieldName = fieldName;
22454
      }
22455
 
22456
      public short getThriftFieldId() {
22457
        return _thriftId;
22458
      }
22459
 
22460
      public String getFieldName() {
22461
        return _fieldName;
22462
      }
22463
    }
22464
 
22465
    // isset id assignments
553 chandransh 22466
 
22467
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22468
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22469
          new FieldValueMetaData(TType.STRUCT)));
22470
    }});
22471
 
22472
    static {
22473
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
22474
    }
22475
 
22476
    public changeItemStatus_result() {
22477
    }
22478
 
22479
    public changeItemStatus_result(
22480
      ShoppingCartException scx)
22481
    {
22482
      this();
22483
      this.scx = scx;
22484
    }
22485
 
22486
    /**
22487
     * Performs a deep copy on <i>other</i>.
22488
     */
22489
    public changeItemStatus_result(changeItemStatus_result other) {
22490
      if (other.isSetScx()) {
22491
        this.scx = new ShoppingCartException(other.scx);
22492
      }
22493
    }
22494
 
22495
    public changeItemStatus_result deepCopy() {
22496
      return new changeItemStatus_result(this);
22497
    }
22498
 
22499
    @Deprecated
22500
    public changeItemStatus_result clone() {
22501
      return new changeItemStatus_result(this);
22502
    }
22503
 
22504
    public ShoppingCartException getScx() {
22505
      return this.scx;
22506
    }
22507
 
22508
    public changeItemStatus_result setScx(ShoppingCartException scx) {
22509
      this.scx = scx;
22510
      return this;
22511
    }
22512
 
22513
    public void unsetScx() {
22514
      this.scx = null;
22515
    }
22516
 
22517
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22518
    public boolean isSetScx() {
22519
      return this.scx != null;
22520
    }
22521
 
22522
    public void setScxIsSet(boolean value) {
22523
      if (!value) {
22524
        this.scx = null;
22525
      }
22526
    }
22527
 
22528
    public void setFieldValue(_Fields field, Object value) {
22529
      switch (field) {
22530
      case SCX:
22531
        if (value == null) {
22532
          unsetScx();
22533
        } else {
22534
          setScx((ShoppingCartException)value);
22535
        }
22536
        break;
22537
 
22538
      }
22539
    }
22540
 
22541
    public void setFieldValue(int fieldID, Object value) {
22542
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22543
    }
22544
 
22545
    public Object getFieldValue(_Fields field) {
22546
      switch (field) {
22547
      case SCX:
22548
        return getScx();
22549
 
22550
      }
22551
      throw new IllegalStateException();
22552
    }
22553
 
22554
    public Object getFieldValue(int fieldId) {
22555
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22556
    }
22557
 
22558
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22559
    public boolean isSet(_Fields field) {
22560
      switch (field) {
22561
      case SCX:
22562
        return isSetScx();
22563
      }
22564
      throw new IllegalStateException();
22565
    }
22566
 
22567
    public boolean isSet(int fieldID) {
22568
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22569
    }
22570
 
22571
    @Override
22572
    public boolean equals(Object that) {
22573
      if (that == null)
22574
        return false;
22575
      if (that instanceof changeItemStatus_result)
22576
        return this.equals((changeItemStatus_result)that);
22577
      return false;
22578
    }
22579
 
22580
    public boolean equals(changeItemStatus_result that) {
22581
      if (that == null)
22582
        return false;
22583
 
22584
      boolean this_present_scx = true && this.isSetScx();
22585
      boolean that_present_scx = true && that.isSetScx();
22586
      if (this_present_scx || that_present_scx) {
22587
        if (!(this_present_scx && that_present_scx))
22588
          return false;
22589
        if (!this.scx.equals(that.scx))
22590
          return false;
22591
      }
22592
 
22593
      return true;
22594
    }
22595
 
22596
    @Override
22597
    public int hashCode() {
22598
      return 0;
22599
    }
22600
 
22601
    public int compareTo(changeItemStatus_result other) {
22602
      if (!getClass().equals(other.getClass())) {
22603
        return getClass().getName().compareTo(other.getClass().getName());
22604
      }
22605
 
22606
      int lastComparison = 0;
22607
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
22608
 
22609
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22610
      if (lastComparison != 0) {
22611
        return lastComparison;
22612
      }
22613
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22614
      if (lastComparison != 0) {
22615
        return lastComparison;
22616
      }
22617
      return 0;
22618
    }
22619
 
22620
    public void read(TProtocol iprot) throws TException {
22621
      TField field;
22622
      iprot.readStructBegin();
22623
      while (true)
22624
      {
22625
        field = iprot.readFieldBegin();
22626
        if (field.type == TType.STOP) { 
22627
          break;
22628
        }
22629
        _Fields fieldId = _Fields.findByThriftId(field.id);
22630
        if (fieldId == null) {
22631
          TProtocolUtil.skip(iprot, field.type);
22632
        } else {
22633
          switch (fieldId) {
22634
            case SCX:
22635
              if (field.type == TType.STRUCT) {
22636
                this.scx = new ShoppingCartException();
22637
                this.scx.read(iprot);
22638
              } else { 
22639
                TProtocolUtil.skip(iprot, field.type);
22640
              }
22641
              break;
22642
          }
22643
          iprot.readFieldEnd();
22644
        }
22645
      }
22646
      iprot.readStructEnd();
22647
      validate();
22648
    }
22649
 
22650
    public void write(TProtocol oprot) throws TException {
22651
      oprot.writeStructBegin(STRUCT_DESC);
22652
 
22653
      if (this.isSetScx()) {
22654
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22655
        this.scx.write(oprot);
22656
        oprot.writeFieldEnd();
22657
      }
22658
      oprot.writeFieldStop();
22659
      oprot.writeStructEnd();
22660
    }
22661
 
22662
    @Override
22663
    public String toString() {
22664
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
22665
      boolean first = true;
22666
 
22667
      sb.append("scx:");
22668
      if (this.scx == null) {
22669
        sb.append("null");
22670
      } else {
22671
        sb.append(this.scx);
22672
      }
22673
      first = false;
22674
      sb.append(")");
22675
      return sb.toString();
22676
    }
22677
 
22678
    public void validate() throws TException {
22679
      // check for required fields
22680
    }
22681
 
22682
  }
22683
 
22684
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
22685
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
22686
 
22687
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22688
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
22689
 
22690
    private long cartId;
22691
    private long addressId;
22692
 
22693
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22694
    public enum _Fields implements TFieldIdEnum {
22695
      CART_ID((short)1, "cartId"),
22696
      ADDRESS_ID((short)2, "addressId");
22697
 
22698
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22699
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22700
 
22701
      static {
22702
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22703
          byId.put((int)field._thriftId, field);
22704
          byName.put(field.getFieldName(), field);
22705
        }
22706
      }
22707
 
22708
      /**
22709
       * Find the _Fields constant that matches fieldId, or null if its not found.
22710
       */
22711
      public static _Fields findByThriftId(int fieldId) {
22712
        return byId.get(fieldId);
22713
      }
22714
 
22715
      /**
22716
       * Find the _Fields constant that matches fieldId, throwing an exception
22717
       * if it is not found.
22718
       */
22719
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22720
        _Fields fields = findByThriftId(fieldId);
22721
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22722
        return fields;
22723
      }
22724
 
22725
      /**
22726
       * Find the _Fields constant that matches name, or null if its not found.
22727
       */
22728
      public static _Fields findByName(String name) {
22729
        return byName.get(name);
22730
      }
22731
 
22732
      private final short _thriftId;
22733
      private final String _fieldName;
22734
 
22735
      _Fields(short thriftId, String fieldName) {
22736
        _thriftId = thriftId;
22737
        _fieldName = fieldName;
22738
      }
22739
 
22740
      public short getThriftFieldId() {
22741
        return _thriftId;
22742
      }
22743
 
22744
      public String getFieldName() {
22745
        return _fieldName;
22746
      }
22747
    }
22748
 
22749
    // isset id assignments
22750
    private static final int __CARTID_ISSET_ID = 0;
22751
    private static final int __ADDRESSID_ISSET_ID = 1;
22752
    private BitSet __isset_bit_vector = new BitSet(2);
22753
 
22754
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22755
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22756
          new FieldValueMetaData(TType.I64)));
22757
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
22758
          new FieldValueMetaData(TType.I64)));
22759
    }});
22760
 
22761
    static {
22762
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
22763
    }
22764
 
22765
    public addAddressToCart_args() {
22766
    }
22767
 
22768
    public addAddressToCart_args(
22769
      long cartId,
22770
      long addressId)
22771
    {
22772
      this();
22773
      this.cartId = cartId;
22774
      setCartIdIsSet(true);
22775
      this.addressId = addressId;
22776
      setAddressIdIsSet(true);
22777
    }
22778
 
22779
    /**
22780
     * Performs a deep copy on <i>other</i>.
22781
     */
22782
    public addAddressToCart_args(addAddressToCart_args other) {
22783
      __isset_bit_vector.clear();
22784
      __isset_bit_vector.or(other.__isset_bit_vector);
22785
      this.cartId = other.cartId;
22786
      this.addressId = other.addressId;
22787
    }
22788
 
22789
    public addAddressToCart_args deepCopy() {
22790
      return new addAddressToCart_args(this);
22791
    }
22792
 
22793
    @Deprecated
22794
    public addAddressToCart_args clone() {
22795
      return new addAddressToCart_args(this);
22796
    }
22797
 
22798
    public long getCartId() {
22799
      return this.cartId;
22800
    }
22801
 
22802
    public addAddressToCart_args setCartId(long cartId) {
22803
      this.cartId = cartId;
22804
      setCartIdIsSet(true);
22805
      return this;
22806
    }
22807
 
22808
    public void unsetCartId() {
22809
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
22810
    }
22811
 
22812
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22813
    public boolean isSetCartId() {
22814
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
22815
    }
22816
 
22817
    public void setCartIdIsSet(boolean value) {
22818
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
22819
    }
22820
 
22821
    public long getAddressId() {
22822
      return this.addressId;
22823
    }
22824
 
22825
    public addAddressToCart_args setAddressId(long addressId) {
22826
      this.addressId = addressId;
22827
      setAddressIdIsSet(true);
22828
      return this;
22829
    }
22830
 
22831
    public void unsetAddressId() {
22832
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
22833
    }
22834
 
22835
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
22836
    public boolean isSetAddressId() {
22837
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
22838
    }
22839
 
22840
    public void setAddressIdIsSet(boolean value) {
22841
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
22842
    }
22843
 
22844
    public void setFieldValue(_Fields field, Object value) {
22845
      switch (field) {
22846
      case CART_ID:
22847
        if (value == null) {
22848
          unsetCartId();
22849
        } else {
22850
          setCartId((Long)value);
22851
        }
22852
        break;
22853
 
22854
      case ADDRESS_ID:
22855
        if (value == null) {
22856
          unsetAddressId();
22857
        } else {
22858
          setAddressId((Long)value);
22859
        }
22860
        break;
22861
 
22862
      }
22863
    }
22864
 
22865
    public void setFieldValue(int fieldID, Object value) {
22866
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22867
    }
22868
 
22869
    public Object getFieldValue(_Fields field) {
22870
      switch (field) {
22871
      case CART_ID:
22872
        return new Long(getCartId());
22873
 
22874
      case ADDRESS_ID:
22875
        return new Long(getAddressId());
22876
 
22877
      }
22878
      throw new IllegalStateException();
22879
    }
22880
 
22881
    public Object getFieldValue(int fieldId) {
22882
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22883
    }
22884
 
22885
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22886
    public boolean isSet(_Fields field) {
22887
      switch (field) {
22888
      case CART_ID:
22889
        return isSetCartId();
22890
      case ADDRESS_ID:
22891
        return isSetAddressId();
22892
      }
22893
      throw new IllegalStateException();
22894
    }
22895
 
22896
    public boolean isSet(int fieldID) {
22897
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22898
    }
22899
 
22900
    @Override
22901
    public boolean equals(Object that) {
22902
      if (that == null)
22903
        return false;
22904
      if (that instanceof addAddressToCart_args)
22905
        return this.equals((addAddressToCart_args)that);
22906
      return false;
22907
    }
22908
 
22909
    public boolean equals(addAddressToCart_args that) {
22910
      if (that == null)
22911
        return false;
22912
 
22913
      boolean this_present_cartId = true;
22914
      boolean that_present_cartId = true;
22915
      if (this_present_cartId || that_present_cartId) {
22916
        if (!(this_present_cartId && that_present_cartId))
22917
          return false;
22918
        if (this.cartId != that.cartId)
22919
          return false;
22920
      }
22921
 
22922
      boolean this_present_addressId = true;
22923
      boolean that_present_addressId = true;
22924
      if (this_present_addressId || that_present_addressId) {
22925
        if (!(this_present_addressId && that_present_addressId))
22926
          return false;
22927
        if (this.addressId != that.addressId)
22928
          return false;
22929
      }
22930
 
22931
      return true;
22932
    }
22933
 
22934
    @Override
22935
    public int hashCode() {
22936
      return 0;
22937
    }
22938
 
22939
    public int compareTo(addAddressToCart_args other) {
22940
      if (!getClass().equals(other.getClass())) {
22941
        return getClass().getName().compareTo(other.getClass().getName());
22942
      }
22943
 
22944
      int lastComparison = 0;
22945
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
22946
 
22947
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
22948
      if (lastComparison != 0) {
22949
        return lastComparison;
22950
      }
22951
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
22952
      if (lastComparison != 0) {
22953
        return lastComparison;
22954
      }
22955
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
22956
      if (lastComparison != 0) {
22957
        return lastComparison;
22958
      }
22959
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
22960
      if (lastComparison != 0) {
22961
        return lastComparison;
22962
      }
22963
      return 0;
22964
    }
22965
 
22966
    public void read(TProtocol iprot) throws TException {
22967
      TField field;
22968
      iprot.readStructBegin();
22969
      while (true)
22970
      {
22971
        field = iprot.readFieldBegin();
22972
        if (field.type == TType.STOP) { 
22973
          break;
22974
        }
22975
        _Fields fieldId = _Fields.findByThriftId(field.id);
22976
        if (fieldId == null) {
22977
          TProtocolUtil.skip(iprot, field.type);
22978
        } else {
22979
          switch (fieldId) {
22980
            case CART_ID:
22981
              if (field.type == TType.I64) {
22982
                this.cartId = iprot.readI64();
22983
                setCartIdIsSet(true);
22984
              } else { 
22985
                TProtocolUtil.skip(iprot, field.type);
22986
              }
22987
              break;
22988
            case ADDRESS_ID:
22989
              if (field.type == TType.I64) {
22990
                this.addressId = iprot.readI64();
22991
                setAddressIdIsSet(true);
22992
              } else { 
22993
                TProtocolUtil.skip(iprot, field.type);
22994
              }
22995
              break;
22996
          }
22997
          iprot.readFieldEnd();
22998
        }
22999
      }
23000
      iprot.readStructEnd();
23001
      validate();
23002
    }
23003
 
23004
    public void write(TProtocol oprot) throws TException {
23005
      validate();
23006
 
23007
      oprot.writeStructBegin(STRUCT_DESC);
23008
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23009
      oprot.writeI64(this.cartId);
23010
      oprot.writeFieldEnd();
23011
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
23012
      oprot.writeI64(this.addressId);
23013
      oprot.writeFieldEnd();
23014
      oprot.writeFieldStop();
23015
      oprot.writeStructEnd();
23016
    }
23017
 
23018
    @Override
23019
    public String toString() {
23020
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
23021
      boolean first = true;
23022
 
23023
      sb.append("cartId:");
23024
      sb.append(this.cartId);
23025
      first = false;
23026
      if (!first) sb.append(", ");
23027
      sb.append("addressId:");
23028
      sb.append(this.addressId);
23029
      first = false;
23030
      sb.append(")");
23031
      return sb.toString();
23032
    }
23033
 
23034
    public void validate() throws TException {
23035
      // check for required fields
23036
    }
23037
 
23038
  }
23039
 
23040
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
23041
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
23042
 
578 chandransh 23043
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 23044
 
578 chandransh 23045
    private ShoppingCartException scx;
553 chandransh 23046
 
23047
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23048
    public enum _Fields implements TFieldIdEnum {
578 chandransh 23049
      SCX((short)1, "scx");
553 chandransh 23050
 
23051
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23052
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23053
 
23054
      static {
23055
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23056
          byId.put((int)field._thriftId, field);
23057
          byName.put(field.getFieldName(), field);
23058
        }
23059
      }
23060
 
23061
      /**
23062
       * Find the _Fields constant that matches fieldId, or null if its not found.
23063
       */
23064
      public static _Fields findByThriftId(int fieldId) {
23065
        return byId.get(fieldId);
23066
      }
23067
 
23068
      /**
23069
       * Find the _Fields constant that matches fieldId, throwing an exception
23070
       * if it is not found.
23071
       */
23072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23073
        _Fields fields = findByThriftId(fieldId);
23074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23075
        return fields;
23076
      }
23077
 
23078
      /**
23079
       * Find the _Fields constant that matches name, or null if its not found.
23080
       */
23081
      public static _Fields findByName(String name) {
23082
        return byName.get(name);
23083
      }
23084
 
23085
      private final short _thriftId;
23086
      private final String _fieldName;
23087
 
23088
      _Fields(short thriftId, String fieldName) {
23089
        _thriftId = thriftId;
23090
        _fieldName = fieldName;
23091
      }
23092
 
23093
      public short getThriftFieldId() {
23094
        return _thriftId;
23095
      }
23096
 
23097
      public String getFieldName() {
23098
        return _fieldName;
23099
      }
23100
    }
578 chandransh 23101
 
23102
    // isset id assignments
23103
 
553 chandransh 23104
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 23105
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23106
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 23107
    }});
23108
 
23109
    static {
23110
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
23111
    }
23112
 
23113
    public addAddressToCart_result() {
23114
    }
23115
 
578 chandransh 23116
    public addAddressToCart_result(
23117
      ShoppingCartException scx)
23118
    {
23119
      this();
23120
      this.scx = scx;
23121
    }
23122
 
553 chandransh 23123
    /**
23124
     * Performs a deep copy on <i>other</i>.
23125
     */
23126
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 23127
      if (other.isSetScx()) {
23128
        this.scx = new ShoppingCartException(other.scx);
23129
      }
553 chandransh 23130
    }
23131
 
23132
    public addAddressToCart_result deepCopy() {
23133
      return new addAddressToCart_result(this);
23134
    }
23135
 
23136
    @Deprecated
23137
    public addAddressToCart_result clone() {
23138
      return new addAddressToCart_result(this);
23139
    }
23140
 
578 chandransh 23141
    public ShoppingCartException getScx() {
23142
      return this.scx;
23143
    }
23144
 
23145
    public addAddressToCart_result setScx(ShoppingCartException scx) {
23146
      this.scx = scx;
23147
      return this;
23148
    }
23149
 
23150
    public void unsetScx() {
23151
      this.scx = null;
23152
    }
23153
 
23154
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23155
    public boolean isSetScx() {
23156
      return this.scx != null;
23157
    }
23158
 
23159
    public void setScxIsSet(boolean value) {
23160
      if (!value) {
23161
        this.scx = null;
23162
      }
23163
    }
23164
 
553 chandransh 23165
    public void setFieldValue(_Fields field, Object value) {
23166
      switch (field) {
578 chandransh 23167
      case SCX:
23168
        if (value == null) {
23169
          unsetScx();
23170
        } else {
23171
          setScx((ShoppingCartException)value);
23172
        }
23173
        break;
23174
 
553 chandransh 23175
      }
23176
    }
23177
 
23178
    public void setFieldValue(int fieldID, Object value) {
23179
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23180
    }
23181
 
23182
    public Object getFieldValue(_Fields field) {
23183
      switch (field) {
578 chandransh 23184
      case SCX:
23185
        return getScx();
23186
 
553 chandransh 23187
      }
23188
      throw new IllegalStateException();
23189
    }
23190
 
23191
    public Object getFieldValue(int fieldId) {
23192
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23193
    }
23194
 
23195
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23196
    public boolean isSet(_Fields field) {
23197
      switch (field) {
578 chandransh 23198
      case SCX:
23199
        return isSetScx();
553 chandransh 23200
      }
23201
      throw new IllegalStateException();
23202
    }
23203
 
23204
    public boolean isSet(int fieldID) {
23205
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23206
    }
23207
 
23208
    @Override
23209
    public boolean equals(Object that) {
23210
      if (that == null)
23211
        return false;
23212
      if (that instanceof addAddressToCart_result)
23213
        return this.equals((addAddressToCart_result)that);
23214
      return false;
23215
    }
23216
 
23217
    public boolean equals(addAddressToCart_result that) {
23218
      if (that == null)
23219
        return false;
23220
 
578 chandransh 23221
      boolean this_present_scx = true && this.isSetScx();
23222
      boolean that_present_scx = true && that.isSetScx();
23223
      if (this_present_scx || that_present_scx) {
23224
        if (!(this_present_scx && that_present_scx))
23225
          return false;
23226
        if (!this.scx.equals(that.scx))
23227
          return false;
23228
      }
23229
 
553 chandransh 23230
      return true;
23231
    }
23232
 
23233
    @Override
23234
    public int hashCode() {
23235
      return 0;
23236
    }
23237
 
23238
    public int compareTo(addAddressToCart_result other) {
23239
      if (!getClass().equals(other.getClass())) {
23240
        return getClass().getName().compareTo(other.getClass().getName());
23241
      }
23242
 
23243
      int lastComparison = 0;
23244
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
23245
 
578 chandransh 23246
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23247
      if (lastComparison != 0) {
23248
        return lastComparison;
23249
      }
23250
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23251
      if (lastComparison != 0) {
23252
        return lastComparison;
23253
      }
553 chandransh 23254
      return 0;
23255
    }
23256
 
23257
    public void read(TProtocol iprot) throws TException {
23258
      TField field;
23259
      iprot.readStructBegin();
23260
      while (true)
23261
      {
23262
        field = iprot.readFieldBegin();
23263
        if (field.type == TType.STOP) { 
23264
          break;
23265
        }
23266
        _Fields fieldId = _Fields.findByThriftId(field.id);
23267
        if (fieldId == null) {
23268
          TProtocolUtil.skip(iprot, field.type);
23269
        } else {
23270
          switch (fieldId) {
578 chandransh 23271
            case SCX:
23272
              if (field.type == TType.STRUCT) {
23273
                this.scx = new ShoppingCartException();
23274
                this.scx.read(iprot);
23275
              } else { 
23276
                TProtocolUtil.skip(iprot, field.type);
23277
              }
23278
              break;
553 chandransh 23279
          }
23280
          iprot.readFieldEnd();
23281
        }
23282
      }
23283
      iprot.readStructEnd();
23284
      validate();
23285
    }
23286
 
23287
    public void write(TProtocol oprot) throws TException {
23288
      oprot.writeStructBegin(STRUCT_DESC);
23289
 
578 chandransh 23290
      if (this.isSetScx()) {
23291
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23292
        this.scx.write(oprot);
23293
        oprot.writeFieldEnd();
23294
      }
553 chandransh 23295
      oprot.writeFieldStop();
23296
      oprot.writeStructEnd();
23297
    }
23298
 
23299
    @Override
23300
    public String toString() {
23301
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
23302
      boolean first = true;
23303
 
578 chandransh 23304
      sb.append("scx:");
23305
      if (this.scx == null) {
23306
        sb.append("null");
23307
      } else {
23308
        sb.append(this.scx);
23309
      }
23310
      first = false;
553 chandransh 23311
      sb.append(")");
23312
      return sb.toString();
23313
    }
23314
 
23315
    public void validate() throws TException {
23316
      // check for required fields
23317
    }
23318
 
23319
  }
23320
 
688 chandransh 23321
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
23322
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 23323
 
23324
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23325
 
23326
    private long cartId;
23327
 
23328
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23329
    public enum _Fields implements TFieldIdEnum {
23330
      CART_ID((short)1, "cartId");
23331
 
23332
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23333
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23334
 
23335
      static {
23336
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23337
          byId.put((int)field._thriftId, field);
23338
          byName.put(field.getFieldName(), field);
23339
        }
23340
      }
23341
 
23342
      /**
23343
       * Find the _Fields constant that matches fieldId, or null if its not found.
23344
       */
23345
      public static _Fields findByThriftId(int fieldId) {
23346
        return byId.get(fieldId);
23347
      }
23348
 
23349
      /**
23350
       * Find the _Fields constant that matches fieldId, throwing an exception
23351
       * if it is not found.
23352
       */
23353
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23354
        _Fields fields = findByThriftId(fieldId);
23355
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23356
        return fields;
23357
      }
23358
 
23359
      /**
23360
       * Find the _Fields constant that matches name, or null if its not found.
23361
       */
23362
      public static _Fields findByName(String name) {
23363
        return byName.get(name);
23364
      }
23365
 
23366
      private final short _thriftId;
23367
      private final String _fieldName;
23368
 
23369
      _Fields(short thriftId, String fieldName) {
23370
        _thriftId = thriftId;
23371
        _fieldName = fieldName;
23372
      }
23373
 
23374
      public short getThriftFieldId() {
23375
        return _thriftId;
23376
      }
23377
 
23378
      public String getFieldName() {
23379
        return _fieldName;
23380
      }
23381
    }
23382
 
23383
    // isset id assignments
23384
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 23385
    private BitSet __isset_bit_vector = new BitSet(1);
23386
 
23387
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23388
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 23389
          new FieldValueMetaData(TType.I64)));
23390
    }});
23391
 
23392
    static {
688 chandransh 23393
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 23394
    }
23395
 
688 chandransh 23396
    public createOrders_args() {
48 ashish 23397
    }
23398
 
688 chandransh 23399
    public createOrders_args(
553 chandransh 23400
      long cartId)
48 ashish 23401
    {
23402
      this();
553 chandransh 23403
      this.cartId = cartId;
23404
      setCartIdIsSet(true);
48 ashish 23405
    }
23406
 
23407
    /**
23408
     * Performs a deep copy on <i>other</i>.
23409
     */
688 chandransh 23410
    public createOrders_args(createOrders_args other) {
48 ashish 23411
      __isset_bit_vector.clear();
23412
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23413
      this.cartId = other.cartId;
48 ashish 23414
    }
23415
 
688 chandransh 23416
    public createOrders_args deepCopy() {
23417
      return new createOrders_args(this);
48 ashish 23418
    }
23419
 
23420
    @Deprecated
688 chandransh 23421
    public createOrders_args clone() {
23422
      return new createOrders_args(this);
48 ashish 23423
    }
23424
 
553 chandransh 23425
    public long getCartId() {
23426
      return this.cartId;
48 ashish 23427
    }
23428
 
688 chandransh 23429
    public createOrders_args setCartId(long cartId) {
553 chandransh 23430
      this.cartId = cartId;
23431
      setCartIdIsSet(true);
48 ashish 23432
      return this;
23433
    }
23434
 
553 chandransh 23435
    public void unsetCartId() {
23436
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 23437
    }
23438
 
553 chandransh 23439
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23440
    public boolean isSetCartId() {
23441
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 23442
    }
23443
 
553 chandransh 23444
    public void setCartIdIsSet(boolean value) {
23445
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 23446
    }
23447
 
23448
    public void setFieldValue(_Fields field, Object value) {
23449
      switch (field) {
553 chandransh 23450
      case CART_ID:
48 ashish 23451
        if (value == null) {
553 chandransh 23452
          unsetCartId();
48 ashish 23453
        } else {
553 chandransh 23454
          setCartId((Long)value);
48 ashish 23455
        }
23456
        break;
23457
 
23458
      }
23459
    }
23460
 
23461
    public void setFieldValue(int fieldID, Object value) {
23462
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23463
    }
23464
 
23465
    public Object getFieldValue(_Fields field) {
23466
      switch (field) {
553 chandransh 23467
      case CART_ID:
23468
        return new Long(getCartId());
48 ashish 23469
 
23470
      }
23471
      throw new IllegalStateException();
23472
    }
23473
 
23474
    public Object getFieldValue(int fieldId) {
23475
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23476
    }
23477
 
23478
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23479
    public boolean isSet(_Fields field) {
23480
      switch (field) {
553 chandransh 23481
      case CART_ID:
23482
        return isSetCartId();
48 ashish 23483
      }
23484
      throw new IllegalStateException();
23485
    }
23486
 
23487
    public boolean isSet(int fieldID) {
23488
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23489
    }
23490
 
23491
    @Override
23492
    public boolean equals(Object that) {
23493
      if (that == null)
23494
        return false;
688 chandransh 23495
      if (that instanceof createOrders_args)
23496
        return this.equals((createOrders_args)that);
48 ashish 23497
      return false;
23498
    }
23499
 
688 chandransh 23500
    public boolean equals(createOrders_args that) {
48 ashish 23501
      if (that == null)
23502
        return false;
23503
 
553 chandransh 23504
      boolean this_present_cartId = true;
23505
      boolean that_present_cartId = true;
23506
      if (this_present_cartId || that_present_cartId) {
23507
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23508
          return false;
553 chandransh 23509
        if (this.cartId != that.cartId)
48 ashish 23510
          return false;
23511
      }
23512
 
23513
      return true;
23514
    }
23515
 
23516
    @Override
23517
    public int hashCode() {
23518
      return 0;
23519
    }
23520
 
688 chandransh 23521
    public int compareTo(createOrders_args other) {
48 ashish 23522
      if (!getClass().equals(other.getClass())) {
23523
        return getClass().getName().compareTo(other.getClass().getName());
23524
      }
23525
 
23526
      int lastComparison = 0;
688 chandransh 23527
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 23528
 
553 chandransh 23529
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23530
      if (lastComparison != 0) {
23531
        return lastComparison;
23532
      }
553 chandransh 23533
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23534
      if (lastComparison != 0) {
23535
        return lastComparison;
23536
      }
23537
      return 0;
23538
    }
23539
 
23540
    public void read(TProtocol iprot) throws TException {
23541
      TField field;
23542
      iprot.readStructBegin();
23543
      while (true)
23544
      {
23545
        field = iprot.readFieldBegin();
23546
        if (field.type == TType.STOP) { 
23547
          break;
23548
        }
23549
        _Fields fieldId = _Fields.findByThriftId(field.id);
23550
        if (fieldId == null) {
23551
          TProtocolUtil.skip(iprot, field.type);
23552
        } else {
23553
          switch (fieldId) {
553 chandransh 23554
            case CART_ID:
48 ashish 23555
              if (field.type == TType.I64) {
553 chandransh 23556
                this.cartId = iprot.readI64();
23557
                setCartIdIsSet(true);
48 ashish 23558
              } else { 
23559
                TProtocolUtil.skip(iprot, field.type);
23560
              }
23561
              break;
23562
          }
23563
          iprot.readFieldEnd();
23564
        }
23565
      }
23566
      iprot.readStructEnd();
23567
      validate();
23568
    }
23569
 
23570
    public void write(TProtocol oprot) throws TException {
23571
      validate();
23572
 
23573
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23574
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23575
      oprot.writeI64(this.cartId);
48 ashish 23576
      oprot.writeFieldEnd();
23577
      oprot.writeFieldStop();
23578
      oprot.writeStructEnd();
23579
    }
23580
 
23581
    @Override
23582
    public String toString() {
688 chandransh 23583
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 23584
      boolean first = true;
23585
 
553 chandransh 23586
      sb.append("cartId:");
23587
      sb.append(this.cartId);
48 ashish 23588
      first = false;
23589
      sb.append(")");
23590
      return sb.toString();
23591
    }
23592
 
23593
    public void validate() throws TException {
23594
      // check for required fields
23595
    }
23596
 
23597
  }
23598
 
688 chandransh 23599
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
23600
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 23601
 
578 chandransh 23602
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 23603
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23604
 
578 chandransh 23605
    private long success;
553 chandransh 23606
    private ShoppingCartException scx;
48 ashish 23607
 
23608
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23609
    public enum _Fields implements TFieldIdEnum {
23610
      SUCCESS((short)0, "success"),
553 chandransh 23611
      SCX((short)1, "scx");
48 ashish 23612
 
23613
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23614
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23615
 
23616
      static {
23617
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23618
          byId.put((int)field._thriftId, field);
23619
          byName.put(field.getFieldName(), field);
23620
        }
23621
      }
23622
 
23623
      /**
23624
       * Find the _Fields constant that matches fieldId, or null if its not found.
23625
       */
23626
      public static _Fields findByThriftId(int fieldId) {
23627
        return byId.get(fieldId);
23628
      }
23629
 
23630
      /**
23631
       * Find the _Fields constant that matches fieldId, throwing an exception
23632
       * if it is not found.
23633
       */
23634
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23635
        _Fields fields = findByThriftId(fieldId);
23636
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23637
        return fields;
23638
      }
23639
 
23640
      /**
23641
       * Find the _Fields constant that matches name, or null if its not found.
23642
       */
23643
      public static _Fields findByName(String name) {
23644
        return byName.get(name);
23645
      }
23646
 
23647
      private final short _thriftId;
23648
      private final String _fieldName;
23649
 
23650
      _Fields(short thriftId, String fieldName) {
23651
        _thriftId = thriftId;
23652
        _fieldName = fieldName;
23653
      }
23654
 
23655
      public short getThriftFieldId() {
23656
        return _thriftId;
23657
      }
23658
 
23659
      public String getFieldName() {
23660
        return _fieldName;
23661
      }
23662
    }
23663
 
23664
    // isset id assignments
23665
    private static final int __SUCCESS_ISSET_ID = 0;
23666
    private BitSet __isset_bit_vector = new BitSet(1);
23667
 
23668
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23669
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 23670
          new FieldValueMetaData(TType.I64)));
553 chandransh 23671
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 23672
          new FieldValueMetaData(TType.STRUCT)));
23673
    }});
23674
 
23675
    static {
688 chandransh 23676
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 23677
    }
23678
 
688 chandransh 23679
    public createOrders_result() {
48 ashish 23680
    }
23681
 
688 chandransh 23682
    public createOrders_result(
578 chandransh 23683
      long success,
553 chandransh 23684
      ShoppingCartException scx)
48 ashish 23685
    {
23686
      this();
23687
      this.success = success;
23688
      setSuccessIsSet(true);
553 chandransh 23689
      this.scx = scx;
48 ashish 23690
    }
23691
 
23692
    /**
23693
     * Performs a deep copy on <i>other</i>.
23694
     */
688 chandransh 23695
    public createOrders_result(createOrders_result other) {
48 ashish 23696
      __isset_bit_vector.clear();
23697
      __isset_bit_vector.or(other.__isset_bit_vector);
23698
      this.success = other.success;
553 chandransh 23699
      if (other.isSetScx()) {
23700
        this.scx = new ShoppingCartException(other.scx);
48 ashish 23701
      }
23702
    }
23703
 
688 chandransh 23704
    public createOrders_result deepCopy() {
23705
      return new createOrders_result(this);
48 ashish 23706
    }
23707
 
23708
    @Deprecated
688 chandransh 23709
    public createOrders_result clone() {
23710
      return new createOrders_result(this);
48 ashish 23711
    }
23712
 
578 chandransh 23713
    public long getSuccess() {
48 ashish 23714
      return this.success;
23715
    }
23716
 
688 chandransh 23717
    public createOrders_result setSuccess(long success) {
48 ashish 23718
      this.success = success;
23719
      setSuccessIsSet(true);
23720
      return this;
23721
    }
23722
 
23723
    public void unsetSuccess() {
23724
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
23725
    }
23726
 
23727
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23728
    public boolean isSetSuccess() {
23729
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
23730
    }
23731
 
23732
    public void setSuccessIsSet(boolean value) {
23733
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
23734
    }
23735
 
553 chandransh 23736
    public ShoppingCartException getScx() {
23737
      return this.scx;
48 ashish 23738
    }
23739
 
688 chandransh 23740
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 23741
      this.scx = scx;
48 ashish 23742
      return this;
23743
    }
23744
 
553 chandransh 23745
    public void unsetScx() {
23746
      this.scx = null;
48 ashish 23747
    }
23748
 
553 chandransh 23749
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23750
    public boolean isSetScx() {
23751
      return this.scx != null;
48 ashish 23752
    }
23753
 
553 chandransh 23754
    public void setScxIsSet(boolean value) {
48 ashish 23755
      if (!value) {
553 chandransh 23756
        this.scx = null;
48 ashish 23757
      }
23758
    }
23759
 
23760
    public void setFieldValue(_Fields field, Object value) {
23761
      switch (field) {
23762
      case SUCCESS:
23763
        if (value == null) {
23764
          unsetSuccess();
23765
        } else {
578 chandransh 23766
          setSuccess((Long)value);
48 ashish 23767
        }
23768
        break;
23769
 
553 chandransh 23770
      case SCX:
48 ashish 23771
        if (value == null) {
553 chandransh 23772
          unsetScx();
48 ashish 23773
        } else {
553 chandransh 23774
          setScx((ShoppingCartException)value);
48 ashish 23775
        }
23776
        break;
23777
 
23778
      }
23779
    }
23780
 
23781
    public void setFieldValue(int fieldID, Object value) {
23782
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23783
    }
23784
 
23785
    public Object getFieldValue(_Fields field) {
23786
      switch (field) {
23787
      case SUCCESS:
578 chandransh 23788
        return new Long(getSuccess());
48 ashish 23789
 
553 chandransh 23790
      case SCX:
23791
        return getScx();
48 ashish 23792
 
23793
      }
23794
      throw new IllegalStateException();
23795
    }
23796
 
23797
    public Object getFieldValue(int fieldId) {
23798
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23799
    }
23800
 
23801
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23802
    public boolean isSet(_Fields field) {
23803
      switch (field) {
23804
      case SUCCESS:
23805
        return isSetSuccess();
553 chandransh 23806
      case SCX:
23807
        return isSetScx();
48 ashish 23808
      }
23809
      throw new IllegalStateException();
23810
    }
23811
 
23812
    public boolean isSet(int fieldID) {
23813
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23814
    }
23815
 
23816
    @Override
23817
    public boolean equals(Object that) {
23818
      if (that == null)
23819
        return false;
688 chandransh 23820
      if (that instanceof createOrders_result)
23821
        return this.equals((createOrders_result)that);
48 ashish 23822
      return false;
23823
    }
23824
 
688 chandransh 23825
    public boolean equals(createOrders_result that) {
48 ashish 23826
      if (that == null)
23827
        return false;
23828
 
23829
      boolean this_present_success = true;
23830
      boolean that_present_success = true;
23831
      if (this_present_success || that_present_success) {
23832
        if (!(this_present_success && that_present_success))
23833
          return false;
23834
        if (this.success != that.success)
23835
          return false;
23836
      }
23837
 
553 chandransh 23838
      boolean this_present_scx = true && this.isSetScx();
23839
      boolean that_present_scx = true && that.isSetScx();
23840
      if (this_present_scx || that_present_scx) {
23841
        if (!(this_present_scx && that_present_scx))
48 ashish 23842
          return false;
553 chandransh 23843
        if (!this.scx.equals(that.scx))
48 ashish 23844
          return false;
23845
      }
23846
 
23847
      return true;
23848
    }
23849
 
23850
    @Override
23851
    public int hashCode() {
23852
      return 0;
23853
    }
23854
 
688 chandransh 23855
    public int compareTo(createOrders_result other) {
48 ashish 23856
      if (!getClass().equals(other.getClass())) {
23857
        return getClass().getName().compareTo(other.getClass().getName());
23858
      }
23859
 
23860
      int lastComparison = 0;
688 chandransh 23861
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 23862
 
23863
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23864
      if (lastComparison != 0) {
23865
        return lastComparison;
23866
      }
23867
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23868
      if (lastComparison != 0) {
23869
        return lastComparison;
23870
      }
553 chandransh 23871
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 23872
      if (lastComparison != 0) {
23873
        return lastComparison;
23874
      }
553 chandransh 23875
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 23876
      if (lastComparison != 0) {
23877
        return lastComparison;
23878
      }
23879
      return 0;
23880
    }
23881
 
23882
    public void read(TProtocol iprot) throws TException {
23883
      TField field;
23884
      iprot.readStructBegin();
23885
      while (true)
23886
      {
23887
        field = iprot.readFieldBegin();
23888
        if (field.type == TType.STOP) { 
23889
          break;
23890
        }
23891
        _Fields fieldId = _Fields.findByThriftId(field.id);
23892
        if (fieldId == null) {
23893
          TProtocolUtil.skip(iprot, field.type);
23894
        } else {
23895
          switch (fieldId) {
23896
            case SUCCESS:
578 chandransh 23897
              if (field.type == TType.I64) {
23898
                this.success = iprot.readI64();
48 ashish 23899
                setSuccessIsSet(true);
23900
              } else { 
23901
                TProtocolUtil.skip(iprot, field.type);
23902
              }
23903
              break;
553 chandransh 23904
            case SCX:
48 ashish 23905
              if (field.type == TType.STRUCT) {
553 chandransh 23906
                this.scx = new ShoppingCartException();
23907
                this.scx.read(iprot);
48 ashish 23908
              } else { 
23909
                TProtocolUtil.skip(iprot, field.type);
23910
              }
23911
              break;
23912
          }
23913
          iprot.readFieldEnd();
23914
        }
23915
      }
23916
      iprot.readStructEnd();
23917
      validate();
23918
    }
23919
 
23920
    public void write(TProtocol oprot) throws TException {
23921
      oprot.writeStructBegin(STRUCT_DESC);
23922
 
23923
      if (this.isSetSuccess()) {
23924
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 23925
        oprot.writeI64(this.success);
48 ashish 23926
        oprot.writeFieldEnd();
553 chandransh 23927
      } else if (this.isSetScx()) {
23928
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23929
        this.scx.write(oprot);
48 ashish 23930
        oprot.writeFieldEnd();
23931
      }
23932
      oprot.writeFieldStop();
23933
      oprot.writeStructEnd();
23934
    }
23935
 
23936
    @Override
23937
    public String toString() {
688 chandransh 23938
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 23939
      boolean first = true;
23940
 
23941
      sb.append("success:");
23942
      sb.append(this.success);
23943
      first = false;
23944
      if (!first) sb.append(", ");
553 chandransh 23945
      sb.append("scx:");
23946
      if (this.scx == null) {
48 ashish 23947
        sb.append("null");
23948
      } else {
553 chandransh 23949
        sb.append(this.scx);
48 ashish 23950
      }
23951
      first = false;
23952
      sb.append(")");
23953
      return sb.toString();
23954
    }
23955
 
23956
    public void validate() throws TException {
23957
      // check for required fields
23958
    }
23959
 
23960
  }
23961
 
553 chandransh 23962
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
23963
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 23964
 
553 chandransh 23965
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 23966
 
553 chandransh 23967
    private long cartId;
48 ashish 23968
 
23969
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23970
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23971
      CART_ID((short)1, "cartId");
48 ashish 23972
 
23973
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23974
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23975
 
23976
      static {
23977
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23978
          byId.put((int)field._thriftId, field);
23979
          byName.put(field.getFieldName(), field);
23980
        }
23981
      }
23982
 
23983
      /**
23984
       * Find the _Fields constant that matches fieldId, or null if its not found.
23985
       */
23986
      public static _Fields findByThriftId(int fieldId) {
23987
        return byId.get(fieldId);
23988
      }
23989
 
23990
      /**
23991
       * Find the _Fields constant that matches fieldId, throwing an exception
23992
       * if it is not found.
23993
       */
23994
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23995
        _Fields fields = findByThriftId(fieldId);
23996
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23997
        return fields;
23998
      }
23999
 
24000
      /**
24001
       * Find the _Fields constant that matches name, or null if its not found.
24002
       */
24003
      public static _Fields findByName(String name) {
24004
        return byName.get(name);
24005
      }
24006
 
24007
      private final short _thriftId;
24008
      private final String _fieldName;
24009
 
24010
      _Fields(short thriftId, String fieldName) {
24011
        _thriftId = thriftId;
24012
        _fieldName = fieldName;
24013
      }
24014
 
24015
      public short getThriftFieldId() {
24016
        return _thriftId;
24017
      }
24018
 
24019
      public String getFieldName() {
24020
        return _fieldName;
24021
      }
24022
    }
24023
 
24024
    // isset id assignments
553 chandransh 24025
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24026
    private BitSet __isset_bit_vector = new BitSet(1);
24027
 
24028
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24029
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24030
          new FieldValueMetaData(TType.I64)));
24031
    }});
24032
 
24033
    static {
553 chandransh 24034
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 24035
    }
24036
 
553 chandransh 24037
    public validateCart_args() {
48 ashish 24038
    }
24039
 
553 chandransh 24040
    public validateCart_args(
24041
      long cartId)
48 ashish 24042
    {
24043
      this();
553 chandransh 24044
      this.cartId = cartId;
24045
      setCartIdIsSet(true);
48 ashish 24046
    }
24047
 
24048
    /**
24049
     * Performs a deep copy on <i>other</i>.
24050
     */
553 chandransh 24051
    public validateCart_args(validateCart_args other) {
48 ashish 24052
      __isset_bit_vector.clear();
24053
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24054
      this.cartId = other.cartId;
48 ashish 24055
    }
24056
 
553 chandransh 24057
    public validateCart_args deepCopy() {
24058
      return new validateCart_args(this);
48 ashish 24059
    }
24060
 
24061
    @Deprecated
553 chandransh 24062
    public validateCart_args clone() {
24063
      return new validateCart_args(this);
48 ashish 24064
    }
24065
 
553 chandransh 24066
    public long getCartId() {
24067
      return this.cartId;
48 ashish 24068
    }
24069
 
553 chandransh 24070
    public validateCart_args setCartId(long cartId) {
24071
      this.cartId = cartId;
24072
      setCartIdIsSet(true);
48 ashish 24073
      return this;
24074
    }
24075
 
553 chandransh 24076
    public void unsetCartId() {
24077
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24078
    }
24079
 
553 chandransh 24080
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24081
    public boolean isSetCartId() {
24082
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24083
    }
24084
 
553 chandransh 24085
    public void setCartIdIsSet(boolean value) {
24086
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24087
    }
24088
 
24089
    public void setFieldValue(_Fields field, Object value) {
24090
      switch (field) {
553 chandransh 24091
      case CART_ID:
48 ashish 24092
        if (value == null) {
553 chandransh 24093
          unsetCartId();
48 ashish 24094
        } else {
553 chandransh 24095
          setCartId((Long)value);
48 ashish 24096
        }
24097
        break;
24098
 
24099
      }
24100
    }
24101
 
24102
    public void setFieldValue(int fieldID, Object value) {
24103
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24104
    }
24105
 
24106
    public Object getFieldValue(_Fields field) {
24107
      switch (field) {
553 chandransh 24108
      case CART_ID:
24109
        return new Long(getCartId());
48 ashish 24110
 
24111
      }
24112
      throw new IllegalStateException();
24113
    }
24114
 
24115
    public Object getFieldValue(int fieldId) {
24116
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24117
    }
24118
 
24119
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24120
    public boolean isSet(_Fields field) {
24121
      switch (field) {
553 chandransh 24122
      case CART_ID:
24123
        return isSetCartId();
48 ashish 24124
      }
24125
      throw new IllegalStateException();
24126
    }
24127
 
24128
    public boolean isSet(int fieldID) {
24129
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24130
    }
24131
 
24132
    @Override
24133
    public boolean equals(Object that) {
24134
      if (that == null)
24135
        return false;
553 chandransh 24136
      if (that instanceof validateCart_args)
24137
        return this.equals((validateCart_args)that);
48 ashish 24138
      return false;
24139
    }
24140
 
553 chandransh 24141
    public boolean equals(validateCart_args that) {
48 ashish 24142
      if (that == null)
24143
        return false;
24144
 
553 chandransh 24145
      boolean this_present_cartId = true;
24146
      boolean that_present_cartId = true;
24147
      if (this_present_cartId || that_present_cartId) {
24148
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24149
          return false;
553 chandransh 24150
        if (this.cartId != that.cartId)
48 ashish 24151
          return false;
24152
      }
24153
 
24154
      return true;
24155
    }
24156
 
24157
    @Override
24158
    public int hashCode() {
24159
      return 0;
24160
    }
24161
 
553 chandransh 24162
    public int compareTo(validateCart_args other) {
48 ashish 24163
      if (!getClass().equals(other.getClass())) {
24164
        return getClass().getName().compareTo(other.getClass().getName());
24165
      }
24166
 
24167
      int lastComparison = 0;
553 chandransh 24168
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 24169
 
553 chandransh 24170
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24171
      if (lastComparison != 0) {
24172
        return lastComparison;
24173
      }
553 chandransh 24174
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24175
      if (lastComparison != 0) {
24176
        return lastComparison;
24177
      }
24178
      return 0;
24179
    }
24180
 
24181
    public void read(TProtocol iprot) throws TException {
24182
      TField field;
24183
      iprot.readStructBegin();
24184
      while (true)
24185
      {
24186
        field = iprot.readFieldBegin();
24187
        if (field.type == TType.STOP) { 
24188
          break;
24189
        }
24190
        _Fields fieldId = _Fields.findByThriftId(field.id);
24191
        if (fieldId == null) {
24192
          TProtocolUtil.skip(iprot, field.type);
24193
        } else {
24194
          switch (fieldId) {
553 chandransh 24195
            case CART_ID:
48 ashish 24196
              if (field.type == TType.I64) {
553 chandransh 24197
                this.cartId = iprot.readI64();
24198
                setCartIdIsSet(true);
48 ashish 24199
              } else { 
24200
                TProtocolUtil.skip(iprot, field.type);
24201
              }
24202
              break;
24203
          }
24204
          iprot.readFieldEnd();
24205
        }
24206
      }
24207
      iprot.readStructEnd();
24208
      validate();
24209
    }
24210
 
24211
    public void write(TProtocol oprot) throws TException {
24212
      validate();
24213
 
24214
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24215
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24216
      oprot.writeI64(this.cartId);
48 ashish 24217
      oprot.writeFieldEnd();
24218
      oprot.writeFieldStop();
24219
      oprot.writeStructEnd();
24220
    }
24221
 
24222
    @Override
24223
    public String toString() {
553 chandransh 24224
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 24225
      boolean first = true;
24226
 
553 chandransh 24227
      sb.append("cartId:");
24228
      sb.append(this.cartId);
48 ashish 24229
      first = false;
24230
      sb.append(")");
24231
      return sb.toString();
24232
    }
24233
 
24234
    public void validate() throws TException {
24235
      // check for required fields
24236
    }
24237
 
24238
  }
24239
 
553 chandransh 24240
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
24241
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 24242
 
24243
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 24244
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 24245
 
24246
    private boolean success;
578 chandransh 24247
    private ShoppingCartException scex;
48 ashish 24248
 
24249
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24250
    public enum _Fields implements TFieldIdEnum {
578 chandransh 24251
      SUCCESS((short)0, "success"),
24252
      SCEX((short)1, "scex");
48 ashish 24253
 
24254
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24255
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24256
 
24257
      static {
24258
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24259
          byId.put((int)field._thriftId, field);
24260
          byName.put(field.getFieldName(), field);
24261
        }
24262
      }
24263
 
24264
      /**
24265
       * Find the _Fields constant that matches fieldId, or null if its not found.
24266
       */
24267
      public static _Fields findByThriftId(int fieldId) {
24268
        return byId.get(fieldId);
24269
      }
24270
 
24271
      /**
24272
       * Find the _Fields constant that matches fieldId, throwing an exception
24273
       * if it is not found.
24274
       */
24275
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24276
        _Fields fields = findByThriftId(fieldId);
24277
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24278
        return fields;
24279
      }
24280
 
24281
      /**
24282
       * Find the _Fields constant that matches name, or null if its not found.
24283
       */
24284
      public static _Fields findByName(String name) {
24285
        return byName.get(name);
24286
      }
24287
 
24288
      private final short _thriftId;
24289
      private final String _fieldName;
24290
 
24291
      _Fields(short thriftId, String fieldName) {
24292
        _thriftId = thriftId;
24293
        _fieldName = fieldName;
24294
      }
24295
 
24296
      public short getThriftFieldId() {
24297
        return _thriftId;
24298
      }
24299
 
24300
      public String getFieldName() {
24301
        return _fieldName;
24302
      }
24303
    }
24304
 
24305
    // isset id assignments
24306
    private static final int __SUCCESS_ISSET_ID = 0;
24307
    private BitSet __isset_bit_vector = new BitSet(1);
24308
 
24309
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24310
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24311
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 24312
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
24313
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 24314
    }});
24315
 
24316
    static {
553 chandransh 24317
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 24318
    }
24319
 
553 chandransh 24320
    public validateCart_result() {
48 ashish 24321
    }
24322
 
553 chandransh 24323
    public validateCart_result(
578 chandransh 24324
      boolean success,
24325
      ShoppingCartException scex)
48 ashish 24326
    {
24327
      this();
24328
      this.success = success;
24329
      setSuccessIsSet(true);
578 chandransh 24330
      this.scex = scex;
48 ashish 24331
    }
24332
 
24333
    /**
24334
     * Performs a deep copy on <i>other</i>.
24335
     */
553 chandransh 24336
    public validateCart_result(validateCart_result other) {
48 ashish 24337
      __isset_bit_vector.clear();
24338
      __isset_bit_vector.or(other.__isset_bit_vector);
24339
      this.success = other.success;
578 chandransh 24340
      if (other.isSetScex()) {
24341
        this.scex = new ShoppingCartException(other.scex);
24342
      }
48 ashish 24343
    }
24344
 
553 chandransh 24345
    public validateCart_result deepCopy() {
24346
      return new validateCart_result(this);
48 ashish 24347
    }
24348
 
24349
    @Deprecated
553 chandransh 24350
    public validateCart_result clone() {
24351
      return new validateCart_result(this);
48 ashish 24352
    }
24353
 
24354
    public boolean isSuccess() {
24355
      return this.success;
24356
    }
24357
 
553 chandransh 24358
    public validateCart_result setSuccess(boolean success) {
48 ashish 24359
      this.success = success;
24360
      setSuccessIsSet(true);
24361
      return this;
24362
    }
24363
 
24364
    public void unsetSuccess() {
24365
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24366
    }
24367
 
24368
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24369
    public boolean isSetSuccess() {
24370
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24371
    }
24372
 
24373
    public void setSuccessIsSet(boolean value) {
24374
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24375
    }
24376
 
578 chandransh 24377
    public ShoppingCartException getScex() {
24378
      return this.scex;
24379
    }
24380
 
24381
    public validateCart_result setScex(ShoppingCartException scex) {
24382
      this.scex = scex;
24383
      return this;
24384
    }
24385
 
24386
    public void unsetScex() {
24387
      this.scex = null;
24388
    }
24389
 
24390
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
24391
    public boolean isSetScex() {
24392
      return this.scex != null;
24393
    }
24394
 
24395
    public void setScexIsSet(boolean value) {
24396
      if (!value) {
24397
        this.scex = null;
24398
      }
24399
    }
24400
 
553 chandransh 24401
    public void setFieldValue(_Fields field, Object value) {
24402
      switch (field) {
24403
      case SUCCESS:
24404
        if (value == null) {
24405
          unsetSuccess();
24406
        } else {
24407
          setSuccess((Boolean)value);
24408
        }
24409
        break;
24410
 
578 chandransh 24411
      case SCEX:
24412
        if (value == null) {
24413
          unsetScex();
24414
        } else {
24415
          setScex((ShoppingCartException)value);
24416
        }
24417
        break;
24418
 
553 chandransh 24419
      }
48 ashish 24420
    }
24421
 
553 chandransh 24422
    public void setFieldValue(int fieldID, Object value) {
24423
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24424
    }
24425
 
24426
    public Object getFieldValue(_Fields field) {
24427
      switch (field) {
24428
      case SUCCESS:
24429
        return new Boolean(isSuccess());
24430
 
578 chandransh 24431
      case SCEX:
24432
        return getScex();
24433
 
553 chandransh 24434
      }
24435
      throw new IllegalStateException();
24436
    }
24437
 
24438
    public Object getFieldValue(int fieldId) {
24439
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24440
    }
24441
 
24442
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24443
    public boolean isSet(_Fields field) {
24444
      switch (field) {
24445
      case SUCCESS:
24446
        return isSetSuccess();
578 chandransh 24447
      case SCEX:
24448
        return isSetScex();
553 chandransh 24449
      }
24450
      throw new IllegalStateException();
24451
    }
24452
 
24453
    public boolean isSet(int fieldID) {
24454
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24455
    }
24456
 
24457
    @Override
24458
    public boolean equals(Object that) {
24459
      if (that == null)
24460
        return false;
24461
      if (that instanceof validateCart_result)
24462
        return this.equals((validateCart_result)that);
24463
      return false;
24464
    }
24465
 
24466
    public boolean equals(validateCart_result that) {
24467
      if (that == null)
24468
        return false;
24469
 
24470
      boolean this_present_success = true;
24471
      boolean that_present_success = true;
24472
      if (this_present_success || that_present_success) {
24473
        if (!(this_present_success && that_present_success))
24474
          return false;
24475
        if (this.success != that.success)
24476
          return false;
24477
      }
24478
 
578 chandransh 24479
      boolean this_present_scex = true && this.isSetScex();
24480
      boolean that_present_scex = true && that.isSetScex();
24481
      if (this_present_scex || that_present_scex) {
24482
        if (!(this_present_scex && that_present_scex))
24483
          return false;
24484
        if (!this.scex.equals(that.scex))
24485
          return false;
24486
      }
24487
 
553 chandransh 24488
      return true;
24489
    }
24490
 
24491
    @Override
24492
    public int hashCode() {
24493
      return 0;
24494
    }
24495
 
24496
    public int compareTo(validateCart_result other) {
24497
      if (!getClass().equals(other.getClass())) {
24498
        return getClass().getName().compareTo(other.getClass().getName());
24499
      }
24500
 
24501
      int lastComparison = 0;
24502
      validateCart_result typedOther = (validateCart_result)other;
24503
 
24504
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24505
      if (lastComparison != 0) {
24506
        return lastComparison;
24507
      }
24508
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24509
      if (lastComparison != 0) {
24510
        return lastComparison;
24511
      }
578 chandransh 24512
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
24513
      if (lastComparison != 0) {
24514
        return lastComparison;
24515
      }
24516
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
24517
      if (lastComparison != 0) {
24518
        return lastComparison;
24519
      }
553 chandransh 24520
      return 0;
24521
    }
24522
 
24523
    public void read(TProtocol iprot) throws TException {
24524
      TField field;
24525
      iprot.readStructBegin();
24526
      while (true)
24527
      {
24528
        field = iprot.readFieldBegin();
24529
        if (field.type == TType.STOP) { 
24530
          break;
24531
        }
24532
        _Fields fieldId = _Fields.findByThriftId(field.id);
24533
        if (fieldId == null) {
24534
          TProtocolUtil.skip(iprot, field.type);
24535
        } else {
24536
          switch (fieldId) {
24537
            case SUCCESS:
24538
              if (field.type == TType.BOOL) {
24539
                this.success = iprot.readBool();
24540
                setSuccessIsSet(true);
24541
              } else { 
24542
                TProtocolUtil.skip(iprot, field.type);
24543
              }
24544
              break;
578 chandransh 24545
            case SCEX:
24546
              if (field.type == TType.STRUCT) {
24547
                this.scex = new ShoppingCartException();
24548
                this.scex.read(iprot);
24549
              } else { 
24550
                TProtocolUtil.skip(iprot, field.type);
24551
              }
24552
              break;
553 chandransh 24553
          }
24554
          iprot.readFieldEnd();
24555
        }
24556
      }
24557
      iprot.readStructEnd();
24558
      validate();
24559
    }
24560
 
24561
    public void write(TProtocol oprot) throws TException {
24562
      oprot.writeStructBegin(STRUCT_DESC);
24563
 
24564
      if (this.isSetSuccess()) {
24565
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24566
        oprot.writeBool(this.success);
24567
        oprot.writeFieldEnd();
578 chandransh 24568
      } else if (this.isSetScex()) {
24569
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
24570
        this.scex.write(oprot);
24571
        oprot.writeFieldEnd();
553 chandransh 24572
      }
24573
      oprot.writeFieldStop();
24574
      oprot.writeStructEnd();
24575
    }
24576
 
24577
    @Override
24578
    public String toString() {
24579
      StringBuilder sb = new StringBuilder("validateCart_result(");
24580
      boolean first = true;
24581
 
24582
      sb.append("success:");
24583
      sb.append(this.success);
24584
      first = false;
578 chandransh 24585
      if (!first) sb.append(", ");
24586
      sb.append("scex:");
24587
      if (this.scex == null) {
24588
        sb.append("null");
24589
      } else {
24590
        sb.append(this.scex);
24591
      }
24592
      first = false;
553 chandransh 24593
      sb.append(")");
24594
      return sb.toString();
24595
    }
24596
 
24597
    public void validate() throws TException {
24598
      // check for required fields
24599
    }
24600
 
24601
  }
24602
 
688 chandransh 24603
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
24604
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 24605
 
688 chandransh 24606
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
24607
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
24608
 
24609
    private long fromCartId;
24610
    private long toCartId;
24611
 
24612
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24613
    public enum _Fields implements TFieldIdEnum {
24614
      FROM_CART_ID((short)1, "fromCartId"),
24615
      TO_CART_ID((short)2, "toCartId");
24616
 
24617
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24618
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24619
 
24620
      static {
24621
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24622
          byId.put((int)field._thriftId, field);
24623
          byName.put(field.getFieldName(), field);
24624
        }
24625
      }
24626
 
24627
      /**
24628
       * Find the _Fields constant that matches fieldId, or null if its not found.
24629
       */
24630
      public static _Fields findByThriftId(int fieldId) {
24631
        return byId.get(fieldId);
24632
      }
24633
 
24634
      /**
24635
       * Find the _Fields constant that matches fieldId, throwing an exception
24636
       * if it is not found.
24637
       */
24638
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24639
        _Fields fields = findByThriftId(fieldId);
24640
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24641
        return fields;
24642
      }
24643
 
24644
      /**
24645
       * Find the _Fields constant that matches name, or null if its not found.
24646
       */
24647
      public static _Fields findByName(String name) {
24648
        return byName.get(name);
24649
      }
24650
 
24651
      private final short _thriftId;
24652
      private final String _fieldName;
24653
 
24654
      _Fields(short thriftId, String fieldName) {
24655
        _thriftId = thriftId;
24656
        _fieldName = fieldName;
24657
      }
24658
 
24659
      public short getThriftFieldId() {
24660
        return _thriftId;
24661
      }
24662
 
24663
      public String getFieldName() {
24664
        return _fieldName;
24665
      }
24666
    }
24667
 
24668
    // isset id assignments
24669
    private static final int __FROMCARTID_ISSET_ID = 0;
24670
    private static final int __TOCARTID_ISSET_ID = 1;
24671
    private BitSet __isset_bit_vector = new BitSet(2);
24672
 
24673
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24674
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
24675
          new FieldValueMetaData(TType.I64)));
24676
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
24677
          new FieldValueMetaData(TType.I64)));
24678
    }});
24679
 
24680
    static {
24681
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
24682
    }
24683
 
24684
    public mergeCart_args() {
24685
    }
24686
 
24687
    public mergeCart_args(
24688
      long fromCartId,
24689
      long toCartId)
24690
    {
24691
      this();
24692
      this.fromCartId = fromCartId;
24693
      setFromCartIdIsSet(true);
24694
      this.toCartId = toCartId;
24695
      setToCartIdIsSet(true);
24696
    }
24697
 
24698
    /**
24699
     * Performs a deep copy on <i>other</i>.
24700
     */
24701
    public mergeCart_args(mergeCart_args other) {
24702
      __isset_bit_vector.clear();
24703
      __isset_bit_vector.or(other.__isset_bit_vector);
24704
      this.fromCartId = other.fromCartId;
24705
      this.toCartId = other.toCartId;
24706
    }
24707
 
24708
    public mergeCart_args deepCopy() {
24709
      return new mergeCart_args(this);
24710
    }
24711
 
24712
    @Deprecated
24713
    public mergeCart_args clone() {
24714
      return new mergeCart_args(this);
24715
    }
24716
 
24717
    public long getFromCartId() {
24718
      return this.fromCartId;
24719
    }
24720
 
24721
    public mergeCart_args setFromCartId(long fromCartId) {
24722
      this.fromCartId = fromCartId;
24723
      setFromCartIdIsSet(true);
24724
      return this;
24725
    }
24726
 
24727
    public void unsetFromCartId() {
24728
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
24729
    }
24730
 
24731
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
24732
    public boolean isSetFromCartId() {
24733
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
24734
    }
24735
 
24736
    public void setFromCartIdIsSet(boolean value) {
24737
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
24738
    }
24739
 
24740
    public long getToCartId() {
24741
      return this.toCartId;
24742
    }
24743
 
24744
    public mergeCart_args setToCartId(long toCartId) {
24745
      this.toCartId = toCartId;
24746
      setToCartIdIsSet(true);
24747
      return this;
24748
    }
24749
 
24750
    public void unsetToCartId() {
24751
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
24752
    }
24753
 
24754
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
24755
    public boolean isSetToCartId() {
24756
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
24757
    }
24758
 
24759
    public void setToCartIdIsSet(boolean value) {
24760
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
24761
    }
24762
 
24763
    public void setFieldValue(_Fields field, Object value) {
24764
      switch (field) {
24765
      case FROM_CART_ID:
24766
        if (value == null) {
24767
          unsetFromCartId();
24768
        } else {
24769
          setFromCartId((Long)value);
24770
        }
24771
        break;
24772
 
24773
      case TO_CART_ID:
24774
        if (value == null) {
24775
          unsetToCartId();
24776
        } else {
24777
          setToCartId((Long)value);
24778
        }
24779
        break;
24780
 
24781
      }
24782
    }
24783
 
24784
    public void setFieldValue(int fieldID, Object value) {
24785
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24786
    }
24787
 
24788
    public Object getFieldValue(_Fields field) {
24789
      switch (field) {
24790
      case FROM_CART_ID:
24791
        return new Long(getFromCartId());
24792
 
24793
      case TO_CART_ID:
24794
        return new Long(getToCartId());
24795
 
24796
      }
24797
      throw new IllegalStateException();
24798
    }
24799
 
24800
    public Object getFieldValue(int fieldId) {
24801
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24802
    }
24803
 
24804
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24805
    public boolean isSet(_Fields field) {
24806
      switch (field) {
24807
      case FROM_CART_ID:
24808
        return isSetFromCartId();
24809
      case TO_CART_ID:
24810
        return isSetToCartId();
24811
      }
24812
      throw new IllegalStateException();
24813
    }
24814
 
24815
    public boolean isSet(int fieldID) {
24816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24817
    }
24818
 
24819
    @Override
24820
    public boolean equals(Object that) {
24821
      if (that == null)
24822
        return false;
24823
      if (that instanceof mergeCart_args)
24824
        return this.equals((mergeCart_args)that);
24825
      return false;
24826
    }
24827
 
24828
    public boolean equals(mergeCart_args that) {
24829
      if (that == null)
24830
        return false;
24831
 
24832
      boolean this_present_fromCartId = true;
24833
      boolean that_present_fromCartId = true;
24834
      if (this_present_fromCartId || that_present_fromCartId) {
24835
        if (!(this_present_fromCartId && that_present_fromCartId))
24836
          return false;
24837
        if (this.fromCartId != that.fromCartId)
24838
          return false;
24839
      }
24840
 
24841
      boolean this_present_toCartId = true;
24842
      boolean that_present_toCartId = true;
24843
      if (this_present_toCartId || that_present_toCartId) {
24844
        if (!(this_present_toCartId && that_present_toCartId))
24845
          return false;
24846
        if (this.toCartId != that.toCartId)
24847
          return false;
24848
      }
24849
 
24850
      return true;
24851
    }
24852
 
24853
    @Override
24854
    public int hashCode() {
24855
      return 0;
24856
    }
24857
 
24858
    public int compareTo(mergeCart_args other) {
24859
      if (!getClass().equals(other.getClass())) {
24860
        return getClass().getName().compareTo(other.getClass().getName());
24861
      }
24862
 
24863
      int lastComparison = 0;
24864
      mergeCart_args typedOther = (mergeCart_args)other;
24865
 
24866
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
24867
      if (lastComparison != 0) {
24868
        return lastComparison;
24869
      }
24870
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
24871
      if (lastComparison != 0) {
24872
        return lastComparison;
24873
      }
24874
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
24875
      if (lastComparison != 0) {
24876
        return lastComparison;
24877
      }
24878
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
24879
      if (lastComparison != 0) {
24880
        return lastComparison;
24881
      }
24882
      return 0;
24883
    }
24884
 
24885
    public void read(TProtocol iprot) throws TException {
24886
      TField field;
24887
      iprot.readStructBegin();
24888
      while (true)
24889
      {
24890
        field = iprot.readFieldBegin();
24891
        if (field.type == TType.STOP) { 
24892
          break;
24893
        }
24894
        _Fields fieldId = _Fields.findByThriftId(field.id);
24895
        if (fieldId == null) {
24896
          TProtocolUtil.skip(iprot, field.type);
24897
        } else {
24898
          switch (fieldId) {
24899
            case FROM_CART_ID:
24900
              if (field.type == TType.I64) {
24901
                this.fromCartId = iprot.readI64();
24902
                setFromCartIdIsSet(true);
24903
              } else { 
24904
                TProtocolUtil.skip(iprot, field.type);
24905
              }
24906
              break;
24907
            case TO_CART_ID:
24908
              if (field.type == TType.I64) {
24909
                this.toCartId = iprot.readI64();
24910
                setToCartIdIsSet(true);
24911
              } else { 
24912
                TProtocolUtil.skip(iprot, field.type);
24913
              }
24914
              break;
24915
          }
24916
          iprot.readFieldEnd();
24917
        }
24918
      }
24919
      iprot.readStructEnd();
24920
      validate();
24921
    }
24922
 
24923
    public void write(TProtocol oprot) throws TException {
24924
      validate();
24925
 
24926
      oprot.writeStructBegin(STRUCT_DESC);
24927
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
24928
      oprot.writeI64(this.fromCartId);
24929
      oprot.writeFieldEnd();
24930
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
24931
      oprot.writeI64(this.toCartId);
24932
      oprot.writeFieldEnd();
24933
      oprot.writeFieldStop();
24934
      oprot.writeStructEnd();
24935
    }
24936
 
24937
    @Override
24938
    public String toString() {
24939
      StringBuilder sb = new StringBuilder("mergeCart_args(");
24940
      boolean first = true;
24941
 
24942
      sb.append("fromCartId:");
24943
      sb.append(this.fromCartId);
24944
      first = false;
24945
      if (!first) sb.append(", ");
24946
      sb.append("toCartId:");
24947
      sb.append(this.toCartId);
24948
      first = false;
24949
      sb.append(")");
24950
      return sb.toString();
24951
    }
24952
 
24953
    public void validate() throws TException {
24954
      // check for required fields
24955
    }
24956
 
24957
  }
24958
 
24959
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
24960
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
24961
 
24962
 
24963
 
24964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24965
    public enum _Fields implements TFieldIdEnum {
24966
;
24967
 
24968
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24969
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24970
 
24971
      static {
24972
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24973
          byId.put((int)field._thriftId, field);
24974
          byName.put(field.getFieldName(), field);
24975
        }
24976
      }
24977
 
24978
      /**
24979
       * Find the _Fields constant that matches fieldId, or null if its not found.
24980
       */
24981
      public static _Fields findByThriftId(int fieldId) {
24982
        return byId.get(fieldId);
24983
      }
24984
 
24985
      /**
24986
       * Find the _Fields constant that matches fieldId, throwing an exception
24987
       * if it is not found.
24988
       */
24989
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24990
        _Fields fields = findByThriftId(fieldId);
24991
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24992
        return fields;
24993
      }
24994
 
24995
      /**
24996
       * Find the _Fields constant that matches name, or null if its not found.
24997
       */
24998
      public static _Fields findByName(String name) {
24999
        return byName.get(name);
25000
      }
25001
 
25002
      private final short _thriftId;
25003
      private final String _fieldName;
25004
 
25005
      _Fields(short thriftId, String fieldName) {
25006
        _thriftId = thriftId;
25007
        _fieldName = fieldName;
25008
      }
25009
 
25010
      public short getThriftFieldId() {
25011
        return _thriftId;
25012
      }
25013
 
25014
      public String getFieldName() {
25015
        return _fieldName;
25016
      }
25017
    }
25018
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25019
    }});
25020
 
25021
    static {
25022
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
25023
    }
25024
 
25025
    public mergeCart_result() {
25026
    }
25027
 
25028
    /**
25029
     * Performs a deep copy on <i>other</i>.
25030
     */
25031
    public mergeCart_result(mergeCart_result other) {
25032
    }
25033
 
25034
    public mergeCart_result deepCopy() {
25035
      return new mergeCart_result(this);
25036
    }
25037
 
25038
    @Deprecated
25039
    public mergeCart_result clone() {
25040
      return new mergeCart_result(this);
25041
    }
25042
 
25043
    public void setFieldValue(_Fields field, Object value) {
25044
      switch (field) {
25045
      }
25046
    }
25047
 
25048
    public void setFieldValue(int fieldID, Object value) {
25049
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25050
    }
25051
 
25052
    public Object getFieldValue(_Fields field) {
25053
      switch (field) {
25054
      }
25055
      throw new IllegalStateException();
25056
    }
25057
 
25058
    public Object getFieldValue(int fieldId) {
25059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25060
    }
25061
 
25062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25063
    public boolean isSet(_Fields field) {
25064
      switch (field) {
25065
      }
25066
      throw new IllegalStateException();
25067
    }
25068
 
25069
    public boolean isSet(int fieldID) {
25070
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25071
    }
25072
 
25073
    @Override
25074
    public boolean equals(Object that) {
25075
      if (that == null)
25076
        return false;
25077
      if (that instanceof mergeCart_result)
25078
        return this.equals((mergeCart_result)that);
25079
      return false;
25080
    }
25081
 
25082
    public boolean equals(mergeCart_result that) {
25083
      if (that == null)
25084
        return false;
25085
 
25086
      return true;
25087
    }
25088
 
25089
    @Override
25090
    public int hashCode() {
25091
      return 0;
25092
    }
25093
 
25094
    public int compareTo(mergeCart_result other) {
25095
      if (!getClass().equals(other.getClass())) {
25096
        return getClass().getName().compareTo(other.getClass().getName());
25097
      }
25098
 
25099
      int lastComparison = 0;
25100
      mergeCart_result typedOther = (mergeCart_result)other;
25101
 
25102
      return 0;
25103
    }
25104
 
25105
    public void read(TProtocol iprot) throws TException {
25106
      TField field;
25107
      iprot.readStructBegin();
25108
      while (true)
25109
      {
25110
        field = iprot.readFieldBegin();
25111
        if (field.type == TType.STOP) { 
25112
          break;
25113
        }
25114
        _Fields fieldId = _Fields.findByThriftId(field.id);
25115
        if (fieldId == null) {
25116
          TProtocolUtil.skip(iprot, field.type);
25117
        } else {
25118
          switch (fieldId) {
25119
          }
25120
          iprot.readFieldEnd();
25121
        }
25122
      }
25123
      iprot.readStructEnd();
25124
      validate();
25125
    }
25126
 
25127
    public void write(TProtocol oprot) throws TException {
25128
      oprot.writeStructBegin(STRUCT_DESC);
25129
 
25130
      oprot.writeFieldStop();
25131
      oprot.writeStructEnd();
25132
    }
25133
 
25134
    @Override
25135
    public String toString() {
25136
      StringBuilder sb = new StringBuilder("mergeCart_result(");
25137
      boolean first = true;
25138
 
25139
      sb.append(")");
25140
      return sb.toString();
25141
    }
25142
 
25143
    public void validate() throws TException {
25144
      // check for required fields
25145
    }
25146
 
25147
  }
25148
 
25149
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
25150
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
25151
 
578 chandransh 25152
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25153
 
25154
    private long cartId;
25155
 
25156
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25157
    public enum _Fields implements TFieldIdEnum {
25158
      CART_ID((short)1, "cartId");
25159
 
25160
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25161
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25162
 
25163
      static {
25164
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25165
          byId.put((int)field._thriftId, field);
25166
          byName.put(field.getFieldName(), field);
25167
        }
25168
      }
25169
 
25170
      /**
25171
       * Find the _Fields constant that matches fieldId, or null if its not found.
25172
       */
25173
      public static _Fields findByThriftId(int fieldId) {
25174
        return byId.get(fieldId);
25175
      }
25176
 
25177
      /**
25178
       * Find the _Fields constant that matches fieldId, throwing an exception
25179
       * if it is not found.
25180
       */
25181
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25182
        _Fields fields = findByThriftId(fieldId);
25183
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25184
        return fields;
25185
      }
25186
 
25187
      /**
25188
       * Find the _Fields constant that matches name, or null if its not found.
25189
       */
25190
      public static _Fields findByName(String name) {
25191
        return byName.get(name);
25192
      }
25193
 
25194
      private final short _thriftId;
25195
      private final String _fieldName;
25196
 
25197
      _Fields(short thriftId, String fieldName) {
25198
        _thriftId = thriftId;
25199
        _fieldName = fieldName;
25200
      }
25201
 
25202
      public short getThriftFieldId() {
25203
        return _thriftId;
25204
      }
25205
 
25206
      public String getFieldName() {
25207
        return _fieldName;
25208
      }
25209
    }
25210
 
25211
    // isset id assignments
25212
    private static final int __CARTID_ISSET_ID = 0;
25213
    private BitSet __isset_bit_vector = new BitSet(1);
25214
 
25215
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25216
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25217
          new FieldValueMetaData(TType.I64)));
25218
    }});
25219
 
25220
    static {
688 chandransh 25221
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 25222
    }
25223
 
688 chandransh 25224
    public checkOut_args() {
578 chandransh 25225
    }
25226
 
688 chandransh 25227
    public checkOut_args(
578 chandransh 25228
      long cartId)
25229
    {
25230
      this();
25231
      this.cartId = cartId;
25232
      setCartIdIsSet(true);
25233
    }
25234
 
25235
    /**
25236
     * Performs a deep copy on <i>other</i>.
25237
     */
688 chandransh 25238
    public checkOut_args(checkOut_args other) {
578 chandransh 25239
      __isset_bit_vector.clear();
25240
      __isset_bit_vector.or(other.__isset_bit_vector);
25241
      this.cartId = other.cartId;
25242
    }
25243
 
688 chandransh 25244
    public checkOut_args deepCopy() {
25245
      return new checkOut_args(this);
578 chandransh 25246
    }
25247
 
25248
    @Deprecated
688 chandransh 25249
    public checkOut_args clone() {
25250
      return new checkOut_args(this);
578 chandransh 25251
    }
25252
 
25253
    public long getCartId() {
25254
      return this.cartId;
25255
    }
25256
 
688 chandransh 25257
    public checkOut_args setCartId(long cartId) {
578 chandransh 25258
      this.cartId = cartId;
25259
      setCartIdIsSet(true);
25260
      return this;
25261
    }
25262
 
25263
    public void unsetCartId() {
25264
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25265
    }
25266
 
25267
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25268
    public boolean isSetCartId() {
25269
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25270
    }
25271
 
25272
    public void setCartIdIsSet(boolean value) {
25273
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25274
    }
25275
 
25276
    public void setFieldValue(_Fields field, Object value) {
25277
      switch (field) {
25278
      case CART_ID:
25279
        if (value == null) {
25280
          unsetCartId();
25281
        } else {
25282
          setCartId((Long)value);
25283
        }
25284
        break;
25285
 
25286
      }
25287
    }
25288
 
25289
    public void setFieldValue(int fieldID, Object value) {
25290
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25291
    }
25292
 
25293
    public Object getFieldValue(_Fields field) {
25294
      switch (field) {
25295
      case CART_ID:
25296
        return new Long(getCartId());
25297
 
25298
      }
25299
      throw new IllegalStateException();
25300
    }
25301
 
25302
    public Object getFieldValue(int fieldId) {
25303
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25304
    }
25305
 
25306
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25307
    public boolean isSet(_Fields field) {
25308
      switch (field) {
25309
      case CART_ID:
25310
        return isSetCartId();
25311
      }
25312
      throw new IllegalStateException();
25313
    }
25314
 
25315
    public boolean isSet(int fieldID) {
25316
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25317
    }
25318
 
25319
    @Override
25320
    public boolean equals(Object that) {
25321
      if (that == null)
25322
        return false;
688 chandransh 25323
      if (that instanceof checkOut_args)
25324
        return this.equals((checkOut_args)that);
578 chandransh 25325
      return false;
25326
    }
25327
 
688 chandransh 25328
    public boolean equals(checkOut_args that) {
578 chandransh 25329
      if (that == null)
25330
        return false;
25331
 
25332
      boolean this_present_cartId = true;
25333
      boolean that_present_cartId = true;
25334
      if (this_present_cartId || that_present_cartId) {
25335
        if (!(this_present_cartId && that_present_cartId))
25336
          return false;
25337
        if (this.cartId != that.cartId)
25338
          return false;
25339
      }
25340
 
25341
      return true;
25342
    }
25343
 
25344
    @Override
25345
    public int hashCode() {
25346
      return 0;
25347
    }
25348
 
688 chandransh 25349
    public int compareTo(checkOut_args other) {
578 chandransh 25350
      if (!getClass().equals(other.getClass())) {
25351
        return getClass().getName().compareTo(other.getClass().getName());
25352
      }
25353
 
25354
      int lastComparison = 0;
688 chandransh 25355
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 25356
 
25357
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25358
      if (lastComparison != 0) {
25359
        return lastComparison;
25360
      }
25361
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25362
      if (lastComparison != 0) {
25363
        return lastComparison;
25364
      }
25365
      return 0;
25366
    }
25367
 
25368
    public void read(TProtocol iprot) throws TException {
25369
      TField field;
25370
      iprot.readStructBegin();
25371
      while (true)
25372
      {
25373
        field = iprot.readFieldBegin();
25374
        if (field.type == TType.STOP) { 
25375
          break;
25376
        }
25377
        _Fields fieldId = _Fields.findByThriftId(field.id);
25378
        if (fieldId == null) {
25379
          TProtocolUtil.skip(iprot, field.type);
25380
        } else {
25381
          switch (fieldId) {
25382
            case CART_ID:
25383
              if (field.type == TType.I64) {
25384
                this.cartId = iprot.readI64();
25385
                setCartIdIsSet(true);
25386
              } else { 
25387
                TProtocolUtil.skip(iprot, field.type);
25388
              }
25389
              break;
25390
          }
25391
          iprot.readFieldEnd();
25392
        }
25393
      }
25394
      iprot.readStructEnd();
25395
      validate();
25396
    }
25397
 
25398
    public void write(TProtocol oprot) throws TException {
25399
      validate();
25400
 
25401
      oprot.writeStructBegin(STRUCT_DESC);
25402
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25403
      oprot.writeI64(this.cartId);
25404
      oprot.writeFieldEnd();
25405
      oprot.writeFieldStop();
25406
      oprot.writeStructEnd();
25407
    }
25408
 
25409
    @Override
25410
    public String toString() {
688 chandransh 25411
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 25412
      boolean first = true;
25413
 
25414
      sb.append("cartId:");
25415
      sb.append(this.cartId);
25416
      first = false;
25417
      sb.append(")");
25418
      return sb.toString();
25419
    }
25420
 
25421
    public void validate() throws TException {
25422
      // check for required fields
25423
    }
25424
 
25425
  }
25426
 
688 chandransh 25427
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
25428
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 25429
 
25430
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
25431
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
25432
 
25433
    private boolean success;
25434
    private ShoppingCartException scex;
25435
 
25436
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25437
    public enum _Fields implements TFieldIdEnum {
25438
      SUCCESS((short)0, "success"),
25439
      SCEX((short)1, "scex");
25440
 
25441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25443
 
25444
      static {
25445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25446
          byId.put((int)field._thriftId, field);
25447
          byName.put(field.getFieldName(), field);
25448
        }
25449
      }
25450
 
25451
      /**
25452
       * Find the _Fields constant that matches fieldId, or null if its not found.
25453
       */
25454
      public static _Fields findByThriftId(int fieldId) {
25455
        return byId.get(fieldId);
25456
      }
25457
 
25458
      /**
25459
       * Find the _Fields constant that matches fieldId, throwing an exception
25460
       * if it is not found.
25461
       */
25462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25463
        _Fields fields = findByThriftId(fieldId);
25464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25465
        return fields;
25466
      }
25467
 
25468
      /**
25469
       * Find the _Fields constant that matches name, or null if its not found.
25470
       */
25471
      public static _Fields findByName(String name) {
25472
        return byName.get(name);
25473
      }
25474
 
25475
      private final short _thriftId;
25476
      private final String _fieldName;
25477
 
25478
      _Fields(short thriftId, String fieldName) {
25479
        _thriftId = thriftId;
25480
        _fieldName = fieldName;
25481
      }
25482
 
25483
      public short getThriftFieldId() {
25484
        return _thriftId;
25485
      }
25486
 
25487
      public String getFieldName() {
25488
        return _fieldName;
25489
      }
25490
    }
25491
 
25492
    // isset id assignments
25493
    private static final int __SUCCESS_ISSET_ID = 0;
25494
    private BitSet __isset_bit_vector = new BitSet(1);
25495
 
25496
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25497
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25498
          new FieldValueMetaData(TType.BOOL)));
25499
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
25500
          new FieldValueMetaData(TType.STRUCT)));
25501
    }});
25502
 
25503
    static {
688 chandransh 25504
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 25505
    }
25506
 
688 chandransh 25507
    public checkOut_result() {
578 chandransh 25508
    }
25509
 
688 chandransh 25510
    public checkOut_result(
578 chandransh 25511
      boolean success,
25512
      ShoppingCartException scex)
25513
    {
25514
      this();
25515
      this.success = success;
25516
      setSuccessIsSet(true);
25517
      this.scex = scex;
25518
    }
25519
 
25520
    /**
25521
     * Performs a deep copy on <i>other</i>.
25522
     */
688 chandransh 25523
    public checkOut_result(checkOut_result other) {
578 chandransh 25524
      __isset_bit_vector.clear();
25525
      __isset_bit_vector.or(other.__isset_bit_vector);
25526
      this.success = other.success;
25527
      if (other.isSetScex()) {
25528
        this.scex = new ShoppingCartException(other.scex);
25529
      }
25530
    }
25531
 
688 chandransh 25532
    public checkOut_result deepCopy() {
25533
      return new checkOut_result(this);
578 chandransh 25534
    }
25535
 
25536
    @Deprecated
688 chandransh 25537
    public checkOut_result clone() {
25538
      return new checkOut_result(this);
578 chandransh 25539
    }
25540
 
25541
    public boolean isSuccess() {
25542
      return this.success;
25543
    }
25544
 
688 chandransh 25545
    public checkOut_result setSuccess(boolean success) {
578 chandransh 25546
      this.success = success;
25547
      setSuccessIsSet(true);
25548
      return this;
25549
    }
25550
 
25551
    public void unsetSuccess() {
25552
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
25553
    }
25554
 
25555
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25556
    public boolean isSetSuccess() {
25557
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
25558
    }
25559
 
25560
    public void setSuccessIsSet(boolean value) {
25561
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
25562
    }
25563
 
25564
    public ShoppingCartException getScex() {
25565
      return this.scex;
25566
    }
25567
 
688 chandransh 25568
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 25569
      this.scex = scex;
25570
      return this;
25571
    }
25572
 
25573
    public void unsetScex() {
25574
      this.scex = null;
25575
    }
25576
 
25577
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
25578
    public boolean isSetScex() {
25579
      return this.scex != null;
25580
    }
25581
 
25582
    public void setScexIsSet(boolean value) {
25583
      if (!value) {
25584
        this.scex = null;
25585
      }
25586
    }
25587
 
25588
    public void setFieldValue(_Fields field, Object value) {
25589
      switch (field) {
25590
      case SUCCESS:
25591
        if (value == null) {
25592
          unsetSuccess();
25593
        } else {
25594
          setSuccess((Boolean)value);
25595
        }
25596
        break;
25597
 
25598
      case SCEX:
25599
        if (value == null) {
25600
          unsetScex();
25601
        } else {
25602
          setScex((ShoppingCartException)value);
25603
        }
25604
        break;
25605
 
25606
      }
25607
    }
25608
 
25609
    public void setFieldValue(int fieldID, Object value) {
25610
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25611
    }
25612
 
25613
    public Object getFieldValue(_Fields field) {
25614
      switch (field) {
25615
      case SUCCESS:
25616
        return new Boolean(isSuccess());
25617
 
25618
      case SCEX:
25619
        return getScex();
25620
 
25621
      }
25622
      throw new IllegalStateException();
25623
    }
25624
 
25625
    public Object getFieldValue(int fieldId) {
25626
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25627
    }
25628
 
25629
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25630
    public boolean isSet(_Fields field) {
25631
      switch (field) {
25632
      case SUCCESS:
25633
        return isSetSuccess();
25634
      case SCEX:
25635
        return isSetScex();
25636
      }
25637
      throw new IllegalStateException();
25638
    }
25639
 
25640
    public boolean isSet(int fieldID) {
25641
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25642
    }
25643
 
25644
    @Override
25645
    public boolean equals(Object that) {
25646
      if (that == null)
25647
        return false;
688 chandransh 25648
      if (that instanceof checkOut_result)
25649
        return this.equals((checkOut_result)that);
578 chandransh 25650
      return false;
25651
    }
25652
 
688 chandransh 25653
    public boolean equals(checkOut_result that) {
578 chandransh 25654
      if (that == null)
25655
        return false;
25656
 
25657
      boolean this_present_success = true;
25658
      boolean that_present_success = true;
25659
      if (this_present_success || that_present_success) {
25660
        if (!(this_present_success && that_present_success))
25661
          return false;
25662
        if (this.success != that.success)
25663
          return false;
25664
      }
25665
 
25666
      boolean this_present_scex = true && this.isSetScex();
25667
      boolean that_present_scex = true && that.isSetScex();
25668
      if (this_present_scex || that_present_scex) {
25669
        if (!(this_present_scex && that_present_scex))
25670
          return false;
25671
        if (!this.scex.equals(that.scex))
25672
          return false;
25673
      }
25674
 
25675
      return true;
25676
    }
25677
 
25678
    @Override
25679
    public int hashCode() {
25680
      return 0;
25681
    }
25682
 
688 chandransh 25683
    public int compareTo(checkOut_result other) {
578 chandransh 25684
      if (!getClass().equals(other.getClass())) {
25685
        return getClass().getName().compareTo(other.getClass().getName());
25686
      }
25687
 
25688
      int lastComparison = 0;
688 chandransh 25689
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 25690
 
25691
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25692
      if (lastComparison != 0) {
25693
        return lastComparison;
25694
      }
25695
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25696
      if (lastComparison != 0) {
25697
        return lastComparison;
25698
      }
25699
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
25700
      if (lastComparison != 0) {
25701
        return lastComparison;
25702
      }
25703
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
25704
      if (lastComparison != 0) {
25705
        return lastComparison;
25706
      }
25707
      return 0;
25708
    }
25709
 
25710
    public void read(TProtocol iprot) throws TException {
25711
      TField field;
25712
      iprot.readStructBegin();
25713
      while (true)
25714
      {
25715
        field = iprot.readFieldBegin();
25716
        if (field.type == TType.STOP) { 
25717
          break;
25718
        }
25719
        _Fields fieldId = _Fields.findByThriftId(field.id);
25720
        if (fieldId == null) {
25721
          TProtocolUtil.skip(iprot, field.type);
25722
        } else {
25723
          switch (fieldId) {
25724
            case SUCCESS:
25725
              if (field.type == TType.BOOL) {
25726
                this.success = iprot.readBool();
25727
                setSuccessIsSet(true);
25728
              } else { 
25729
                TProtocolUtil.skip(iprot, field.type);
25730
              }
25731
              break;
25732
            case SCEX:
25733
              if (field.type == TType.STRUCT) {
25734
                this.scex = new ShoppingCartException();
25735
                this.scex.read(iprot);
25736
              } else { 
25737
                TProtocolUtil.skip(iprot, field.type);
25738
              }
25739
              break;
25740
          }
25741
          iprot.readFieldEnd();
25742
        }
25743
      }
25744
      iprot.readStructEnd();
25745
      validate();
25746
    }
25747
 
25748
    public void write(TProtocol oprot) throws TException {
25749
      oprot.writeStructBegin(STRUCT_DESC);
25750
 
25751
      if (this.isSetSuccess()) {
25752
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25753
        oprot.writeBool(this.success);
25754
        oprot.writeFieldEnd();
25755
      } else if (this.isSetScex()) {
25756
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
25757
        this.scex.write(oprot);
25758
        oprot.writeFieldEnd();
25759
      }
25760
      oprot.writeFieldStop();
25761
      oprot.writeStructEnd();
25762
    }
25763
 
25764
    @Override
25765
    public String toString() {
688 chandransh 25766
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 25767
      boolean first = true;
25768
 
25769
      sb.append("success:");
25770
      sb.append(this.success);
25771
      first = false;
25772
      if (!first) sb.append(", ");
25773
      sb.append("scex:");
25774
      if (this.scex == null) {
25775
        sb.append("null");
25776
      } else {
25777
        sb.append(this.scex);
25778
      }
25779
      first = false;
25780
      sb.append(")");
25781
      return sb.toString();
25782
    }
25783
 
25784
    public void validate() throws TException {
25785
      // check for required fields
25786
    }
25787
 
25788
  }
25789
 
688 chandransh 25790
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
25791
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 25792
 
688 chandransh 25793
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25794
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 25795
 
688 chandransh 25796
    private long cartId;
708 rajveer 25797
    private Map<Long,Double> items;
553 chandransh 25798
 
25799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25800
    public enum _Fields implements TFieldIdEnum {
688 chandransh 25801
      CART_ID((short)1, "cartId"),
25802
      ITEMS((short)2, "items");
553 chandransh 25803
 
25804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25806
 
25807
      static {
25808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25809
          byId.put((int)field._thriftId, field);
25810
          byName.put(field.getFieldName(), field);
25811
        }
25812
      }
25813
 
25814
      /**
25815
       * Find the _Fields constant that matches fieldId, or null if its not found.
25816
       */
25817
      public static _Fields findByThriftId(int fieldId) {
25818
        return byId.get(fieldId);
25819
      }
25820
 
25821
      /**
25822
       * Find the _Fields constant that matches fieldId, throwing an exception
25823
       * if it is not found.
25824
       */
25825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25826
        _Fields fields = findByThriftId(fieldId);
25827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25828
        return fields;
25829
      }
25830
 
25831
      /**
25832
       * Find the _Fields constant that matches name, or null if its not found.
25833
       */
25834
      public static _Fields findByName(String name) {
25835
        return byName.get(name);
25836
      }
25837
 
25838
      private final short _thriftId;
25839
      private final String _fieldName;
25840
 
25841
      _Fields(short thriftId, String fieldName) {
25842
        _thriftId = thriftId;
25843
        _fieldName = fieldName;
25844
      }
25845
 
25846
      public short getThriftFieldId() {
25847
        return _thriftId;
25848
      }
25849
 
25850
      public String getFieldName() {
25851
        return _fieldName;
25852
      }
25853
    }
25854
 
25855
    // isset id assignments
688 chandransh 25856
    private static final int __CARTID_ISSET_ID = 0;
25857
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 25858
 
25859
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 25860
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 25861
          new FieldValueMetaData(TType.I64)));
688 chandransh 25862
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
25863
          new MapMetaData(TType.MAP, 
25864
              new FieldValueMetaData(TType.I64), 
708 rajveer 25865
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 25866
    }});
25867
 
25868
    static {
688 chandransh 25869
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 25870
    }
25871
 
688 chandransh 25872
    public resetCart_args() {
553 chandransh 25873
    }
25874
 
688 chandransh 25875
    public resetCart_args(
25876
      long cartId,
708 rajveer 25877
      Map<Long,Double> items)
553 chandransh 25878
    {
25879
      this();
688 chandransh 25880
      this.cartId = cartId;
25881
      setCartIdIsSet(true);
25882
      this.items = items;
553 chandransh 25883
    }
25884
 
25885
    /**
25886
     * Performs a deep copy on <i>other</i>.
25887
     */
688 chandransh 25888
    public resetCart_args(resetCart_args other) {
553 chandransh 25889
      __isset_bit_vector.clear();
25890
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 25891
      this.cartId = other.cartId;
25892
      if (other.isSetItems()) {
708 rajveer 25893
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
25894
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 25895
 
25896
          Long other_element_key = other_element.getKey();
708 rajveer 25897
          Double other_element_value = other_element.getValue();
688 chandransh 25898
 
25899
          Long __this__items_copy_key = other_element_key;
25900
 
708 rajveer 25901
          Double __this__items_copy_value = other_element_value;
688 chandransh 25902
 
25903
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
25904
        }
25905
        this.items = __this__items;
25906
      }
553 chandransh 25907
    }
25908
 
688 chandransh 25909
    public resetCart_args deepCopy() {
25910
      return new resetCart_args(this);
553 chandransh 25911
    }
25912
 
25913
    @Deprecated
688 chandransh 25914
    public resetCart_args clone() {
25915
      return new resetCart_args(this);
553 chandransh 25916
    }
25917
 
688 chandransh 25918
    public long getCartId() {
25919
      return this.cartId;
553 chandransh 25920
    }
25921
 
688 chandransh 25922
    public resetCart_args setCartId(long cartId) {
25923
      this.cartId = cartId;
25924
      setCartIdIsSet(true);
48 ashish 25925
      return this;
25926
    }
25927
 
688 chandransh 25928
    public void unsetCartId() {
25929
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 25930
    }
25931
 
688 chandransh 25932
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25933
    public boolean isSetCartId() {
25934
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 25935
    }
25936
 
688 chandransh 25937
    public void setCartIdIsSet(boolean value) {
25938
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 25939
    }
25940
 
688 chandransh 25941
    public int getItemsSize() {
25942
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 25943
    }
25944
 
708 rajveer 25945
    public void putToItems(long key, double val) {
688 chandransh 25946
      if (this.items == null) {
708 rajveer 25947
        this.items = new HashMap<Long,Double>();
688 chandransh 25948
      }
25949
      this.items.put(key, val);
25950
    }
25951
 
708 rajveer 25952
    public Map<Long,Double> getItems() {
688 chandransh 25953
      return this.items;
25954
    }
25955
 
708 rajveer 25956
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 25957
      this.items = items;
553 chandransh 25958
      return this;
25959
    }
25960
 
688 chandransh 25961
    public void unsetItems() {
25962
      this.items = null;
553 chandransh 25963
    }
25964
 
688 chandransh 25965
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
25966
    public boolean isSetItems() {
25967
      return this.items != null;
553 chandransh 25968
    }
25969
 
688 chandransh 25970
    public void setItemsIsSet(boolean value) {
25971
      if (!value) {
25972
        this.items = null;
25973
      }
553 chandransh 25974
    }
25975
 
25976
    public void setFieldValue(_Fields field, Object value) {
25977
      switch (field) {
688 chandransh 25978
      case CART_ID:
553 chandransh 25979
        if (value == null) {
688 chandransh 25980
          unsetCartId();
553 chandransh 25981
        } else {
688 chandransh 25982
          setCartId((Long)value);
553 chandransh 25983
        }
25984
        break;
25985
 
688 chandransh 25986
      case ITEMS:
553 chandransh 25987
        if (value == null) {
688 chandransh 25988
          unsetItems();
553 chandransh 25989
        } else {
708 rajveer 25990
          setItems((Map<Long,Double>)value);
553 chandransh 25991
        }
25992
        break;
25993
 
25994
      }
25995
    }
25996
 
25997
    public void setFieldValue(int fieldID, Object value) {
25998
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25999
    }
26000
 
26001
    public Object getFieldValue(_Fields field) {
26002
      switch (field) {
688 chandransh 26003
      case CART_ID:
26004
        return new Long(getCartId());
553 chandransh 26005
 
688 chandransh 26006
      case ITEMS:
26007
        return getItems();
553 chandransh 26008
 
26009
      }
26010
      throw new IllegalStateException();
26011
    }
26012
 
26013
    public Object getFieldValue(int fieldId) {
26014
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26015
    }
26016
 
26017
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26018
    public boolean isSet(_Fields field) {
26019
      switch (field) {
688 chandransh 26020
      case CART_ID:
26021
        return isSetCartId();
26022
      case ITEMS:
26023
        return isSetItems();
553 chandransh 26024
      }
26025
      throw new IllegalStateException();
26026
    }
26027
 
26028
    public boolean isSet(int fieldID) {
26029
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26030
    }
26031
 
26032
    @Override
26033
    public boolean equals(Object that) {
26034
      if (that == null)
26035
        return false;
688 chandransh 26036
      if (that instanceof resetCart_args)
26037
        return this.equals((resetCart_args)that);
553 chandransh 26038
      return false;
26039
    }
26040
 
688 chandransh 26041
    public boolean equals(resetCart_args that) {
553 chandransh 26042
      if (that == null)
26043
        return false;
26044
 
688 chandransh 26045
      boolean this_present_cartId = true;
26046
      boolean that_present_cartId = true;
26047
      if (this_present_cartId || that_present_cartId) {
26048
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 26049
          return false;
688 chandransh 26050
        if (this.cartId != that.cartId)
553 chandransh 26051
          return false;
26052
      }
26053
 
688 chandransh 26054
      boolean this_present_items = true && this.isSetItems();
26055
      boolean that_present_items = true && that.isSetItems();
26056
      if (this_present_items || that_present_items) {
26057
        if (!(this_present_items && that_present_items))
553 chandransh 26058
          return false;
688 chandransh 26059
        if (!this.items.equals(that.items))
553 chandransh 26060
          return false;
26061
      }
26062
 
26063
      return true;
26064
    }
26065
 
26066
    @Override
26067
    public int hashCode() {
26068
      return 0;
26069
    }
26070
 
26071
    public void read(TProtocol iprot) throws TException {
26072
      TField field;
26073
      iprot.readStructBegin();
26074
      while (true)
26075
      {
26076
        field = iprot.readFieldBegin();
26077
        if (field.type == TType.STOP) { 
26078
          break;
26079
        }
26080
        _Fields fieldId = _Fields.findByThriftId(field.id);
26081
        if (fieldId == null) {
26082
          TProtocolUtil.skip(iprot, field.type);
26083
        } else {
26084
          switch (fieldId) {
688 chandransh 26085
            case CART_ID:
553 chandransh 26086
              if (field.type == TType.I64) {
688 chandransh 26087
                this.cartId = iprot.readI64();
26088
                setCartIdIsSet(true);
553 chandransh 26089
              } else { 
26090
                TProtocolUtil.skip(iprot, field.type);
26091
              }
26092
              break;
688 chandransh 26093
            case ITEMS:
26094
              if (field.type == TType.MAP) {
26095
                {
26096
                  TMap _map37 = iprot.readMapBegin();
708 rajveer 26097
                  this.items = new HashMap<Long,Double>(2*_map37.size);
688 chandransh 26098
                  for (int _i38 = 0; _i38 < _map37.size; ++_i38)
26099
                  {
26100
                    long _key39;
708 rajveer 26101
                    double _val40;
688 chandransh 26102
                    _key39 = iprot.readI64();
708 rajveer 26103
                    _val40 = iprot.readDouble();
688 chandransh 26104
                    this.items.put(_key39, _val40);
26105
                  }
26106
                  iprot.readMapEnd();
26107
                }
553 chandransh 26108
              } else { 
26109
                TProtocolUtil.skip(iprot, field.type);
26110
              }
26111
              break;
26112
          }
26113
          iprot.readFieldEnd();
26114
        }
26115
      }
26116
      iprot.readStructEnd();
26117
      validate();
26118
    }
26119
 
26120
    public void write(TProtocol oprot) throws TException {
26121
      validate();
26122
 
26123
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 26124
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26125
      oprot.writeI64(this.cartId);
553 chandransh 26126
      oprot.writeFieldEnd();
688 chandransh 26127
      if (this.items != null) {
26128
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
26129
        {
708 rajveer 26130
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
26131
          for (Map.Entry<Long, Double> _iter41 : this.items.entrySet())
688 chandransh 26132
          {
26133
            oprot.writeI64(_iter41.getKey());
708 rajveer 26134
            oprot.writeDouble(_iter41.getValue());
688 chandransh 26135
          }
26136
          oprot.writeMapEnd();
26137
        }
26138
        oprot.writeFieldEnd();
26139
      }
553 chandransh 26140
      oprot.writeFieldStop();
26141
      oprot.writeStructEnd();
26142
    }
26143
 
26144
    @Override
26145
    public String toString() {
688 chandransh 26146
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 26147
      boolean first = true;
26148
 
688 chandransh 26149
      sb.append("cartId:");
26150
      sb.append(this.cartId);
553 chandransh 26151
      first = false;
26152
      if (!first) sb.append(", ");
688 chandransh 26153
      sb.append("items:");
26154
      if (this.items == null) {
26155
        sb.append("null");
26156
      } else {
26157
        sb.append(this.items);
26158
      }
553 chandransh 26159
      first = false;
26160
      sb.append(")");
26161
      return sb.toString();
26162
    }
26163
 
26164
    public void validate() throws TException {
26165
      // check for required fields
26166
    }
26167
 
26168
  }
26169
 
688 chandransh 26170
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
26171
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 26172
 
688 chandransh 26173
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
26174
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 26175
 
688 chandransh 26176
    private boolean success;
26177
    private ShoppingCartException scex;
553 chandransh 26178
 
26179
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26180
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26181
      SUCCESS((short)0, "success"),
26182
      SCEX((short)1, "scex");
553 chandransh 26183
 
26184
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26185
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26186
 
26187
      static {
26188
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26189
          byId.put((int)field._thriftId, field);
26190
          byName.put(field.getFieldName(), field);
26191
        }
26192
      }
26193
 
26194
      /**
26195
       * Find the _Fields constant that matches fieldId, or null if its not found.
26196
       */
26197
      public static _Fields findByThriftId(int fieldId) {
26198
        return byId.get(fieldId);
26199
      }
26200
 
26201
      /**
26202
       * Find the _Fields constant that matches fieldId, throwing an exception
26203
       * if it is not found.
26204
       */
26205
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26206
        _Fields fields = findByThriftId(fieldId);
26207
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26208
        return fields;
26209
      }
26210
 
26211
      /**
26212
       * Find the _Fields constant that matches name, or null if its not found.
26213
       */
26214
      public static _Fields findByName(String name) {
26215
        return byName.get(name);
26216
      }
26217
 
26218
      private final short _thriftId;
26219
      private final String _fieldName;
26220
 
26221
      _Fields(short thriftId, String fieldName) {
26222
        _thriftId = thriftId;
26223
        _fieldName = fieldName;
26224
      }
26225
 
26226
      public short getThriftFieldId() {
26227
        return _thriftId;
26228
      }
26229
 
26230
      public String getFieldName() {
26231
        return _fieldName;
26232
      }
26233
    }
688 chandransh 26234
 
26235
    // isset id assignments
26236
    private static final int __SUCCESS_ISSET_ID = 0;
26237
    private BitSet __isset_bit_vector = new BitSet(1);
26238
 
553 chandransh 26239
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 26240
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26241
          new FieldValueMetaData(TType.BOOL)));
26242
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26243
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 26244
    }});
26245
 
26246
    static {
688 chandransh 26247
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 26248
    }
26249
 
688 chandransh 26250
    public resetCart_result() {
553 chandransh 26251
    }
26252
 
688 chandransh 26253
    public resetCart_result(
26254
      boolean success,
26255
      ShoppingCartException scex)
26256
    {
26257
      this();
26258
      this.success = success;
26259
      setSuccessIsSet(true);
26260
      this.scex = scex;
26261
    }
26262
 
553 chandransh 26263
    /**
26264
     * Performs a deep copy on <i>other</i>.
26265
     */
688 chandransh 26266
    public resetCart_result(resetCart_result other) {
26267
      __isset_bit_vector.clear();
26268
      __isset_bit_vector.or(other.__isset_bit_vector);
26269
      this.success = other.success;
26270
      if (other.isSetScex()) {
26271
        this.scex = new ShoppingCartException(other.scex);
26272
      }
553 chandransh 26273
    }
26274
 
688 chandransh 26275
    public resetCart_result deepCopy() {
26276
      return new resetCart_result(this);
553 chandransh 26277
    }
26278
 
26279
    @Deprecated
688 chandransh 26280
    public resetCart_result clone() {
26281
      return new resetCart_result(this);
553 chandransh 26282
    }
26283
 
688 chandransh 26284
    public boolean isSuccess() {
26285
      return this.success;
26286
    }
26287
 
26288
    public resetCart_result setSuccess(boolean success) {
26289
      this.success = success;
26290
      setSuccessIsSet(true);
26291
      return this;
26292
    }
26293
 
26294
    public void unsetSuccess() {
26295
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26296
    }
26297
 
26298
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26299
    public boolean isSetSuccess() {
26300
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26301
    }
26302
 
26303
    public void setSuccessIsSet(boolean value) {
26304
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26305
    }
26306
 
26307
    public ShoppingCartException getScex() {
26308
      return this.scex;
26309
    }
26310
 
26311
    public resetCart_result setScex(ShoppingCartException scex) {
26312
      this.scex = scex;
26313
      return this;
26314
    }
26315
 
26316
    public void unsetScex() {
26317
      this.scex = null;
26318
    }
26319
 
26320
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26321
    public boolean isSetScex() {
26322
      return this.scex != null;
26323
    }
26324
 
26325
    public void setScexIsSet(boolean value) {
26326
      if (!value) {
26327
        this.scex = null;
26328
      }
26329
    }
26330
 
553 chandransh 26331
    public void setFieldValue(_Fields field, Object value) {
26332
      switch (field) {
688 chandransh 26333
      case SUCCESS:
26334
        if (value == null) {
26335
          unsetSuccess();
26336
        } else {
26337
          setSuccess((Boolean)value);
26338
        }
26339
        break;
26340
 
26341
      case SCEX:
26342
        if (value == null) {
26343
          unsetScex();
26344
        } else {
26345
          setScex((ShoppingCartException)value);
26346
        }
26347
        break;
26348
 
553 chandransh 26349
      }
26350
    }
26351
 
26352
    public void setFieldValue(int fieldID, Object value) {
26353
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26354
    }
26355
 
26356
    public Object getFieldValue(_Fields field) {
26357
      switch (field) {
688 chandransh 26358
      case SUCCESS:
26359
        return new Boolean(isSuccess());
26360
 
26361
      case SCEX:
26362
        return getScex();
26363
 
553 chandransh 26364
      }
26365
      throw new IllegalStateException();
26366
    }
26367
 
26368
    public Object getFieldValue(int fieldId) {
26369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26370
    }
26371
 
26372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26373
    public boolean isSet(_Fields field) {
26374
      switch (field) {
688 chandransh 26375
      case SUCCESS:
26376
        return isSetSuccess();
26377
      case SCEX:
26378
        return isSetScex();
553 chandransh 26379
      }
26380
      throw new IllegalStateException();
26381
    }
26382
 
26383
    public boolean isSet(int fieldID) {
26384
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26385
    }
26386
 
26387
    @Override
26388
    public boolean equals(Object that) {
26389
      if (that == null)
26390
        return false;
688 chandransh 26391
      if (that instanceof resetCart_result)
26392
        return this.equals((resetCart_result)that);
553 chandransh 26393
      return false;
26394
    }
26395
 
688 chandransh 26396
    public boolean equals(resetCart_result that) {
553 chandransh 26397
      if (that == null)
26398
        return false;
26399
 
688 chandransh 26400
      boolean this_present_success = true;
26401
      boolean that_present_success = true;
26402
      if (this_present_success || that_present_success) {
26403
        if (!(this_present_success && that_present_success))
26404
          return false;
26405
        if (this.success != that.success)
26406
          return false;
26407
      }
26408
 
26409
      boolean this_present_scex = true && this.isSetScex();
26410
      boolean that_present_scex = true && that.isSetScex();
26411
      if (this_present_scex || that_present_scex) {
26412
        if (!(this_present_scex && that_present_scex))
26413
          return false;
26414
        if (!this.scex.equals(that.scex))
26415
          return false;
26416
      }
26417
 
553 chandransh 26418
      return true;
26419
    }
26420
 
26421
    @Override
26422
    public int hashCode() {
26423
      return 0;
26424
    }
26425
 
688 chandransh 26426
    public int compareTo(resetCart_result other) {
553 chandransh 26427
      if (!getClass().equals(other.getClass())) {
26428
        return getClass().getName().compareTo(other.getClass().getName());
26429
      }
26430
 
26431
      int lastComparison = 0;
688 chandransh 26432
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 26433
 
688 chandransh 26434
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26435
      if (lastComparison != 0) {
26436
        return lastComparison;
26437
      }
26438
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26439
      if (lastComparison != 0) {
26440
        return lastComparison;
26441
      }
26442
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26443
      if (lastComparison != 0) {
26444
        return lastComparison;
26445
      }
26446
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26447
      if (lastComparison != 0) {
26448
        return lastComparison;
26449
      }
553 chandransh 26450
      return 0;
26451
    }
26452
 
26453
    public void read(TProtocol iprot) throws TException {
26454
      TField field;
26455
      iprot.readStructBegin();
26456
      while (true)
26457
      {
26458
        field = iprot.readFieldBegin();
26459
        if (field.type == TType.STOP) { 
26460
          break;
26461
        }
26462
        _Fields fieldId = _Fields.findByThriftId(field.id);
26463
        if (fieldId == null) {
26464
          TProtocolUtil.skip(iprot, field.type);
26465
        } else {
26466
          switch (fieldId) {
688 chandransh 26467
            case SUCCESS:
26468
              if (field.type == TType.BOOL) {
26469
                this.success = iprot.readBool();
26470
                setSuccessIsSet(true);
26471
              } else { 
26472
                TProtocolUtil.skip(iprot, field.type);
26473
              }
26474
              break;
26475
            case SCEX:
26476
              if (field.type == TType.STRUCT) {
26477
                this.scex = new ShoppingCartException();
26478
                this.scex.read(iprot);
26479
              } else { 
26480
                TProtocolUtil.skip(iprot, field.type);
26481
              }
26482
              break;
553 chandransh 26483
          }
26484
          iprot.readFieldEnd();
26485
        }
26486
      }
26487
      iprot.readStructEnd();
26488
      validate();
26489
    }
26490
 
26491
    public void write(TProtocol oprot) throws TException {
26492
      oprot.writeStructBegin(STRUCT_DESC);
26493
 
688 chandransh 26494
      if (this.isSetSuccess()) {
26495
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26496
        oprot.writeBool(this.success);
26497
        oprot.writeFieldEnd();
26498
      } else if (this.isSetScex()) {
26499
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26500
        this.scex.write(oprot);
26501
        oprot.writeFieldEnd();
26502
      }
553 chandransh 26503
      oprot.writeFieldStop();
26504
      oprot.writeStructEnd();
26505
    }
26506
 
26507
    @Override
26508
    public String toString() {
688 chandransh 26509
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 26510
      boolean first = true;
26511
 
688 chandransh 26512
      sb.append("success:");
26513
      sb.append(this.success);
26514
      first = false;
26515
      if (!first) sb.append(", ");
26516
      sb.append("scex:");
26517
      if (this.scex == null) {
26518
        sb.append("null");
26519
      } else {
26520
        sb.append(this.scex);
26521
      }
26522
      first = false;
553 chandransh 26523
      sb.append(")");
26524
      return sb.toString();
26525
    }
26526
 
26527
    public void validate() throws TException {
26528
      // check for required fields
26529
    }
26530
 
26531
  }
26532
 
26533
  public static class addWidget_args implements TBase<addWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_args>   {
26534
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_args");
26535
 
26536
    private static final TField WIDGET_FIELD_DESC = new TField("widget", TType.STRUCT, (short)1);
26537
 
26538
    private Widget widget;
26539
 
26540
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26541
    public enum _Fields implements TFieldIdEnum {
26542
      WIDGET((short)1, "widget");
26543
 
26544
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26545
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26546
 
26547
      static {
26548
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26549
          byId.put((int)field._thriftId, field);
26550
          byName.put(field.getFieldName(), field);
26551
        }
26552
      }
26553
 
26554
      /**
26555
       * Find the _Fields constant that matches fieldId, or null if its not found.
26556
       */
26557
      public static _Fields findByThriftId(int fieldId) {
26558
        return byId.get(fieldId);
26559
      }
26560
 
26561
      /**
26562
       * Find the _Fields constant that matches fieldId, throwing an exception
26563
       * if it is not found.
26564
       */
26565
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26566
        _Fields fields = findByThriftId(fieldId);
26567
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26568
        return fields;
26569
      }
26570
 
26571
      /**
26572
       * Find the _Fields constant that matches name, or null if its not found.
26573
       */
26574
      public static _Fields findByName(String name) {
26575
        return byName.get(name);
26576
      }
26577
 
26578
      private final short _thriftId;
26579
      private final String _fieldName;
26580
 
26581
      _Fields(short thriftId, String fieldName) {
26582
        _thriftId = thriftId;
26583
        _fieldName = fieldName;
26584
      }
26585
 
26586
      public short getThriftFieldId() {
26587
        return _thriftId;
26588
      }
26589
 
26590
      public String getFieldName() {
26591
        return _fieldName;
26592
      }
26593
    }
26594
 
26595
    // isset id assignments
26596
 
26597
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26598
      put(_Fields.WIDGET, new FieldMetaData("widget", TFieldRequirementType.DEFAULT, 
26599
          new StructMetaData(TType.STRUCT, Widget.class)));
26600
    }});
26601
 
26602
    static {
26603
      FieldMetaData.addStructMetaDataMap(addWidget_args.class, metaDataMap);
26604
    }
26605
 
26606
    public addWidget_args() {
26607
    }
26608
 
26609
    public addWidget_args(
26610
      Widget widget)
26611
    {
26612
      this();
26613
      this.widget = widget;
26614
    }
26615
 
26616
    /**
26617
     * Performs a deep copy on <i>other</i>.
26618
     */
26619
    public addWidget_args(addWidget_args other) {
26620
      if (other.isSetWidget()) {
26621
        this.widget = new Widget(other.widget);
26622
      }
26623
    }
26624
 
26625
    public addWidget_args deepCopy() {
26626
      return new addWidget_args(this);
26627
    }
26628
 
26629
    @Deprecated
26630
    public addWidget_args clone() {
26631
      return new addWidget_args(this);
26632
    }
26633
 
26634
    public Widget getWidget() {
26635
      return this.widget;
26636
    }
26637
 
26638
    public addWidget_args setWidget(Widget widget) {
26639
      this.widget = widget;
26640
      return this;
26641
    }
26642
 
26643
    public void unsetWidget() {
26644
      this.widget = null;
26645
    }
26646
 
26647
    /** Returns true if field widget is set (has been asigned a value) and false otherwise */
26648
    public boolean isSetWidget() {
26649
      return this.widget != null;
26650
    }
26651
 
26652
    public void setWidgetIsSet(boolean value) {
48 ashish 26653
      if (!value) {
553 chandransh 26654
        this.widget = null;
48 ashish 26655
      }
26656
    }
26657
 
26658
    public void setFieldValue(_Fields field, Object value) {
26659
      switch (field) {
553 chandransh 26660
      case WIDGET:
48 ashish 26661
        if (value == null) {
553 chandransh 26662
          unsetWidget();
48 ashish 26663
        } else {
553 chandransh 26664
          setWidget((Widget)value);
48 ashish 26665
        }
26666
        break;
26667
 
553 chandransh 26668
      }
26669
    }
26670
 
26671
    public void setFieldValue(int fieldID, Object value) {
26672
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26673
    }
26674
 
26675
    public Object getFieldValue(_Fields field) {
26676
      switch (field) {
26677
      case WIDGET:
26678
        return getWidget();
26679
 
26680
      }
26681
      throw new IllegalStateException();
26682
    }
26683
 
26684
    public Object getFieldValue(int fieldId) {
26685
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26686
    }
26687
 
26688
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26689
    public boolean isSet(_Fields field) {
26690
      switch (field) {
26691
      case WIDGET:
26692
        return isSetWidget();
26693
      }
26694
      throw new IllegalStateException();
26695
    }
26696
 
26697
    public boolean isSet(int fieldID) {
26698
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26699
    }
26700
 
26701
    @Override
26702
    public boolean equals(Object that) {
26703
      if (that == null)
26704
        return false;
26705
      if (that instanceof addWidget_args)
26706
        return this.equals((addWidget_args)that);
26707
      return false;
26708
    }
26709
 
26710
    public boolean equals(addWidget_args that) {
26711
      if (that == null)
26712
        return false;
26713
 
26714
      boolean this_present_widget = true && this.isSetWidget();
26715
      boolean that_present_widget = true && that.isSetWidget();
26716
      if (this_present_widget || that_present_widget) {
26717
        if (!(this_present_widget && that_present_widget))
26718
          return false;
26719
        if (!this.widget.equals(that.widget))
26720
          return false;
26721
      }
26722
 
26723
      return true;
26724
    }
26725
 
26726
    @Override
26727
    public int hashCode() {
26728
      return 0;
26729
    }
26730
 
26731
    public int compareTo(addWidget_args other) {
26732
      if (!getClass().equals(other.getClass())) {
26733
        return getClass().getName().compareTo(other.getClass().getName());
26734
      }
26735
 
26736
      int lastComparison = 0;
26737
      addWidget_args typedOther = (addWidget_args)other;
26738
 
26739
      lastComparison = Boolean.valueOf(isSetWidget()).compareTo(isSetWidget());
26740
      if (lastComparison != 0) {
26741
        return lastComparison;
26742
      }
26743
      lastComparison = TBaseHelper.compareTo(widget, typedOther.widget);
26744
      if (lastComparison != 0) {
26745
        return lastComparison;
26746
      }
26747
      return 0;
26748
    }
26749
 
26750
    public void read(TProtocol iprot) throws TException {
26751
      TField field;
26752
      iprot.readStructBegin();
26753
      while (true)
26754
      {
26755
        field = iprot.readFieldBegin();
26756
        if (field.type == TType.STOP) { 
26757
          break;
26758
        }
26759
        _Fields fieldId = _Fields.findByThriftId(field.id);
26760
        if (fieldId == null) {
26761
          TProtocolUtil.skip(iprot, field.type);
26762
        } else {
26763
          switch (fieldId) {
26764
            case WIDGET:
26765
              if (field.type == TType.STRUCT) {
26766
                this.widget = new Widget();
26767
                this.widget.read(iprot);
26768
              } else { 
26769
                TProtocolUtil.skip(iprot, field.type);
26770
              }
26771
              break;
26772
          }
26773
          iprot.readFieldEnd();
26774
        }
26775
      }
26776
      iprot.readStructEnd();
26777
      validate();
26778
    }
26779
 
26780
    public void write(TProtocol oprot) throws TException {
26781
      validate();
26782
 
26783
      oprot.writeStructBegin(STRUCT_DESC);
26784
      if (this.widget != null) {
26785
        oprot.writeFieldBegin(WIDGET_FIELD_DESC);
26786
        this.widget.write(oprot);
26787
        oprot.writeFieldEnd();
26788
      }
26789
      oprot.writeFieldStop();
26790
      oprot.writeStructEnd();
26791
    }
26792
 
26793
    @Override
26794
    public String toString() {
26795
      StringBuilder sb = new StringBuilder("addWidget_args(");
26796
      boolean first = true;
26797
 
26798
      sb.append("widget:");
26799
      if (this.widget == null) {
26800
        sb.append("null");
26801
      } else {
26802
        sb.append(this.widget);
26803
      }
26804
      first = false;
26805
      sb.append(")");
26806
      return sb.toString();
26807
    }
26808
 
26809
    public void validate() throws TException {
26810
      // check for required fields
26811
    }
26812
 
26813
  }
26814
 
26815
  public static class addWidget_result implements TBase<addWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addWidget_result>   {
26816
    private static final TStruct STRUCT_DESC = new TStruct("addWidget_result");
26817
 
26818
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26819
 
26820
    private WidgetException scx;
26821
 
26822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26823
    public enum _Fields implements TFieldIdEnum {
26824
      SCX((short)1, "scx");
26825
 
26826
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26828
 
26829
      static {
26830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26831
          byId.put((int)field._thriftId, field);
26832
          byName.put(field.getFieldName(), field);
26833
        }
26834
      }
26835
 
26836
      /**
26837
       * Find the _Fields constant that matches fieldId, or null if its not found.
26838
       */
26839
      public static _Fields findByThriftId(int fieldId) {
26840
        return byId.get(fieldId);
26841
      }
26842
 
26843
      /**
26844
       * Find the _Fields constant that matches fieldId, throwing an exception
26845
       * if it is not found.
26846
       */
26847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26848
        _Fields fields = findByThriftId(fieldId);
26849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26850
        return fields;
26851
      }
26852
 
26853
      /**
26854
       * Find the _Fields constant that matches name, or null if its not found.
26855
       */
26856
      public static _Fields findByName(String name) {
26857
        return byName.get(name);
26858
      }
26859
 
26860
      private final short _thriftId;
26861
      private final String _fieldName;
26862
 
26863
      _Fields(short thriftId, String fieldName) {
26864
        _thriftId = thriftId;
26865
        _fieldName = fieldName;
26866
      }
26867
 
26868
      public short getThriftFieldId() {
26869
        return _thriftId;
26870
      }
26871
 
26872
      public String getFieldName() {
26873
        return _fieldName;
26874
      }
26875
    }
26876
 
26877
    // isset id assignments
26878
 
26879
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26880
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
26881
          new FieldValueMetaData(TType.STRUCT)));
26882
    }});
26883
 
26884
    static {
26885
      FieldMetaData.addStructMetaDataMap(addWidget_result.class, metaDataMap);
26886
    }
26887
 
26888
    public addWidget_result() {
26889
    }
26890
 
26891
    public addWidget_result(
26892
      WidgetException scx)
26893
    {
26894
      this();
26895
      this.scx = scx;
26896
    }
26897
 
26898
    /**
26899
     * Performs a deep copy on <i>other</i>.
26900
     */
26901
    public addWidget_result(addWidget_result other) {
26902
      if (other.isSetScx()) {
26903
        this.scx = new WidgetException(other.scx);
26904
      }
26905
    }
26906
 
26907
    public addWidget_result deepCopy() {
26908
      return new addWidget_result(this);
26909
    }
26910
 
26911
    @Deprecated
26912
    public addWidget_result clone() {
26913
      return new addWidget_result(this);
26914
    }
26915
 
26916
    public WidgetException getScx() {
26917
      return this.scx;
26918
    }
26919
 
26920
    public addWidget_result setScx(WidgetException scx) {
26921
      this.scx = scx;
26922
      return this;
26923
    }
26924
 
26925
    public void unsetScx() {
26926
      this.scx = null;
26927
    }
26928
 
26929
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26930
    public boolean isSetScx() {
26931
      return this.scx != null;
26932
    }
26933
 
26934
    public void setScxIsSet(boolean value) {
26935
      if (!value) {
26936
        this.scx = null;
26937
      }
26938
    }
26939
 
26940
    public void setFieldValue(_Fields field, Object value) {
26941
      switch (field) {
26942
      case SCX:
48 ashish 26943
        if (value == null) {
553 chandransh 26944
          unsetScx();
48 ashish 26945
        } else {
553 chandransh 26946
          setScx((WidgetException)value);
48 ashish 26947
        }
26948
        break;
26949
 
26950
      }
26951
    }
26952
 
26953
    public void setFieldValue(int fieldID, Object value) {
26954
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26955
    }
26956
 
26957
    public Object getFieldValue(_Fields field) {
26958
      switch (field) {
553 chandransh 26959
      case SCX:
26960
        return getScx();
48 ashish 26961
 
553 chandransh 26962
      }
26963
      throw new IllegalStateException();
26964
    }
48 ashish 26965
 
553 chandransh 26966
    public Object getFieldValue(int fieldId) {
26967
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26968
    }
26969
 
26970
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26971
    public boolean isSet(_Fields field) {
26972
      switch (field) {
26973
      case SCX:
26974
        return isSetScx();
48 ashish 26975
      }
26976
      throw new IllegalStateException();
26977
    }
26978
 
553 chandransh 26979
    public boolean isSet(int fieldID) {
26980
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26981
    }
26982
 
26983
    @Override
26984
    public boolean equals(Object that) {
26985
      if (that == null)
26986
        return false;
26987
      if (that instanceof addWidget_result)
26988
        return this.equals((addWidget_result)that);
26989
      return false;
26990
    }
26991
 
26992
    public boolean equals(addWidget_result that) {
26993
      if (that == null)
26994
        return false;
26995
 
26996
      boolean this_present_scx = true && this.isSetScx();
26997
      boolean that_present_scx = true && that.isSetScx();
26998
      if (this_present_scx || that_present_scx) {
26999
        if (!(this_present_scx && that_present_scx))
27000
          return false;
27001
        if (!this.scx.equals(that.scx))
27002
          return false;
27003
      }
27004
 
27005
      return true;
27006
    }
27007
 
27008
    @Override
27009
    public int hashCode() {
27010
      return 0;
27011
    }
27012
 
27013
    public int compareTo(addWidget_result other) {
27014
      if (!getClass().equals(other.getClass())) {
27015
        return getClass().getName().compareTo(other.getClass().getName());
27016
      }
27017
 
27018
      int lastComparison = 0;
27019
      addWidget_result typedOther = (addWidget_result)other;
27020
 
27021
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
27022
      if (lastComparison != 0) {
27023
        return lastComparison;
27024
      }
27025
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
27026
      if (lastComparison != 0) {
27027
        return lastComparison;
27028
      }
27029
      return 0;
27030
    }
27031
 
27032
    public void read(TProtocol iprot) throws TException {
27033
      TField field;
27034
      iprot.readStructBegin();
27035
      while (true)
27036
      {
27037
        field = iprot.readFieldBegin();
27038
        if (field.type == TType.STOP) { 
27039
          break;
27040
        }
27041
        _Fields fieldId = _Fields.findByThriftId(field.id);
27042
        if (fieldId == null) {
27043
          TProtocolUtil.skip(iprot, field.type);
27044
        } else {
27045
          switch (fieldId) {
27046
            case SCX:
27047
              if (field.type == TType.STRUCT) {
27048
                this.scx = new WidgetException();
27049
                this.scx.read(iprot);
27050
              } else { 
27051
                TProtocolUtil.skip(iprot, field.type);
27052
              }
27053
              break;
27054
          }
27055
          iprot.readFieldEnd();
27056
        }
27057
      }
27058
      iprot.readStructEnd();
27059
      validate();
27060
    }
27061
 
27062
    public void write(TProtocol oprot) throws TException {
27063
      oprot.writeStructBegin(STRUCT_DESC);
27064
 
27065
      if (this.isSetScx()) {
27066
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27067
        this.scx.write(oprot);
27068
        oprot.writeFieldEnd();
27069
      }
27070
      oprot.writeFieldStop();
27071
      oprot.writeStructEnd();
27072
    }
27073
 
27074
    @Override
27075
    public String toString() {
27076
      StringBuilder sb = new StringBuilder("addWidget_result(");
27077
      boolean first = true;
27078
 
27079
      sb.append("scx:");
27080
      if (this.scx == null) {
27081
        sb.append("null");
27082
      } else {
27083
        sb.append(this.scx);
27084
      }
27085
      first = false;
27086
      sb.append(")");
27087
      return sb.toString();
27088
    }
27089
 
27090
    public void validate() throws TException {
27091
      // check for required fields
27092
    }
27093
 
27094
  }
27095
 
27096
  public static class addItemToWidget_args implements TBase<addItemToWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_args>   {
27097
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_args");
27098
 
27099
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
27100
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.LIST, (short)2);
27101
 
27102
    private long widget_id;
27103
    private List<Long> items;
27104
 
27105
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27106
    public enum _Fields implements TFieldIdEnum {
27107
      WIDGET_ID((short)1, "widget_id"),
27108
      ITEMS((short)2, "items");
27109
 
27110
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27111
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27112
 
27113
      static {
27114
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27115
          byId.put((int)field._thriftId, field);
27116
          byName.put(field.getFieldName(), field);
27117
        }
27118
      }
27119
 
27120
      /**
27121
       * Find the _Fields constant that matches fieldId, or null if its not found.
27122
       */
27123
      public static _Fields findByThriftId(int fieldId) {
27124
        return byId.get(fieldId);
27125
      }
27126
 
27127
      /**
27128
       * Find the _Fields constant that matches fieldId, throwing an exception
27129
       * if it is not found.
27130
       */
27131
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27132
        _Fields fields = findByThriftId(fieldId);
27133
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27134
        return fields;
27135
      }
27136
 
27137
      /**
27138
       * Find the _Fields constant that matches name, or null if its not found.
27139
       */
27140
      public static _Fields findByName(String name) {
27141
        return byName.get(name);
27142
      }
27143
 
27144
      private final short _thriftId;
27145
      private final String _fieldName;
27146
 
27147
      _Fields(short thriftId, String fieldName) {
27148
        _thriftId = thriftId;
27149
        _fieldName = fieldName;
27150
      }
27151
 
27152
      public short getThriftFieldId() {
27153
        return _thriftId;
27154
      }
27155
 
27156
      public String getFieldName() {
27157
        return _fieldName;
27158
      }
27159
    }
27160
 
27161
    // isset id assignments
27162
    private static final int __WIDGET_ID_ISSET_ID = 0;
27163
    private BitSet __isset_bit_vector = new BitSet(1);
27164
 
27165
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27166
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
27167
          new FieldValueMetaData(TType.I64)));
27168
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
27169
          new ListMetaData(TType.LIST, 
27170
              new FieldValueMetaData(TType.I64))));
27171
    }});
27172
 
27173
    static {
27174
      FieldMetaData.addStructMetaDataMap(addItemToWidget_args.class, metaDataMap);
27175
    }
27176
 
27177
    public addItemToWidget_args() {
27178
    }
27179
 
27180
    public addItemToWidget_args(
27181
      long widget_id,
27182
      List<Long> items)
27183
    {
27184
      this();
27185
      this.widget_id = widget_id;
27186
      setWidget_idIsSet(true);
27187
      this.items = items;
27188
    }
27189
 
27190
    /**
27191
     * Performs a deep copy on <i>other</i>.
27192
     */
27193
    public addItemToWidget_args(addItemToWidget_args other) {
27194
      __isset_bit_vector.clear();
27195
      __isset_bit_vector.or(other.__isset_bit_vector);
27196
      this.widget_id = other.widget_id;
27197
      if (other.isSetItems()) {
27198
        List<Long> __this__items = new ArrayList<Long>();
27199
        for (Long other_element : other.items) {
27200
          __this__items.add(other_element);
27201
        }
27202
        this.items = __this__items;
27203
      }
27204
    }
27205
 
27206
    public addItemToWidget_args deepCopy() {
27207
      return new addItemToWidget_args(this);
27208
    }
27209
 
27210
    @Deprecated
27211
    public addItemToWidget_args clone() {
27212
      return new addItemToWidget_args(this);
27213
    }
27214
 
27215
    public long getWidget_id() {
27216
      return this.widget_id;
27217
    }
27218
 
27219
    public addItemToWidget_args setWidget_id(long widget_id) {
27220
      this.widget_id = widget_id;
27221
      setWidget_idIsSet(true);
27222
      return this;
27223
    }
27224
 
27225
    public void unsetWidget_id() {
27226
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
27227
    }
27228
 
27229
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
27230
    public boolean isSetWidget_id() {
27231
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
27232
    }
27233
 
27234
    public void setWidget_idIsSet(boolean value) {
27235
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
27236
    }
27237
 
27238
    public int getItemsSize() {
27239
      return (this.items == null) ? 0 : this.items.size();
27240
    }
27241
 
27242
    public java.util.Iterator<Long> getItemsIterator() {
27243
      return (this.items == null) ? null : this.items.iterator();
27244
    }
27245
 
27246
    public void addToItems(long elem) {
27247
      if (this.items == null) {
27248
        this.items = new ArrayList<Long>();
27249
      }
27250
      this.items.add(elem);
27251
    }
27252
 
27253
    public List<Long> getItems() {
27254
      return this.items;
27255
    }
27256
 
27257
    public addItemToWidget_args setItems(List<Long> items) {
27258
      this.items = items;
27259
      return this;
27260
    }
27261
 
27262
    public void unsetItems() {
27263
      this.items = null;
27264
    }
27265
 
27266
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
27267
    public boolean isSetItems() {
27268
      return this.items != null;
27269
    }
27270
 
27271
    public void setItemsIsSet(boolean value) {
27272
      if (!value) {
27273
        this.items = null;
27274
      }
27275
    }
27276
 
27277
    public void setFieldValue(_Fields field, Object value) {
27278
      switch (field) {
27279
      case WIDGET_ID:
27280
        if (value == null) {
27281
          unsetWidget_id();
27282
        } else {
27283
          setWidget_id((Long)value);
27284
        }
27285
        break;
27286
 
27287
      case ITEMS:
27288
        if (value == null) {
27289
          unsetItems();
27290
        } else {
27291
          setItems((List<Long>)value);
27292
        }
27293
        break;
27294
 
27295
      }
27296
    }
27297
 
27298
    public void setFieldValue(int fieldID, Object value) {
27299
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27300
    }
27301
 
27302
    public Object getFieldValue(_Fields field) {
27303
      switch (field) {
27304
      case WIDGET_ID:
27305
        return new Long(getWidget_id());
27306
 
27307
      case ITEMS:
27308
        return getItems();
27309
 
27310
      }
27311
      throw new IllegalStateException();
27312
    }
27313
 
48 ashish 27314
    public Object getFieldValue(int fieldId) {
27315
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27316
    }
27317
 
27318
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27319
    public boolean isSet(_Fields field) {
27320
      switch (field) {
553 chandransh 27321
      case WIDGET_ID:
27322
        return isSetWidget_id();
27323
      case ITEMS:
27324
        return isSetItems();
48 ashish 27325
      }
27326
      throw new IllegalStateException();
27327
    }
27328
 
27329
    public boolean isSet(int fieldID) {
27330
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27331
    }
27332
 
27333
    @Override
27334
    public boolean equals(Object that) {
27335
      if (that == null)
27336
        return false;
553 chandransh 27337
      if (that instanceof addItemToWidget_args)
27338
        return this.equals((addItemToWidget_args)that);
48 ashish 27339
      return false;
27340
    }
27341
 
553 chandransh 27342
    public boolean equals(addItemToWidget_args that) {
48 ashish 27343
      if (that == null)
27344
        return false;
27345
 
553 chandransh 27346
      boolean this_present_widget_id = true;
27347
      boolean that_present_widget_id = true;
27348
      if (this_present_widget_id || that_present_widget_id) {
27349
        if (!(this_present_widget_id && that_present_widget_id))
48 ashish 27350
          return false;
553 chandransh 27351
        if (this.widget_id != that.widget_id)
48 ashish 27352
          return false;
27353
      }
27354
 
553 chandransh 27355
      boolean this_present_items = true && this.isSetItems();
27356
      boolean that_present_items = true && that.isSetItems();
27357
      if (this_present_items || that_present_items) {
27358
        if (!(this_present_items && that_present_items))
48 ashish 27359
          return false;
553 chandransh 27360
        if (!this.items.equals(that.items))
48 ashish 27361
          return false;
27362
      }
27363
 
27364
      return true;
27365
    }
27366
 
27367
    @Override
27368
    public int hashCode() {
27369
      return 0;
27370
    }
27371
 
553 chandransh 27372
    public int compareTo(addItemToWidget_args other) {
48 ashish 27373
      if (!getClass().equals(other.getClass())) {
27374
        return getClass().getName().compareTo(other.getClass().getName());
27375
      }
27376
 
27377
      int lastComparison = 0;
553 chandransh 27378
      addItemToWidget_args typedOther = (addItemToWidget_args)other;
48 ashish 27379
 
553 chandransh 27380
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
48 ashish 27381
      if (lastComparison != 0) {
27382
        return lastComparison;
27383
      }
553 chandransh 27384
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
48 ashish 27385
      if (lastComparison != 0) {
27386
        return lastComparison;
27387
      }
553 chandransh 27388
      lastComparison = Boolean.valueOf(isSetItems()).compareTo(isSetItems());
48 ashish 27389
      if (lastComparison != 0) {
27390
        return lastComparison;
27391
      }
553 chandransh 27392
      lastComparison = TBaseHelper.compareTo(items, typedOther.items);
48 ashish 27393
      if (lastComparison != 0) {
27394
        return lastComparison;
27395
      }
27396
      return 0;
27397
    }
27398
 
27399
    public void read(TProtocol iprot) throws TException {
27400
      TField field;
27401
      iprot.readStructBegin();
27402
      while (true)
27403
      {
27404
        field = iprot.readFieldBegin();
27405
        if (field.type == TType.STOP) { 
27406
          break;
27407
        }
27408
        _Fields fieldId = _Fields.findByThriftId(field.id);
27409
        if (fieldId == null) {
27410
          TProtocolUtil.skip(iprot, field.type);
27411
        } else {
27412
          switch (fieldId) {
553 chandransh 27413
            case WIDGET_ID:
27414
              if (field.type == TType.I64) {
27415
                this.widget_id = iprot.readI64();
27416
                setWidget_idIsSet(true);
48 ashish 27417
              } else { 
27418
                TProtocolUtil.skip(iprot, field.type);
27419
              }
27420
              break;
553 chandransh 27421
            case ITEMS:
27422
              if (field.type == TType.LIST) {
27423
                {
688 chandransh 27424
                  TList _list42 = iprot.readListBegin();
27425
                  this.items = new ArrayList<Long>(_list42.size);
27426
                  for (int _i43 = 0; _i43 < _list42.size; ++_i43)
553 chandransh 27427
                  {
688 chandransh 27428
                    long _elem44;
27429
                    _elem44 = iprot.readI64();
27430
                    this.items.add(_elem44);
553 chandransh 27431
                  }
27432
                  iprot.readListEnd();
27433
                }
27434
              } else { 
27435
                TProtocolUtil.skip(iprot, field.type);
27436
              }
27437
              break;
27438
          }
27439
          iprot.readFieldEnd();
27440
        }
27441
      }
27442
      iprot.readStructEnd();
27443
      validate();
27444
    }
27445
 
27446
    public void write(TProtocol oprot) throws TException {
27447
      validate();
27448
 
27449
      oprot.writeStructBegin(STRUCT_DESC);
27450
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
27451
      oprot.writeI64(this.widget_id);
27452
      oprot.writeFieldEnd();
27453
      if (this.items != null) {
27454
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
27455
        {
27456
          oprot.writeListBegin(new TList(TType.I64, this.items.size()));
688 chandransh 27457
          for (long _iter45 : this.items)
553 chandransh 27458
          {
688 chandransh 27459
            oprot.writeI64(_iter45);
553 chandransh 27460
          }
27461
          oprot.writeListEnd();
27462
        }
27463
        oprot.writeFieldEnd();
27464
      }
27465
      oprot.writeFieldStop();
27466
      oprot.writeStructEnd();
27467
    }
27468
 
27469
    @Override
27470
    public String toString() {
27471
      StringBuilder sb = new StringBuilder("addItemToWidget_args(");
27472
      boolean first = true;
27473
 
27474
      sb.append("widget_id:");
27475
      sb.append(this.widget_id);
27476
      first = false;
27477
      if (!first) sb.append(", ");
27478
      sb.append("items:");
27479
      if (this.items == null) {
27480
        sb.append("null");
27481
      } else {
27482
        sb.append(this.items);
27483
      }
27484
      first = false;
27485
      sb.append(")");
27486
      return sb.toString();
27487
    }
27488
 
27489
    public void validate() throws TException {
27490
      // check for required fields
27491
    }
27492
 
27493
  }
27494
 
27495
  public static class addItemToWidget_result implements TBase<addItemToWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToWidget_result>   {
27496
    private static final TStruct STRUCT_DESC = new TStruct("addItemToWidget_result");
27497
 
27498
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27499
 
27500
    private WidgetException scx;
27501
 
27502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27503
    public enum _Fields implements TFieldIdEnum {
27504
      SCX((short)1, "scx");
27505
 
27506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27508
 
27509
      static {
27510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27511
          byId.put((int)field._thriftId, field);
27512
          byName.put(field.getFieldName(), field);
27513
        }
27514
      }
27515
 
27516
      /**
27517
       * Find the _Fields constant that matches fieldId, or null if its not found.
27518
       */
27519
      public static _Fields findByThriftId(int fieldId) {
27520
        return byId.get(fieldId);
27521
      }
27522
 
27523
      /**
27524
       * Find the _Fields constant that matches fieldId, throwing an exception
27525
       * if it is not found.
27526
       */
27527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27528
        _Fields fields = findByThriftId(fieldId);
27529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27530
        return fields;
27531
      }
27532
 
27533
      /**
27534
       * Find the _Fields constant that matches name, or null if its not found.
27535
       */
27536
      public static _Fields findByName(String name) {
27537
        return byName.get(name);
27538
      }
27539
 
27540
      private final short _thriftId;
27541
      private final String _fieldName;
27542
 
27543
      _Fields(short thriftId, String fieldName) {
27544
        _thriftId = thriftId;
27545
        _fieldName = fieldName;
27546
      }
27547
 
27548
      public short getThriftFieldId() {
27549
        return _thriftId;
27550
      }
27551
 
27552
      public String getFieldName() {
27553
        return _fieldName;
27554
      }
27555
    }
27556
 
27557
    // isset id assignments
27558
 
27559
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27560
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27561
          new FieldValueMetaData(TType.STRUCT)));
27562
    }});
27563
 
27564
    static {
27565
      FieldMetaData.addStructMetaDataMap(addItemToWidget_result.class, metaDataMap);
27566
    }
27567
 
27568
    public addItemToWidget_result() {
27569
    }
27570
 
27571
    public addItemToWidget_result(
27572
      WidgetException scx)
27573
    {
27574
      this();
27575
      this.scx = scx;
27576
    }
27577
 
27578
    /**
27579
     * Performs a deep copy on <i>other</i>.
27580
     */
27581
    public addItemToWidget_result(addItemToWidget_result other) {
27582
      if (other.isSetScx()) {
27583
        this.scx = new WidgetException(other.scx);
27584
      }
27585
    }
27586
 
27587
    public addItemToWidget_result deepCopy() {
27588
      return new addItemToWidget_result(this);
27589
    }
27590
 
27591
    @Deprecated
27592
    public addItemToWidget_result clone() {
27593
      return new addItemToWidget_result(this);
27594
    }
27595
 
27596
    public WidgetException getScx() {
27597
      return this.scx;
27598
    }
27599
 
27600
    public addItemToWidget_result setScx(WidgetException scx) {
27601
      this.scx = scx;
27602
      return this;
27603
    }
27604
 
27605
    public void unsetScx() {
27606
      this.scx = null;
27607
    }
27608
 
27609
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27610
    public boolean isSetScx() {
27611
      return this.scx != null;
27612
    }
27613
 
27614
    public void setScxIsSet(boolean value) {
27615
      if (!value) {
27616
        this.scx = null;
27617
      }
27618
    }
27619
 
27620
    public void setFieldValue(_Fields field, Object value) {
27621
      switch (field) {
27622
      case SCX:
27623
        if (value == null) {
27624
          unsetScx();
27625
        } else {
27626
          setScx((WidgetException)value);
27627
        }
27628
        break;
27629
 
27630
      }
27631
    }
27632
 
27633
    public void setFieldValue(int fieldID, Object value) {
27634
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27635
    }
27636
 
27637
    public Object getFieldValue(_Fields field) {
27638
      switch (field) {
27639
      case SCX:
27640
        return getScx();
27641
 
27642
      }
27643
      throw new IllegalStateException();
27644
    }
27645
 
27646
    public Object getFieldValue(int fieldId) {
27647
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27648
    }
27649
 
27650
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27651
    public boolean isSet(_Fields field) {
27652
      switch (field) {
27653
      case SCX:
27654
        return isSetScx();
27655
      }
27656
      throw new IllegalStateException();
27657
    }
27658
 
27659
    public boolean isSet(int fieldID) {
27660
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27661
    }
27662
 
27663
    @Override
27664
    public boolean equals(Object that) {
27665
      if (that == null)
27666
        return false;
27667
      if (that instanceof addItemToWidget_result)
27668
        return this.equals((addItemToWidget_result)that);
27669
      return false;
27670
    }
27671
 
27672
    public boolean equals(addItemToWidget_result that) {
27673
      if (that == null)
27674
        return false;
27675
 
27676
      boolean this_present_scx = true && this.isSetScx();
27677
      boolean that_present_scx = true && that.isSetScx();
27678
      if (this_present_scx || that_present_scx) {
27679
        if (!(this_present_scx && that_present_scx))
27680
          return false;
27681
        if (!this.scx.equals(that.scx))
27682
          return false;
27683
      }
27684
 
27685
      return true;
27686
    }
27687
 
27688
    @Override
27689
    public int hashCode() {
27690
      return 0;
27691
    }
27692
 
27693
    public int compareTo(addItemToWidget_result other) {
27694
      if (!getClass().equals(other.getClass())) {
27695
        return getClass().getName().compareTo(other.getClass().getName());
27696
      }
27697
 
27698
      int lastComparison = 0;
27699
      addItemToWidget_result typedOther = (addItemToWidget_result)other;
27700
 
27701
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
27702
      if (lastComparison != 0) {
27703
        return lastComparison;
27704
      }
27705
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
27706
      if (lastComparison != 0) {
27707
        return lastComparison;
27708
      }
27709
      return 0;
27710
    }
27711
 
27712
    public void read(TProtocol iprot) throws TException {
27713
      TField field;
27714
      iprot.readStructBegin();
27715
      while (true)
27716
      {
27717
        field = iprot.readFieldBegin();
27718
        if (field.type == TType.STOP) { 
27719
          break;
27720
        }
27721
        _Fields fieldId = _Fields.findByThriftId(field.id);
27722
        if (fieldId == null) {
27723
          TProtocolUtil.skip(iprot, field.type);
27724
        } else {
27725
          switch (fieldId) {
27726
            case SCX:
48 ashish 27727
              if (field.type == TType.STRUCT) {
553 chandransh 27728
                this.scx = new WidgetException();
27729
                this.scx.read(iprot);
48 ashish 27730
              } else { 
27731
                TProtocolUtil.skip(iprot, field.type);
27732
              }
27733
              break;
27734
          }
27735
          iprot.readFieldEnd();
27736
        }
27737
      }
27738
      iprot.readStructEnd();
27739
      validate();
27740
    }
27741
 
27742
    public void write(TProtocol oprot) throws TException {
27743
      oprot.writeStructBegin(STRUCT_DESC);
27744
 
553 chandransh 27745
      if (this.isSetScx()) {
27746
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27747
        this.scx.write(oprot);
48 ashish 27748
        oprot.writeFieldEnd();
27749
      }
27750
      oprot.writeFieldStop();
27751
      oprot.writeStructEnd();
27752
    }
27753
 
27754
    @Override
27755
    public String toString() {
553 chandransh 27756
      StringBuilder sb = new StringBuilder("addItemToWidget_result(");
48 ashish 27757
      boolean first = true;
27758
 
553 chandransh 27759
      sb.append("scx:");
27760
      if (this.scx == null) {
27761
        sb.append("null");
27762
      } else {
27763
        sb.append(this.scx);
27764
      }
48 ashish 27765
      first = false;
553 chandransh 27766
      sb.append(")");
27767
      return sb.toString();
27768
    }
27769
 
27770
    public void validate() throws TException {
27771
      // check for required fields
27772
    }
27773
 
27774
  }
27775
 
27776
  public static class deleteItemFromWidget_args implements TBase<deleteItemFromWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_args>   {
27777
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_args");
27778
 
27779
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widget_id", TType.I64, (short)1);
27780
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
27781
 
27782
    private long widget_id;
27783
    private long item_id;
27784
 
27785
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27786
    public enum _Fields implements TFieldIdEnum {
27787
      WIDGET_ID((short)1, "widget_id"),
27788
      ITEM_ID((short)2, "item_id");
27789
 
27790
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27791
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27792
 
27793
      static {
27794
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27795
          byId.put((int)field._thriftId, field);
27796
          byName.put(field.getFieldName(), field);
27797
        }
27798
      }
27799
 
27800
      /**
27801
       * Find the _Fields constant that matches fieldId, or null if its not found.
27802
       */
27803
      public static _Fields findByThriftId(int fieldId) {
27804
        return byId.get(fieldId);
27805
      }
27806
 
27807
      /**
27808
       * Find the _Fields constant that matches fieldId, throwing an exception
27809
       * if it is not found.
27810
       */
27811
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27812
        _Fields fields = findByThriftId(fieldId);
27813
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27814
        return fields;
27815
      }
27816
 
27817
      /**
27818
       * Find the _Fields constant that matches name, or null if its not found.
27819
       */
27820
      public static _Fields findByName(String name) {
27821
        return byName.get(name);
27822
      }
27823
 
27824
      private final short _thriftId;
27825
      private final String _fieldName;
27826
 
27827
      _Fields(short thriftId, String fieldName) {
27828
        _thriftId = thriftId;
27829
        _fieldName = fieldName;
27830
      }
27831
 
27832
      public short getThriftFieldId() {
27833
        return _thriftId;
27834
      }
27835
 
27836
      public String getFieldName() {
27837
        return _fieldName;
27838
      }
27839
    }
27840
 
27841
    // isset id assignments
27842
    private static final int __WIDGET_ID_ISSET_ID = 0;
27843
    private static final int __ITEM_ID_ISSET_ID = 1;
27844
    private BitSet __isset_bit_vector = new BitSet(2);
27845
 
27846
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27847
      put(_Fields.WIDGET_ID, new FieldMetaData("widget_id", TFieldRequirementType.DEFAULT, 
27848
          new FieldValueMetaData(TType.I64)));
27849
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
27850
          new FieldValueMetaData(TType.I64)));
27851
    }});
27852
 
27853
    static {
27854
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_args.class, metaDataMap);
27855
    }
27856
 
27857
    public deleteItemFromWidget_args() {
27858
    }
27859
 
27860
    public deleteItemFromWidget_args(
27861
      long widget_id,
27862
      long item_id)
27863
    {
27864
      this();
27865
      this.widget_id = widget_id;
27866
      setWidget_idIsSet(true);
27867
      this.item_id = item_id;
27868
      setItem_idIsSet(true);
27869
    }
27870
 
27871
    /**
27872
     * Performs a deep copy on <i>other</i>.
27873
     */
27874
    public deleteItemFromWidget_args(deleteItemFromWidget_args other) {
27875
      __isset_bit_vector.clear();
27876
      __isset_bit_vector.or(other.__isset_bit_vector);
27877
      this.widget_id = other.widget_id;
27878
      this.item_id = other.item_id;
27879
    }
27880
 
27881
    public deleteItemFromWidget_args deepCopy() {
27882
      return new deleteItemFromWidget_args(this);
27883
    }
27884
 
27885
    @Deprecated
27886
    public deleteItemFromWidget_args clone() {
27887
      return new deleteItemFromWidget_args(this);
27888
    }
27889
 
27890
    public long getWidget_id() {
27891
      return this.widget_id;
27892
    }
27893
 
27894
    public deleteItemFromWidget_args setWidget_id(long widget_id) {
27895
      this.widget_id = widget_id;
27896
      setWidget_idIsSet(true);
27897
      return this;
27898
    }
27899
 
27900
    public void unsetWidget_id() {
27901
      __isset_bit_vector.clear(__WIDGET_ID_ISSET_ID);
27902
    }
27903
 
27904
    /** Returns true if field widget_id is set (has been asigned a value) and false otherwise */
27905
    public boolean isSetWidget_id() {
27906
      return __isset_bit_vector.get(__WIDGET_ID_ISSET_ID);
27907
    }
27908
 
27909
    public void setWidget_idIsSet(boolean value) {
27910
      __isset_bit_vector.set(__WIDGET_ID_ISSET_ID, value);
27911
    }
27912
 
27913
    public long getItem_id() {
27914
      return this.item_id;
27915
    }
27916
 
27917
    public deleteItemFromWidget_args setItem_id(long item_id) {
27918
      this.item_id = item_id;
27919
      setItem_idIsSet(true);
27920
      return this;
27921
    }
27922
 
27923
    public void unsetItem_id() {
27924
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
27925
    }
27926
 
27927
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
27928
    public boolean isSetItem_id() {
27929
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
27930
    }
27931
 
27932
    public void setItem_idIsSet(boolean value) {
27933
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
27934
    }
27935
 
27936
    public void setFieldValue(_Fields field, Object value) {
27937
      switch (field) {
27938
      case WIDGET_ID:
27939
        if (value == null) {
27940
          unsetWidget_id();
27941
        } else {
27942
          setWidget_id((Long)value);
27943
        }
27944
        break;
27945
 
27946
      case ITEM_ID:
27947
        if (value == null) {
27948
          unsetItem_id();
27949
        } else {
27950
          setItem_id((Long)value);
27951
        }
27952
        break;
27953
 
27954
      }
27955
    }
27956
 
27957
    public void setFieldValue(int fieldID, Object value) {
27958
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27959
    }
27960
 
27961
    public Object getFieldValue(_Fields field) {
27962
      switch (field) {
27963
      case WIDGET_ID:
27964
        return new Long(getWidget_id());
27965
 
27966
      case ITEM_ID:
27967
        return new Long(getItem_id());
27968
 
27969
      }
27970
      throw new IllegalStateException();
27971
    }
27972
 
27973
    public Object getFieldValue(int fieldId) {
27974
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27975
    }
27976
 
27977
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27978
    public boolean isSet(_Fields field) {
27979
      switch (field) {
27980
      case WIDGET_ID:
27981
        return isSetWidget_id();
27982
      case ITEM_ID:
27983
        return isSetItem_id();
27984
      }
27985
      throw new IllegalStateException();
27986
    }
27987
 
27988
    public boolean isSet(int fieldID) {
27989
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27990
    }
27991
 
27992
    @Override
27993
    public boolean equals(Object that) {
27994
      if (that == null)
27995
        return false;
27996
      if (that instanceof deleteItemFromWidget_args)
27997
        return this.equals((deleteItemFromWidget_args)that);
27998
      return false;
27999
    }
28000
 
28001
    public boolean equals(deleteItemFromWidget_args that) {
28002
      if (that == null)
28003
        return false;
28004
 
28005
      boolean this_present_widget_id = true;
28006
      boolean that_present_widget_id = true;
28007
      if (this_present_widget_id || that_present_widget_id) {
28008
        if (!(this_present_widget_id && that_present_widget_id))
28009
          return false;
28010
        if (this.widget_id != that.widget_id)
28011
          return false;
28012
      }
28013
 
28014
      boolean this_present_item_id = true;
28015
      boolean that_present_item_id = true;
28016
      if (this_present_item_id || that_present_item_id) {
28017
        if (!(this_present_item_id && that_present_item_id))
28018
          return false;
28019
        if (this.item_id != that.item_id)
28020
          return false;
28021
      }
28022
 
28023
      return true;
28024
    }
28025
 
28026
    @Override
28027
    public int hashCode() {
28028
      return 0;
28029
    }
28030
 
28031
    public int compareTo(deleteItemFromWidget_args other) {
28032
      if (!getClass().equals(other.getClass())) {
28033
        return getClass().getName().compareTo(other.getClass().getName());
28034
      }
28035
 
28036
      int lastComparison = 0;
28037
      deleteItemFromWidget_args typedOther = (deleteItemFromWidget_args)other;
28038
 
28039
      lastComparison = Boolean.valueOf(isSetWidget_id()).compareTo(isSetWidget_id());
28040
      if (lastComparison != 0) {
28041
        return lastComparison;
28042
      }
28043
      lastComparison = TBaseHelper.compareTo(widget_id, typedOther.widget_id);
28044
      if (lastComparison != 0) {
28045
        return lastComparison;
28046
      }
28047
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
28048
      if (lastComparison != 0) {
28049
        return lastComparison;
28050
      }
28051
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
28052
      if (lastComparison != 0) {
28053
        return lastComparison;
28054
      }
28055
      return 0;
28056
    }
28057
 
28058
    public void read(TProtocol iprot) throws TException {
28059
      TField field;
28060
      iprot.readStructBegin();
28061
      while (true)
28062
      {
28063
        field = iprot.readFieldBegin();
28064
        if (field.type == TType.STOP) { 
28065
          break;
28066
        }
28067
        _Fields fieldId = _Fields.findByThriftId(field.id);
28068
        if (fieldId == null) {
28069
          TProtocolUtil.skip(iprot, field.type);
28070
        } else {
28071
          switch (fieldId) {
28072
            case WIDGET_ID:
28073
              if (field.type == TType.I64) {
28074
                this.widget_id = iprot.readI64();
28075
                setWidget_idIsSet(true);
28076
              } else { 
28077
                TProtocolUtil.skip(iprot, field.type);
28078
              }
28079
              break;
28080
            case ITEM_ID:
28081
              if (field.type == TType.I64) {
28082
                this.item_id = iprot.readI64();
28083
                setItem_idIsSet(true);
28084
              } else { 
28085
                TProtocolUtil.skip(iprot, field.type);
28086
              }
28087
              break;
28088
          }
28089
          iprot.readFieldEnd();
28090
        }
28091
      }
28092
      iprot.readStructEnd();
28093
      validate();
28094
    }
28095
 
28096
    public void write(TProtocol oprot) throws TException {
28097
      validate();
28098
 
28099
      oprot.writeStructBegin(STRUCT_DESC);
28100
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
28101
      oprot.writeI64(this.widget_id);
28102
      oprot.writeFieldEnd();
28103
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
28104
      oprot.writeI64(this.item_id);
28105
      oprot.writeFieldEnd();
28106
      oprot.writeFieldStop();
28107
      oprot.writeStructEnd();
28108
    }
28109
 
28110
    @Override
28111
    public String toString() {
28112
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_args(");
28113
      boolean first = true;
28114
 
28115
      sb.append("widget_id:");
28116
      sb.append(this.widget_id);
28117
      first = false;
48 ashish 28118
      if (!first) sb.append(", ");
553 chandransh 28119
      sb.append("item_id:");
28120
      sb.append(this.item_id);
28121
      first = false;
28122
      sb.append(")");
28123
      return sb.toString();
28124
    }
28125
 
28126
    public void validate() throws TException {
28127
      // check for required fields
28128
    }
28129
 
28130
  }
28131
 
28132
  public static class deleteItemFromWidget_result implements TBase<deleteItemFromWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromWidget_result>   {
28133
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromWidget_result");
28134
 
28135
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28136
 
28137
    private WidgetException scx;
28138
 
28139
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28140
    public enum _Fields implements TFieldIdEnum {
28141
      SCX((short)1, "scx");
28142
 
28143
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28144
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28145
 
28146
      static {
28147
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28148
          byId.put((int)field._thriftId, field);
28149
          byName.put(field.getFieldName(), field);
28150
        }
28151
      }
28152
 
28153
      /**
28154
       * Find the _Fields constant that matches fieldId, or null if its not found.
28155
       */
28156
      public static _Fields findByThriftId(int fieldId) {
28157
        return byId.get(fieldId);
28158
      }
28159
 
28160
      /**
28161
       * Find the _Fields constant that matches fieldId, throwing an exception
28162
       * if it is not found.
28163
       */
28164
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28165
        _Fields fields = findByThriftId(fieldId);
28166
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28167
        return fields;
28168
      }
28169
 
28170
      /**
28171
       * Find the _Fields constant that matches name, or null if its not found.
28172
       */
28173
      public static _Fields findByName(String name) {
28174
        return byName.get(name);
28175
      }
28176
 
28177
      private final short _thriftId;
28178
      private final String _fieldName;
28179
 
28180
      _Fields(short thriftId, String fieldName) {
28181
        _thriftId = thriftId;
28182
        _fieldName = fieldName;
28183
      }
28184
 
28185
      public short getThriftFieldId() {
28186
        return _thriftId;
28187
      }
28188
 
28189
      public String getFieldName() {
28190
        return _fieldName;
28191
      }
28192
    }
28193
 
28194
    // isset id assignments
28195
 
28196
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28197
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28198
          new FieldValueMetaData(TType.STRUCT)));
28199
    }});
28200
 
28201
    static {
28202
      FieldMetaData.addStructMetaDataMap(deleteItemFromWidget_result.class, metaDataMap);
28203
    }
28204
 
28205
    public deleteItemFromWidget_result() {
28206
    }
28207
 
28208
    public deleteItemFromWidget_result(
28209
      WidgetException scx)
28210
    {
28211
      this();
28212
      this.scx = scx;
28213
    }
28214
 
28215
    /**
28216
     * Performs a deep copy on <i>other</i>.
28217
     */
28218
    public deleteItemFromWidget_result(deleteItemFromWidget_result other) {
28219
      if (other.isSetScx()) {
28220
        this.scx = new WidgetException(other.scx);
28221
      }
28222
    }
28223
 
28224
    public deleteItemFromWidget_result deepCopy() {
28225
      return new deleteItemFromWidget_result(this);
28226
    }
28227
 
28228
    @Deprecated
28229
    public deleteItemFromWidget_result clone() {
28230
      return new deleteItemFromWidget_result(this);
28231
    }
28232
 
28233
    public WidgetException getScx() {
28234
      return this.scx;
28235
    }
28236
 
28237
    public deleteItemFromWidget_result setScx(WidgetException scx) {
28238
      this.scx = scx;
28239
      return this;
28240
    }
28241
 
28242
    public void unsetScx() {
28243
      this.scx = null;
28244
    }
28245
 
28246
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28247
    public boolean isSetScx() {
28248
      return this.scx != null;
28249
    }
28250
 
28251
    public void setScxIsSet(boolean value) {
28252
      if (!value) {
28253
        this.scx = null;
28254
      }
28255
    }
28256
 
28257
    public void setFieldValue(_Fields field, Object value) {
28258
      switch (field) {
28259
      case SCX:
28260
        if (value == null) {
28261
          unsetScx();
28262
        } else {
28263
          setScx((WidgetException)value);
28264
        }
28265
        break;
28266
 
28267
      }
28268
    }
28269
 
28270
    public void setFieldValue(int fieldID, Object value) {
28271
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28272
    }
28273
 
28274
    public Object getFieldValue(_Fields field) {
28275
      switch (field) {
28276
      case SCX:
28277
        return getScx();
28278
 
28279
      }
28280
      throw new IllegalStateException();
28281
    }
28282
 
28283
    public Object getFieldValue(int fieldId) {
28284
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28285
    }
28286
 
28287
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28288
    public boolean isSet(_Fields field) {
28289
      switch (field) {
28290
      case SCX:
28291
        return isSetScx();
28292
      }
28293
      throw new IllegalStateException();
28294
    }
28295
 
28296
    public boolean isSet(int fieldID) {
28297
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28298
    }
28299
 
28300
    @Override
28301
    public boolean equals(Object that) {
28302
      if (that == null)
28303
        return false;
28304
      if (that instanceof deleteItemFromWidget_result)
28305
        return this.equals((deleteItemFromWidget_result)that);
28306
      return false;
28307
    }
28308
 
28309
    public boolean equals(deleteItemFromWidget_result that) {
28310
      if (that == null)
28311
        return false;
28312
 
28313
      boolean this_present_scx = true && this.isSetScx();
28314
      boolean that_present_scx = true && that.isSetScx();
28315
      if (this_present_scx || that_present_scx) {
28316
        if (!(this_present_scx && that_present_scx))
28317
          return false;
28318
        if (!this.scx.equals(that.scx))
28319
          return false;
28320
      }
28321
 
28322
      return true;
28323
    }
28324
 
28325
    @Override
28326
    public int hashCode() {
28327
      return 0;
28328
    }
28329
 
28330
    public int compareTo(deleteItemFromWidget_result other) {
28331
      if (!getClass().equals(other.getClass())) {
28332
        return getClass().getName().compareTo(other.getClass().getName());
28333
      }
28334
 
28335
      int lastComparison = 0;
28336
      deleteItemFromWidget_result typedOther = (deleteItemFromWidget_result)other;
28337
 
28338
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28339
      if (lastComparison != 0) {
28340
        return lastComparison;
28341
      }
28342
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28343
      if (lastComparison != 0) {
28344
        return lastComparison;
28345
      }
28346
      return 0;
28347
    }
28348
 
28349
    public void read(TProtocol iprot) throws TException {
28350
      TField field;
28351
      iprot.readStructBegin();
28352
      while (true)
28353
      {
28354
        field = iprot.readFieldBegin();
28355
        if (field.type == TType.STOP) { 
28356
          break;
28357
        }
28358
        _Fields fieldId = _Fields.findByThriftId(field.id);
28359
        if (fieldId == null) {
28360
          TProtocolUtil.skip(iprot, field.type);
28361
        } else {
28362
          switch (fieldId) {
28363
            case SCX:
28364
              if (field.type == TType.STRUCT) {
28365
                this.scx = new WidgetException();
28366
                this.scx.read(iprot);
28367
              } else { 
28368
                TProtocolUtil.skip(iprot, field.type);
28369
              }
28370
              break;
28371
          }
28372
          iprot.readFieldEnd();
28373
        }
28374
      }
28375
      iprot.readStructEnd();
28376
      validate();
28377
    }
28378
 
28379
    public void write(TProtocol oprot) throws TException {
28380
      oprot.writeStructBegin(STRUCT_DESC);
28381
 
28382
      if (this.isSetScx()) {
28383
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28384
        this.scx.write(oprot);
28385
        oprot.writeFieldEnd();
28386
      }
28387
      oprot.writeFieldStop();
28388
      oprot.writeStructEnd();
28389
    }
28390
 
28391
    @Override
28392
    public String toString() {
28393
      StringBuilder sb = new StringBuilder("deleteItemFromWidget_result(");
28394
      boolean first = true;
28395
 
28396
      sb.append("scx:");
28397
      if (this.scx == null) {
48 ashish 28398
        sb.append("null");
28399
      } else {
553 chandransh 28400
        sb.append(this.scx);
48 ashish 28401
      }
28402
      first = false;
28403
      sb.append(")");
28404
      return sb.toString();
28405
    }
28406
 
28407
    public void validate() throws TException {
28408
      // check for required fields
28409
    }
28410
 
28411
  }
28412
 
553 chandransh 28413
  public static class updateWidget_args implements TBase<updateWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_args>   {
28414
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_args");
48 ashish 28415
 
553 chandransh 28416
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
28417
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
48 ashish 28418
 
553 chandransh 28419
    private long widgetId;
28420
    private boolean enable;
48 ashish 28421
 
28422
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28423
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28424
      WIDGET_ID((short)1, "widgetId"),
28425
      ENABLE((short)2, "enable");
48 ashish 28426
 
28427
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28428
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28429
 
28430
      static {
28431
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28432
          byId.put((int)field._thriftId, field);
28433
          byName.put(field.getFieldName(), field);
28434
        }
28435
      }
28436
 
28437
      /**
28438
       * Find the _Fields constant that matches fieldId, or null if its not found.
28439
       */
28440
      public static _Fields findByThriftId(int fieldId) {
28441
        return byId.get(fieldId);
28442
      }
28443
 
28444
      /**
28445
       * Find the _Fields constant that matches fieldId, throwing an exception
28446
       * if it is not found.
28447
       */
28448
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28449
        _Fields fields = findByThriftId(fieldId);
28450
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28451
        return fields;
28452
      }
28453
 
28454
      /**
28455
       * Find the _Fields constant that matches name, or null if its not found.
28456
       */
28457
      public static _Fields findByName(String name) {
28458
        return byName.get(name);
28459
      }
28460
 
28461
      private final short _thriftId;
28462
      private final String _fieldName;
28463
 
28464
      _Fields(short thriftId, String fieldName) {
28465
        _thriftId = thriftId;
28466
        _fieldName = fieldName;
28467
      }
28468
 
28469
      public short getThriftFieldId() {
28470
        return _thriftId;
28471
      }
28472
 
28473
      public String getFieldName() {
28474
        return _fieldName;
28475
      }
28476
    }
28477
 
28478
    // isset id assignments
553 chandransh 28479
    private static final int __WIDGETID_ISSET_ID = 0;
28480
    private static final int __ENABLE_ISSET_ID = 1;
28481
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 28482
 
28483
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28484
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
48 ashish 28485
          new FieldValueMetaData(TType.I64)));
553 chandransh 28486
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
28487
          new FieldValueMetaData(TType.BOOL)));
48 ashish 28488
    }});
28489
 
28490
    static {
553 chandransh 28491
      FieldMetaData.addStructMetaDataMap(updateWidget_args.class, metaDataMap);
48 ashish 28492
    }
28493
 
553 chandransh 28494
    public updateWidget_args() {
48 ashish 28495
    }
28496
 
553 chandransh 28497
    public updateWidget_args(
28498
      long widgetId,
28499
      boolean enable)
48 ashish 28500
    {
28501
      this();
553 chandransh 28502
      this.widgetId = widgetId;
28503
      setWidgetIdIsSet(true);
28504
      this.enable = enable;
28505
      setEnableIsSet(true);
48 ashish 28506
    }
28507
 
28508
    /**
28509
     * Performs a deep copy on <i>other</i>.
28510
     */
553 chandransh 28511
    public updateWidget_args(updateWidget_args other) {
48 ashish 28512
      __isset_bit_vector.clear();
28513
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 28514
      this.widgetId = other.widgetId;
28515
      this.enable = other.enable;
28516
    }
28517
 
28518
    public updateWidget_args deepCopy() {
28519
      return new updateWidget_args(this);
28520
    }
28521
 
28522
    @Deprecated
28523
    public updateWidget_args clone() {
28524
      return new updateWidget_args(this);
28525
    }
28526
 
28527
    public long getWidgetId() {
28528
      return this.widgetId;
28529
    }
28530
 
28531
    public updateWidget_args setWidgetId(long widgetId) {
28532
      this.widgetId = widgetId;
28533
      setWidgetIdIsSet(true);
28534
      return this;
28535
    }
28536
 
28537
    public void unsetWidgetId() {
28538
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
28539
    }
28540
 
28541
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
28542
    public boolean isSetWidgetId() {
28543
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
28544
    }
28545
 
28546
    public void setWidgetIdIsSet(boolean value) {
28547
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
28548
    }
28549
 
28550
    public boolean isEnable() {
28551
      return this.enable;
28552
    }
28553
 
28554
    public updateWidget_args setEnable(boolean enable) {
28555
      this.enable = enable;
28556
      setEnableIsSet(true);
28557
      return this;
28558
    }
28559
 
28560
    public void unsetEnable() {
28561
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
28562
    }
28563
 
28564
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
28565
    public boolean isSetEnable() {
28566
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
28567
    }
28568
 
28569
    public void setEnableIsSet(boolean value) {
28570
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
28571
    }
28572
 
28573
    public void setFieldValue(_Fields field, Object value) {
28574
      switch (field) {
28575
      case WIDGET_ID:
28576
        if (value == null) {
28577
          unsetWidgetId();
28578
        } else {
28579
          setWidgetId((Long)value);
28580
        }
28581
        break;
28582
 
28583
      case ENABLE:
28584
        if (value == null) {
28585
          unsetEnable();
28586
        } else {
28587
          setEnable((Boolean)value);
28588
        }
28589
        break;
28590
 
48 ashish 28591
      }
553 chandransh 28592
    }
28593
 
28594
    public void setFieldValue(int fieldID, Object value) {
28595
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28596
    }
28597
 
28598
    public Object getFieldValue(_Fields field) {
28599
      switch (field) {
28600
      case WIDGET_ID:
28601
        return new Long(getWidgetId());
28602
 
28603
      case ENABLE:
28604
        return new Boolean(isEnable());
28605
 
48 ashish 28606
      }
553 chandransh 28607
      throw new IllegalStateException();
48 ashish 28608
    }
28609
 
553 chandransh 28610
    public Object getFieldValue(int fieldId) {
28611
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
48 ashish 28612
    }
28613
 
553 chandransh 28614
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28615
    public boolean isSet(_Fields field) {
28616
      switch (field) {
28617
      case WIDGET_ID:
28618
        return isSetWidgetId();
28619
      case ENABLE:
28620
        return isSetEnable();
28621
      }
28622
      throw new IllegalStateException();
28623
    }
28624
 
28625
    public boolean isSet(int fieldID) {
28626
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28627
    }
28628
 
28629
    @Override
28630
    public boolean equals(Object that) {
28631
      if (that == null)
28632
        return false;
28633
      if (that instanceof updateWidget_args)
28634
        return this.equals((updateWidget_args)that);
28635
      return false;
28636
    }
28637
 
28638
    public boolean equals(updateWidget_args that) {
28639
      if (that == null)
28640
        return false;
28641
 
28642
      boolean this_present_widgetId = true;
28643
      boolean that_present_widgetId = true;
28644
      if (this_present_widgetId || that_present_widgetId) {
28645
        if (!(this_present_widgetId && that_present_widgetId))
28646
          return false;
28647
        if (this.widgetId != that.widgetId)
28648
          return false;
28649
      }
28650
 
28651
      boolean this_present_enable = true;
28652
      boolean that_present_enable = true;
28653
      if (this_present_enable || that_present_enable) {
28654
        if (!(this_present_enable && that_present_enable))
28655
          return false;
28656
        if (this.enable != that.enable)
28657
          return false;
28658
      }
28659
 
28660
      return true;
28661
    }
28662
 
28663
    @Override
28664
    public int hashCode() {
28665
      return 0;
28666
    }
28667
 
28668
    public int compareTo(updateWidget_args other) {
28669
      if (!getClass().equals(other.getClass())) {
28670
        return getClass().getName().compareTo(other.getClass().getName());
28671
      }
28672
 
28673
      int lastComparison = 0;
28674
      updateWidget_args typedOther = (updateWidget_args)other;
28675
 
28676
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
28677
      if (lastComparison != 0) {
28678
        return lastComparison;
28679
      }
28680
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
28681
      if (lastComparison != 0) {
28682
        return lastComparison;
28683
      }
28684
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
28685
      if (lastComparison != 0) {
28686
        return lastComparison;
28687
      }
28688
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
28689
      if (lastComparison != 0) {
28690
        return lastComparison;
28691
      }
28692
      return 0;
28693
    }
28694
 
28695
    public void read(TProtocol iprot) throws TException {
28696
      TField field;
28697
      iprot.readStructBegin();
28698
      while (true)
28699
      {
28700
        field = iprot.readFieldBegin();
28701
        if (field.type == TType.STOP) { 
28702
          break;
28703
        }
28704
        _Fields fieldId = _Fields.findByThriftId(field.id);
28705
        if (fieldId == null) {
28706
          TProtocolUtil.skip(iprot, field.type);
28707
        } else {
28708
          switch (fieldId) {
28709
            case WIDGET_ID:
28710
              if (field.type == TType.I64) {
28711
                this.widgetId = iprot.readI64();
28712
                setWidgetIdIsSet(true);
28713
              } else { 
28714
                TProtocolUtil.skip(iprot, field.type);
28715
              }
28716
              break;
28717
            case ENABLE:
28718
              if (field.type == TType.BOOL) {
28719
                this.enable = iprot.readBool();
28720
                setEnableIsSet(true);
28721
              } else { 
28722
                TProtocolUtil.skip(iprot, field.type);
28723
              }
28724
              break;
28725
          }
28726
          iprot.readFieldEnd();
28727
        }
28728
      }
28729
      iprot.readStructEnd();
28730
      validate();
28731
    }
28732
 
28733
    public void write(TProtocol oprot) throws TException {
28734
      validate();
28735
 
28736
      oprot.writeStructBegin(STRUCT_DESC);
28737
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
28738
      oprot.writeI64(this.widgetId);
28739
      oprot.writeFieldEnd();
28740
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
28741
      oprot.writeBool(this.enable);
28742
      oprot.writeFieldEnd();
28743
      oprot.writeFieldStop();
28744
      oprot.writeStructEnd();
28745
    }
28746
 
28747
    @Override
28748
    public String toString() {
28749
      StringBuilder sb = new StringBuilder("updateWidget_args(");
28750
      boolean first = true;
28751
 
28752
      sb.append("widgetId:");
28753
      sb.append(this.widgetId);
28754
      first = false;
28755
      if (!first) sb.append(", ");
28756
      sb.append("enable:");
28757
      sb.append(this.enable);
28758
      first = false;
28759
      sb.append(")");
28760
      return sb.toString();
28761
    }
28762
 
28763
    public void validate() throws TException {
28764
      // check for required fields
28765
    }
28766
 
28767
  }
28768
 
28769
  public static class updateWidget_result implements TBase<updateWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidget_result>   {
28770
    private static final TStruct STRUCT_DESC = new TStruct("updateWidget_result");
28771
 
28772
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28773
 
28774
    private WidgetException scx;
28775
 
28776
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28777
    public enum _Fields implements TFieldIdEnum {
28778
      SCX((short)1, "scx");
28779
 
28780
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28781
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28782
 
28783
      static {
28784
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28785
          byId.put((int)field._thriftId, field);
28786
          byName.put(field.getFieldName(), field);
28787
        }
28788
      }
28789
 
28790
      /**
28791
       * Find the _Fields constant that matches fieldId, or null if its not found.
28792
       */
28793
      public static _Fields findByThriftId(int fieldId) {
28794
        return byId.get(fieldId);
28795
      }
28796
 
28797
      /**
28798
       * Find the _Fields constant that matches fieldId, throwing an exception
28799
       * if it is not found.
28800
       */
28801
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28802
        _Fields fields = findByThriftId(fieldId);
28803
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28804
        return fields;
28805
      }
28806
 
28807
      /**
28808
       * Find the _Fields constant that matches name, or null if its not found.
28809
       */
28810
      public static _Fields findByName(String name) {
28811
        return byName.get(name);
28812
      }
28813
 
28814
      private final short _thriftId;
28815
      private final String _fieldName;
28816
 
28817
      _Fields(short thriftId, String fieldName) {
28818
        _thriftId = thriftId;
28819
        _fieldName = fieldName;
28820
      }
28821
 
28822
      public short getThriftFieldId() {
28823
        return _thriftId;
28824
      }
28825
 
28826
      public String getFieldName() {
28827
        return _fieldName;
28828
      }
28829
    }
28830
 
28831
    // isset id assignments
28832
 
28833
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28834
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28835
          new FieldValueMetaData(TType.STRUCT)));
28836
    }});
28837
 
28838
    static {
28839
      FieldMetaData.addStructMetaDataMap(updateWidget_result.class, metaDataMap);
28840
    }
28841
 
28842
    public updateWidget_result() {
28843
    }
28844
 
28845
    public updateWidget_result(
28846
      WidgetException scx)
28847
    {
28848
      this();
28849
      this.scx = scx;
28850
    }
28851
 
28852
    /**
28853
     * Performs a deep copy on <i>other</i>.
28854
     */
28855
    public updateWidget_result(updateWidget_result other) {
28856
      if (other.isSetScx()) {
28857
        this.scx = new WidgetException(other.scx);
28858
      }
28859
    }
28860
 
28861
    public updateWidget_result deepCopy() {
28862
      return new updateWidget_result(this);
28863
    }
28864
 
48 ashish 28865
    @Deprecated
553 chandransh 28866
    public updateWidget_result clone() {
28867
      return new updateWidget_result(this);
48 ashish 28868
    }
28869
 
553 chandransh 28870
    public WidgetException getScx() {
28871
      return this.scx;
48 ashish 28872
    }
28873
 
553 chandransh 28874
    public updateWidget_result setScx(WidgetException scx) {
28875
      this.scx = scx;
48 ashish 28876
      return this;
28877
    }
28878
 
553 chandransh 28879
    public void unsetScx() {
28880
      this.scx = null;
48 ashish 28881
    }
28882
 
553 chandransh 28883
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28884
    public boolean isSetScx() {
28885
      return this.scx != null;
48 ashish 28886
    }
28887
 
553 chandransh 28888
    public void setScxIsSet(boolean value) {
28889
      if (!value) {
28890
        this.scx = null;
28891
      }
48 ashish 28892
    }
28893
 
553 chandransh 28894
    public void setFieldValue(_Fields field, Object value) {
28895
      switch (field) {
28896
      case SCX:
28897
        if (value == null) {
28898
          unsetScx();
28899
        } else {
28900
          setScx((WidgetException)value);
28901
        }
28902
        break;
28903
 
28904
      }
48 ashish 28905
    }
28906
 
553 chandransh 28907
    public void setFieldValue(int fieldID, Object value) {
28908
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28909
    }
28910
 
28911
    public Object getFieldValue(_Fields field) {
28912
      switch (field) {
28913
      case SCX:
28914
        return getScx();
28915
 
28916
      }
28917
      throw new IllegalStateException();
28918
    }
28919
 
28920
    public Object getFieldValue(int fieldId) {
28921
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28922
    }
28923
 
28924
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28925
    public boolean isSet(_Fields field) {
28926
      switch (field) {
28927
      case SCX:
28928
        return isSetScx();
28929
      }
28930
      throw new IllegalStateException();
28931
    }
28932
 
28933
    public boolean isSet(int fieldID) {
28934
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28935
    }
28936
 
28937
    @Override
28938
    public boolean equals(Object that) {
28939
      if (that == null)
28940
        return false;
28941
      if (that instanceof updateWidget_result)
28942
        return this.equals((updateWidget_result)that);
28943
      return false;
28944
    }
28945
 
28946
    public boolean equals(updateWidget_result that) {
28947
      if (that == null)
28948
        return false;
28949
 
28950
      boolean this_present_scx = true && this.isSetScx();
28951
      boolean that_present_scx = true && that.isSetScx();
28952
      if (this_present_scx || that_present_scx) {
28953
        if (!(this_present_scx && that_present_scx))
28954
          return false;
28955
        if (!this.scx.equals(that.scx))
28956
          return false;
28957
      }
28958
 
28959
      return true;
28960
    }
28961
 
28962
    @Override
28963
    public int hashCode() {
28964
      return 0;
28965
    }
28966
 
28967
    public int compareTo(updateWidget_result other) {
28968
      if (!getClass().equals(other.getClass())) {
28969
        return getClass().getName().compareTo(other.getClass().getName());
28970
      }
28971
 
28972
      int lastComparison = 0;
28973
      updateWidget_result typedOther = (updateWidget_result)other;
28974
 
28975
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28976
      if (lastComparison != 0) {
28977
        return lastComparison;
28978
      }
28979
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28980
      if (lastComparison != 0) {
28981
        return lastComparison;
28982
      }
28983
      return 0;
28984
    }
28985
 
28986
    public void read(TProtocol iprot) throws TException {
28987
      TField field;
28988
      iprot.readStructBegin();
28989
      while (true)
28990
      {
28991
        field = iprot.readFieldBegin();
28992
        if (field.type == TType.STOP) { 
28993
          break;
28994
        }
28995
        _Fields fieldId = _Fields.findByThriftId(field.id);
28996
        if (fieldId == null) {
28997
          TProtocolUtil.skip(iprot, field.type);
28998
        } else {
28999
          switch (fieldId) {
29000
            case SCX:
29001
              if (field.type == TType.STRUCT) {
29002
                this.scx = new WidgetException();
29003
                this.scx.read(iprot);
29004
              } else { 
29005
                TProtocolUtil.skip(iprot, field.type);
29006
              }
29007
              break;
29008
          }
29009
          iprot.readFieldEnd();
29010
        }
29011
      }
29012
      iprot.readStructEnd();
29013
      validate();
29014
    }
29015
 
29016
    public void write(TProtocol oprot) throws TException {
29017
      oprot.writeStructBegin(STRUCT_DESC);
29018
 
29019
      if (this.isSetScx()) {
29020
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29021
        this.scx.write(oprot);
29022
        oprot.writeFieldEnd();
29023
      }
29024
      oprot.writeFieldStop();
29025
      oprot.writeStructEnd();
29026
    }
29027
 
29028
    @Override
29029
    public String toString() {
29030
      StringBuilder sb = new StringBuilder("updateWidget_result(");
29031
      boolean first = true;
29032
 
29033
      sb.append("scx:");
29034
      if (this.scx == null) {
29035
        sb.append("null");
29036
      } else {
29037
        sb.append(this.scx);
29038
      }
29039
      first = false;
29040
      sb.append(")");
29041
      return sb.toString();
29042
    }
29043
 
29044
    public void validate() throws TException {
29045
      // check for required fields
29046
    }
29047
 
29048
  }
29049
 
29050
  public static class updateWidgetItem_args implements TBase<updateWidgetItem_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_args>   {
29051
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_args");
29052
 
29053
    private static final TField WIDGET_ID_FIELD_DESC = new TField("widgetId", TType.I64, (short)1);
29054
    private static final TField ENABLE_FIELD_DESC = new TField("enable", TType.BOOL, (short)2);
29055
 
29056
    private long widgetId;
29057
    private boolean enable;
29058
 
29059
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29060
    public enum _Fields implements TFieldIdEnum {
29061
      WIDGET_ID((short)1, "widgetId"),
29062
      ENABLE((short)2, "enable");
29063
 
29064
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29065
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29066
 
29067
      static {
29068
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29069
          byId.put((int)field._thriftId, field);
29070
          byName.put(field.getFieldName(), field);
29071
        }
29072
      }
29073
 
29074
      /**
29075
       * Find the _Fields constant that matches fieldId, or null if its not found.
29076
       */
29077
      public static _Fields findByThriftId(int fieldId) {
29078
        return byId.get(fieldId);
29079
      }
29080
 
29081
      /**
29082
       * Find the _Fields constant that matches fieldId, throwing an exception
29083
       * if it is not found.
29084
       */
29085
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29086
        _Fields fields = findByThriftId(fieldId);
29087
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29088
        return fields;
29089
      }
29090
 
29091
      /**
29092
       * Find the _Fields constant that matches name, or null if its not found.
29093
       */
29094
      public static _Fields findByName(String name) {
29095
        return byName.get(name);
29096
      }
29097
 
29098
      private final short _thriftId;
29099
      private final String _fieldName;
29100
 
29101
      _Fields(short thriftId, String fieldName) {
29102
        _thriftId = thriftId;
29103
        _fieldName = fieldName;
29104
      }
29105
 
29106
      public short getThriftFieldId() {
29107
        return _thriftId;
29108
      }
29109
 
29110
      public String getFieldName() {
29111
        return _fieldName;
29112
      }
29113
    }
29114
 
29115
    // isset id assignments
29116
    private static final int __WIDGETID_ISSET_ID = 0;
29117
    private static final int __ENABLE_ISSET_ID = 1;
29118
    private BitSet __isset_bit_vector = new BitSet(2);
29119
 
29120
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29121
      put(_Fields.WIDGET_ID, new FieldMetaData("widgetId", TFieldRequirementType.DEFAULT, 
29122
          new FieldValueMetaData(TType.I64)));
29123
      put(_Fields.ENABLE, new FieldMetaData("enable", TFieldRequirementType.DEFAULT, 
29124
          new FieldValueMetaData(TType.BOOL)));
29125
    }});
29126
 
29127
    static {
29128
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_args.class, metaDataMap);
29129
    }
29130
 
29131
    public updateWidgetItem_args() {
29132
    }
29133
 
29134
    public updateWidgetItem_args(
29135
      long widgetId,
29136
      boolean enable)
29137
    {
29138
      this();
29139
      this.widgetId = widgetId;
29140
      setWidgetIdIsSet(true);
29141
      this.enable = enable;
29142
      setEnableIsSet(true);
29143
    }
29144
 
29145
    /**
29146
     * Performs a deep copy on <i>other</i>.
29147
     */
29148
    public updateWidgetItem_args(updateWidgetItem_args other) {
29149
      __isset_bit_vector.clear();
29150
      __isset_bit_vector.or(other.__isset_bit_vector);
29151
      this.widgetId = other.widgetId;
29152
      this.enable = other.enable;
29153
    }
29154
 
29155
    public updateWidgetItem_args deepCopy() {
29156
      return new updateWidgetItem_args(this);
29157
    }
29158
 
29159
    @Deprecated
29160
    public updateWidgetItem_args clone() {
29161
      return new updateWidgetItem_args(this);
29162
    }
29163
 
29164
    public long getWidgetId() {
29165
      return this.widgetId;
29166
    }
29167
 
29168
    public updateWidgetItem_args setWidgetId(long widgetId) {
29169
      this.widgetId = widgetId;
29170
      setWidgetIdIsSet(true);
48 ashish 29171
      return this;
29172
    }
29173
 
553 chandransh 29174
    public void unsetWidgetId() {
29175
      __isset_bit_vector.clear(__WIDGETID_ISSET_ID);
48 ashish 29176
    }
29177
 
553 chandransh 29178
    /** Returns true if field widgetId is set (has been asigned a value) and false otherwise */
29179
    public boolean isSetWidgetId() {
29180
      return __isset_bit_vector.get(__WIDGETID_ISSET_ID);
48 ashish 29181
    }
29182
 
553 chandransh 29183
    public void setWidgetIdIsSet(boolean value) {
29184
      __isset_bit_vector.set(__WIDGETID_ISSET_ID, value);
29185
    }
29186
 
29187
    public boolean isEnable() {
29188
      return this.enable;
29189
    }
29190
 
29191
    public updateWidgetItem_args setEnable(boolean enable) {
29192
      this.enable = enable;
29193
      setEnableIsSet(true);
29194
      return this;
29195
    }
29196
 
29197
    public void unsetEnable() {
29198
      __isset_bit_vector.clear(__ENABLE_ISSET_ID);
29199
    }
29200
 
29201
    /** Returns true if field enable is set (has been asigned a value) and false otherwise */
29202
    public boolean isSetEnable() {
29203
      return __isset_bit_vector.get(__ENABLE_ISSET_ID);
29204
    }
29205
 
29206
    public void setEnableIsSet(boolean value) {
29207
      __isset_bit_vector.set(__ENABLE_ISSET_ID, value);
29208
    }
29209
 
29210
    public void setFieldValue(_Fields field, Object value) {
29211
      switch (field) {
29212
      case WIDGET_ID:
29213
        if (value == null) {
29214
          unsetWidgetId();
29215
        } else {
29216
          setWidgetId((Long)value);
29217
        }
29218
        break;
29219
 
29220
      case ENABLE:
29221
        if (value == null) {
29222
          unsetEnable();
29223
        } else {
29224
          setEnable((Boolean)value);
29225
        }
29226
        break;
29227
 
29228
      }
29229
    }
29230
 
29231
    public void setFieldValue(int fieldID, Object value) {
29232
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29233
    }
29234
 
29235
    public Object getFieldValue(_Fields field) {
29236
      switch (field) {
29237
      case WIDGET_ID:
29238
        return new Long(getWidgetId());
29239
 
29240
      case ENABLE:
29241
        return new Boolean(isEnable());
29242
 
29243
      }
29244
      throw new IllegalStateException();
29245
    }
29246
 
29247
    public Object getFieldValue(int fieldId) {
29248
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29249
    }
29250
 
29251
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29252
    public boolean isSet(_Fields field) {
29253
      switch (field) {
29254
      case WIDGET_ID:
29255
        return isSetWidgetId();
29256
      case ENABLE:
29257
        return isSetEnable();
29258
      }
29259
      throw new IllegalStateException();
29260
    }
29261
 
29262
    public boolean isSet(int fieldID) {
29263
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29264
    }
29265
 
29266
    @Override
29267
    public boolean equals(Object that) {
29268
      if (that == null)
29269
        return false;
29270
      if (that instanceof updateWidgetItem_args)
29271
        return this.equals((updateWidgetItem_args)that);
29272
      return false;
29273
    }
29274
 
29275
    public boolean equals(updateWidgetItem_args that) {
29276
      if (that == null)
29277
        return false;
29278
 
29279
      boolean this_present_widgetId = true;
29280
      boolean that_present_widgetId = true;
29281
      if (this_present_widgetId || that_present_widgetId) {
29282
        if (!(this_present_widgetId && that_present_widgetId))
29283
          return false;
29284
        if (this.widgetId != that.widgetId)
29285
          return false;
29286
      }
29287
 
29288
      boolean this_present_enable = true;
29289
      boolean that_present_enable = true;
29290
      if (this_present_enable || that_present_enable) {
29291
        if (!(this_present_enable && that_present_enable))
29292
          return false;
29293
        if (this.enable != that.enable)
29294
          return false;
29295
      }
29296
 
29297
      return true;
29298
    }
29299
 
29300
    @Override
29301
    public int hashCode() {
29302
      return 0;
29303
    }
29304
 
29305
    public int compareTo(updateWidgetItem_args other) {
29306
      if (!getClass().equals(other.getClass())) {
29307
        return getClass().getName().compareTo(other.getClass().getName());
29308
      }
29309
 
29310
      int lastComparison = 0;
29311
      updateWidgetItem_args typedOther = (updateWidgetItem_args)other;
29312
 
29313
      lastComparison = Boolean.valueOf(isSetWidgetId()).compareTo(isSetWidgetId());
29314
      if (lastComparison != 0) {
29315
        return lastComparison;
29316
      }
29317
      lastComparison = TBaseHelper.compareTo(widgetId, typedOther.widgetId);
29318
      if (lastComparison != 0) {
29319
        return lastComparison;
29320
      }
29321
      lastComparison = Boolean.valueOf(isSetEnable()).compareTo(isSetEnable());
29322
      if (lastComparison != 0) {
29323
        return lastComparison;
29324
      }
29325
      lastComparison = TBaseHelper.compareTo(enable, typedOther.enable);
29326
      if (lastComparison != 0) {
29327
        return lastComparison;
29328
      }
29329
      return 0;
29330
    }
29331
 
29332
    public void read(TProtocol iprot) throws TException {
29333
      TField field;
29334
      iprot.readStructBegin();
29335
      while (true)
29336
      {
29337
        field = iprot.readFieldBegin();
29338
        if (field.type == TType.STOP) { 
29339
          break;
29340
        }
29341
        _Fields fieldId = _Fields.findByThriftId(field.id);
29342
        if (fieldId == null) {
29343
          TProtocolUtil.skip(iprot, field.type);
29344
        } else {
29345
          switch (fieldId) {
29346
            case WIDGET_ID:
29347
              if (field.type == TType.I64) {
29348
                this.widgetId = iprot.readI64();
29349
                setWidgetIdIsSet(true);
29350
              } else { 
29351
                TProtocolUtil.skip(iprot, field.type);
29352
              }
29353
              break;
29354
            case ENABLE:
29355
              if (field.type == TType.BOOL) {
29356
                this.enable = iprot.readBool();
29357
                setEnableIsSet(true);
29358
              } else { 
29359
                TProtocolUtil.skip(iprot, field.type);
29360
              }
29361
              break;
29362
          }
29363
          iprot.readFieldEnd();
29364
        }
29365
      }
29366
      iprot.readStructEnd();
29367
      validate();
29368
    }
29369
 
29370
    public void write(TProtocol oprot) throws TException {
29371
      validate();
29372
 
29373
      oprot.writeStructBegin(STRUCT_DESC);
29374
      oprot.writeFieldBegin(WIDGET_ID_FIELD_DESC);
29375
      oprot.writeI64(this.widgetId);
29376
      oprot.writeFieldEnd();
29377
      oprot.writeFieldBegin(ENABLE_FIELD_DESC);
29378
      oprot.writeBool(this.enable);
29379
      oprot.writeFieldEnd();
29380
      oprot.writeFieldStop();
29381
      oprot.writeStructEnd();
29382
    }
29383
 
29384
    @Override
29385
    public String toString() {
29386
      StringBuilder sb = new StringBuilder("updateWidgetItem_args(");
29387
      boolean first = true;
29388
 
29389
      sb.append("widgetId:");
29390
      sb.append(this.widgetId);
29391
      first = false;
29392
      if (!first) sb.append(", ");
29393
      sb.append("enable:");
29394
      sb.append(this.enable);
29395
      first = false;
29396
      sb.append(")");
29397
      return sb.toString();
29398
    }
29399
 
29400
    public void validate() throws TException {
29401
      // check for required fields
29402
    }
29403
 
29404
  }
29405
 
29406
  public static class updateWidgetItem_result implements TBase<updateWidgetItem_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateWidgetItem_result>   {
29407
    private static final TStruct STRUCT_DESC = new TStruct("updateWidgetItem_result");
29408
 
29409
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29410
 
29411
    private WidgetException scx;
29412
 
29413
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29414
    public enum _Fields implements TFieldIdEnum {
29415
      SCX((short)1, "scx");
29416
 
29417
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29418
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29419
 
29420
      static {
29421
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29422
          byId.put((int)field._thriftId, field);
29423
          byName.put(field.getFieldName(), field);
29424
        }
29425
      }
29426
 
29427
      /**
29428
       * Find the _Fields constant that matches fieldId, or null if its not found.
29429
       */
29430
      public static _Fields findByThriftId(int fieldId) {
29431
        return byId.get(fieldId);
29432
      }
29433
 
29434
      /**
29435
       * Find the _Fields constant that matches fieldId, throwing an exception
29436
       * if it is not found.
29437
       */
29438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29439
        _Fields fields = findByThriftId(fieldId);
29440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29441
        return fields;
29442
      }
29443
 
29444
      /**
29445
       * Find the _Fields constant that matches name, or null if its not found.
29446
       */
29447
      public static _Fields findByName(String name) {
29448
        return byName.get(name);
29449
      }
29450
 
29451
      private final short _thriftId;
29452
      private final String _fieldName;
29453
 
29454
      _Fields(short thriftId, String fieldName) {
29455
        _thriftId = thriftId;
29456
        _fieldName = fieldName;
29457
      }
29458
 
29459
      public short getThriftFieldId() {
29460
        return _thriftId;
29461
      }
29462
 
29463
      public String getFieldName() {
29464
        return _fieldName;
29465
      }
29466
    }
29467
 
29468
    // isset id assignments
29469
 
29470
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29471
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
29472
          new FieldValueMetaData(TType.STRUCT)));
29473
    }});
29474
 
29475
    static {
29476
      FieldMetaData.addStructMetaDataMap(updateWidgetItem_result.class, metaDataMap);
29477
    }
29478
 
29479
    public updateWidgetItem_result() {
29480
    }
29481
 
29482
    public updateWidgetItem_result(
29483
      WidgetException scx)
29484
    {
29485
      this();
29486
      this.scx = scx;
29487
    }
29488
 
29489
    /**
29490
     * Performs a deep copy on <i>other</i>.
29491
     */
29492
    public updateWidgetItem_result(updateWidgetItem_result other) {
29493
      if (other.isSetScx()) {
29494
        this.scx = new WidgetException(other.scx);
29495
      }
29496
    }
29497
 
29498
    public updateWidgetItem_result deepCopy() {
29499
      return new updateWidgetItem_result(this);
29500
    }
29501
 
29502
    @Deprecated
29503
    public updateWidgetItem_result clone() {
29504
      return new updateWidgetItem_result(this);
29505
    }
29506
 
29507
    public WidgetException getScx() {
29508
      return this.scx;
29509
    }
29510
 
29511
    public updateWidgetItem_result setScx(WidgetException scx) {
29512
      this.scx = scx;
29513
      return this;
29514
    }
29515
 
29516
    public void unsetScx() {
29517
      this.scx = null;
29518
    }
29519
 
29520
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29521
    public boolean isSetScx() {
29522
      return this.scx != null;
29523
    }
29524
 
29525
    public void setScxIsSet(boolean value) {
48 ashish 29526
      if (!value) {
553 chandransh 29527
        this.scx = null;
48 ashish 29528
      }
29529
    }
29530
 
553 chandransh 29531
    public void setFieldValue(_Fields field, Object value) {
29532
      switch (field) {
29533
      case SCX:
29534
        if (value == null) {
29535
          unsetScx();
29536
        } else {
29537
          setScx((WidgetException)value);
29538
        }
29539
        break;
29540
 
29541
      }
48 ashish 29542
    }
29543
 
553 chandransh 29544
    public void setFieldValue(int fieldID, Object value) {
29545
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29546
    }
29547
 
29548
    public Object getFieldValue(_Fields field) {
29549
      switch (field) {
29550
      case SCX:
29551
        return getScx();
29552
 
29553
      }
29554
      throw new IllegalStateException();
29555
    }
29556
 
29557
    public Object getFieldValue(int fieldId) {
29558
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29559
    }
29560
 
29561
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29562
    public boolean isSet(_Fields field) {
29563
      switch (field) {
29564
      case SCX:
29565
        return isSetScx();
29566
      }
29567
      throw new IllegalStateException();
29568
    }
29569
 
29570
    public boolean isSet(int fieldID) {
29571
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29572
    }
29573
 
29574
    @Override
29575
    public boolean equals(Object that) {
29576
      if (that == null)
29577
        return false;
29578
      if (that instanceof updateWidgetItem_result)
29579
        return this.equals((updateWidgetItem_result)that);
29580
      return false;
29581
    }
29582
 
29583
    public boolean equals(updateWidgetItem_result that) {
29584
      if (that == null)
29585
        return false;
29586
 
29587
      boolean this_present_scx = true && this.isSetScx();
29588
      boolean that_present_scx = true && that.isSetScx();
29589
      if (this_present_scx || that_present_scx) {
29590
        if (!(this_present_scx && that_present_scx))
29591
          return false;
29592
        if (!this.scx.equals(that.scx))
29593
          return false;
29594
      }
29595
 
29596
      return true;
29597
    }
29598
 
29599
    @Override
29600
    public int hashCode() {
29601
      return 0;
29602
    }
29603
 
29604
    public int compareTo(updateWidgetItem_result other) {
29605
      if (!getClass().equals(other.getClass())) {
29606
        return getClass().getName().compareTo(other.getClass().getName());
29607
      }
29608
 
29609
      int lastComparison = 0;
29610
      updateWidgetItem_result typedOther = (updateWidgetItem_result)other;
29611
 
29612
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
29613
      if (lastComparison != 0) {
29614
        return lastComparison;
29615
      }
29616
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
29617
      if (lastComparison != 0) {
29618
        return lastComparison;
29619
      }
29620
      return 0;
29621
    }
29622
 
29623
    public void read(TProtocol iprot) throws TException {
29624
      TField field;
29625
      iprot.readStructBegin();
29626
      while (true)
29627
      {
29628
        field = iprot.readFieldBegin();
29629
        if (field.type == TType.STOP) { 
29630
          break;
29631
        }
29632
        _Fields fieldId = _Fields.findByThriftId(field.id);
29633
        if (fieldId == null) {
29634
          TProtocolUtil.skip(iprot, field.type);
29635
        } else {
29636
          switch (fieldId) {
29637
            case SCX:
29638
              if (field.type == TType.STRUCT) {
29639
                this.scx = new WidgetException();
29640
                this.scx.read(iprot);
29641
              } else { 
29642
                TProtocolUtil.skip(iprot, field.type);
29643
              }
29644
              break;
29645
          }
29646
          iprot.readFieldEnd();
29647
        }
29648
      }
29649
      iprot.readStructEnd();
29650
      validate();
29651
    }
29652
 
29653
    public void write(TProtocol oprot) throws TException {
29654
      oprot.writeStructBegin(STRUCT_DESC);
29655
 
29656
      if (this.isSetScx()) {
29657
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29658
        this.scx.write(oprot);
29659
        oprot.writeFieldEnd();
29660
      }
29661
      oprot.writeFieldStop();
29662
      oprot.writeStructEnd();
29663
    }
29664
 
29665
    @Override
29666
    public String toString() {
29667
      StringBuilder sb = new StringBuilder("updateWidgetItem_result(");
29668
      boolean first = true;
29669
 
29670
      sb.append("scx:");
29671
      if (this.scx == null) {
29672
        sb.append("null");
29673
      } else {
29674
        sb.append(this.scx);
29675
      }
29676
      first = false;
29677
      sb.append(")");
29678
      return sb.toString();
29679
    }
29680
 
29681
    public void validate() throws TException {
29682
      // check for required fields
29683
    }
29684
 
29685
  }
29686
 
29687
  public static class getWidget_args implements TBase<getWidget_args._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_args>   {
29688
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_args");
29689
 
29690
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)1);
29691
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)2);
29692
    private static final TField ONLY_ENABLED_FIELD_DESC = new TField("onlyEnabled", TType.BOOL, (short)3);
29693
 
29694
    private WidgetType type;
29695
    private long userId;
29696
    private boolean onlyEnabled;
29697
 
29698
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29699
    public enum _Fields implements TFieldIdEnum {
29700
      /**
29701
       * 
29702
       * @see WidgetType
29703
       */
29704
      TYPE((short)1, "type"),
29705
      USER_ID((short)2, "userId"),
29706
      ONLY_ENABLED((short)3, "onlyEnabled");
29707
 
29708
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29710
 
29711
      static {
29712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29713
          byId.put((int)field._thriftId, field);
29714
          byName.put(field.getFieldName(), field);
29715
        }
29716
      }
29717
 
29718
      /**
29719
       * Find the _Fields constant that matches fieldId, or null if its not found.
29720
       */
29721
      public static _Fields findByThriftId(int fieldId) {
29722
        return byId.get(fieldId);
29723
      }
29724
 
29725
      /**
29726
       * Find the _Fields constant that matches fieldId, throwing an exception
29727
       * if it is not found.
29728
       */
29729
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29730
        _Fields fields = findByThriftId(fieldId);
29731
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29732
        return fields;
29733
      }
29734
 
29735
      /**
29736
       * Find the _Fields constant that matches name, or null if its not found.
29737
       */
29738
      public static _Fields findByName(String name) {
29739
        return byName.get(name);
29740
      }
29741
 
29742
      private final short _thriftId;
29743
      private final String _fieldName;
29744
 
29745
      _Fields(short thriftId, String fieldName) {
29746
        _thriftId = thriftId;
29747
        _fieldName = fieldName;
29748
      }
29749
 
29750
      public short getThriftFieldId() {
29751
        return _thriftId;
29752
      }
29753
 
29754
      public String getFieldName() {
29755
        return _fieldName;
29756
      }
29757
    }
29758
 
29759
    // isset id assignments
29760
    private static final int __USERID_ISSET_ID = 0;
29761
    private static final int __ONLYENABLED_ISSET_ID = 1;
29762
    private BitSet __isset_bit_vector = new BitSet(2);
29763
 
29764
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29765
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
29766
          new EnumMetaData(TType.ENUM, WidgetType.class)));
29767
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
29768
          new FieldValueMetaData(TType.I64)));
29769
      put(_Fields.ONLY_ENABLED, new FieldMetaData("onlyEnabled", TFieldRequirementType.DEFAULT, 
29770
          new FieldValueMetaData(TType.BOOL)));
29771
    }});
29772
 
29773
    static {
29774
      FieldMetaData.addStructMetaDataMap(getWidget_args.class, metaDataMap);
29775
    }
29776
 
29777
    public getWidget_args() {
29778
    }
29779
 
29780
    public getWidget_args(
29781
      WidgetType type,
29782
      long userId,
29783
      boolean onlyEnabled)
29784
    {
29785
      this();
29786
      this.type = type;
29787
      this.userId = userId;
29788
      setUserIdIsSet(true);
29789
      this.onlyEnabled = onlyEnabled;
29790
      setOnlyEnabledIsSet(true);
29791
    }
29792
 
29793
    /**
29794
     * Performs a deep copy on <i>other</i>.
29795
     */
29796
    public getWidget_args(getWidget_args other) {
29797
      __isset_bit_vector.clear();
29798
      __isset_bit_vector.or(other.__isset_bit_vector);
29799
      if (other.isSetType()) {
29800
        this.type = other.type;
29801
      }
29802
      this.userId = other.userId;
29803
      this.onlyEnabled = other.onlyEnabled;
29804
    }
29805
 
29806
    public getWidget_args deepCopy() {
29807
      return new getWidget_args(this);
29808
    }
29809
 
29810
    @Deprecated
29811
    public getWidget_args clone() {
29812
      return new getWidget_args(this);
29813
    }
29814
 
29815
    /**
29816
     * 
29817
     * @see WidgetType
29818
     */
29819
    public WidgetType getType() {
29820
      return this.type;
29821
    }
29822
 
29823
    /**
29824
     * 
29825
     * @see WidgetType
29826
     */
29827
    public getWidget_args setType(WidgetType type) {
29828
      this.type = type;
48 ashish 29829
      return this;
29830
    }
29831
 
553 chandransh 29832
    public void unsetType() {
29833
      this.type = null;
48 ashish 29834
    }
29835
 
553 chandransh 29836
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
29837
    public boolean isSetType() {
29838
      return this.type != null;
48 ashish 29839
    }
29840
 
553 chandransh 29841
    public void setTypeIsSet(boolean value) {
48 ashish 29842
      if (!value) {
553 chandransh 29843
        this.type = null;
48 ashish 29844
      }
29845
    }
29846
 
553 chandransh 29847
    public long getUserId() {
29848
      return this.userId;
29849
    }
29850
 
29851
    public getWidget_args setUserId(long userId) {
29852
      this.userId = userId;
29853
      setUserIdIsSet(true);
29854
      return this;
29855
    }
29856
 
29857
    public void unsetUserId() {
29858
      __isset_bit_vector.clear(__USERID_ISSET_ID);
29859
    }
29860
 
29861
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29862
    public boolean isSetUserId() {
29863
      return __isset_bit_vector.get(__USERID_ISSET_ID);
29864
    }
29865
 
29866
    public void setUserIdIsSet(boolean value) {
29867
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
29868
    }
29869
 
29870
    public boolean isOnlyEnabled() {
29871
      return this.onlyEnabled;
29872
    }
29873
 
29874
    public getWidget_args setOnlyEnabled(boolean onlyEnabled) {
29875
      this.onlyEnabled = onlyEnabled;
29876
      setOnlyEnabledIsSet(true);
29877
      return this;
29878
    }
29879
 
29880
    public void unsetOnlyEnabled() {
29881
      __isset_bit_vector.clear(__ONLYENABLED_ISSET_ID);
29882
    }
29883
 
29884
    /** Returns true if field onlyEnabled is set (has been asigned a value) and false otherwise */
29885
    public boolean isSetOnlyEnabled() {
29886
      return __isset_bit_vector.get(__ONLYENABLED_ISSET_ID);
29887
    }
29888
 
29889
    public void setOnlyEnabledIsSet(boolean value) {
29890
      __isset_bit_vector.set(__ONLYENABLED_ISSET_ID, value);
29891
    }
29892
 
48 ashish 29893
    public void setFieldValue(_Fields field, Object value) {
29894
      switch (field) {
553 chandransh 29895
      case TYPE:
48 ashish 29896
        if (value == null) {
553 chandransh 29897
          unsetType();
48 ashish 29898
        } else {
553 chandransh 29899
          setType((WidgetType)value);
48 ashish 29900
        }
29901
        break;
29902
 
553 chandransh 29903
      case USER_ID:
48 ashish 29904
        if (value == null) {
553 chandransh 29905
          unsetUserId();
48 ashish 29906
        } else {
553 chandransh 29907
          setUserId((Long)value);
48 ashish 29908
        }
29909
        break;
29910
 
553 chandransh 29911
      case ONLY_ENABLED:
48 ashish 29912
        if (value == null) {
553 chandransh 29913
          unsetOnlyEnabled();
48 ashish 29914
        } else {
553 chandransh 29915
          setOnlyEnabled((Boolean)value);
48 ashish 29916
        }
29917
        break;
29918
 
29919
      }
29920
    }
29921
 
29922
    public void setFieldValue(int fieldID, Object value) {
29923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29924
    }
29925
 
29926
    public Object getFieldValue(_Fields field) {
29927
      switch (field) {
553 chandransh 29928
      case TYPE:
29929
        return getType();
48 ashish 29930
 
553 chandransh 29931
      case USER_ID:
29932
        return new Long(getUserId());
48 ashish 29933
 
553 chandransh 29934
      case ONLY_ENABLED:
29935
        return new Boolean(isOnlyEnabled());
48 ashish 29936
 
29937
      }
29938
      throw new IllegalStateException();
29939
    }
29940
 
29941
    public Object getFieldValue(int fieldId) {
29942
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29943
    }
29944
 
29945
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29946
    public boolean isSet(_Fields field) {
29947
      switch (field) {
553 chandransh 29948
      case TYPE:
29949
        return isSetType();
29950
      case USER_ID:
29951
        return isSetUserId();
29952
      case ONLY_ENABLED:
29953
        return isSetOnlyEnabled();
48 ashish 29954
      }
29955
      throw new IllegalStateException();
29956
    }
29957
 
29958
    public boolean isSet(int fieldID) {
29959
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29960
    }
29961
 
29962
    @Override
29963
    public boolean equals(Object that) {
29964
      if (that == null)
29965
        return false;
553 chandransh 29966
      if (that instanceof getWidget_args)
29967
        return this.equals((getWidget_args)that);
48 ashish 29968
      return false;
29969
    }
29970
 
553 chandransh 29971
    public boolean equals(getWidget_args that) {
48 ashish 29972
      if (that == null)
29973
        return false;
29974
 
553 chandransh 29975
      boolean this_present_type = true && this.isSetType();
29976
      boolean that_present_type = true && that.isSetType();
29977
      if (this_present_type || that_present_type) {
29978
        if (!(this_present_type && that_present_type))
48 ashish 29979
          return false;
553 chandransh 29980
        if (!this.type.equals(that.type))
48 ashish 29981
          return false;
29982
      }
29983
 
553 chandransh 29984
      boolean this_present_userId = true;
29985
      boolean that_present_userId = true;
29986
      if (this_present_userId || that_present_userId) {
29987
        if (!(this_present_userId && that_present_userId))
48 ashish 29988
          return false;
553 chandransh 29989
        if (this.userId != that.userId)
48 ashish 29990
          return false;
29991
      }
29992
 
553 chandransh 29993
      boolean this_present_onlyEnabled = true;
29994
      boolean that_present_onlyEnabled = true;
29995
      if (this_present_onlyEnabled || that_present_onlyEnabled) {
29996
        if (!(this_present_onlyEnabled && that_present_onlyEnabled))
48 ashish 29997
          return false;
553 chandransh 29998
        if (this.onlyEnabled != that.onlyEnabled)
48 ashish 29999
          return false;
30000
      }
30001
 
30002
      return true;
30003
    }
30004
 
30005
    @Override
30006
    public int hashCode() {
30007
      return 0;
30008
    }
30009
 
553 chandransh 30010
    public int compareTo(getWidget_args other) {
48 ashish 30011
      if (!getClass().equals(other.getClass())) {
30012
        return getClass().getName().compareTo(other.getClass().getName());
30013
      }
30014
 
30015
      int lastComparison = 0;
553 chandransh 30016
      getWidget_args typedOther = (getWidget_args)other;
48 ashish 30017
 
553 chandransh 30018
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
48 ashish 30019
      if (lastComparison != 0) {
30020
        return lastComparison;
30021
      }
553 chandransh 30022
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
48 ashish 30023
      if (lastComparison != 0) {
30024
        return lastComparison;
30025
      }
553 chandransh 30026
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 30027
      if (lastComparison != 0) {
30028
        return lastComparison;
30029
      }
553 chandransh 30030
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 30031
      if (lastComparison != 0) {
30032
        return lastComparison;
30033
      }
553 chandransh 30034
      lastComparison = Boolean.valueOf(isSetOnlyEnabled()).compareTo(isSetOnlyEnabled());
48 ashish 30035
      if (lastComparison != 0) {
30036
        return lastComparison;
30037
      }
553 chandransh 30038
      lastComparison = TBaseHelper.compareTo(onlyEnabled, typedOther.onlyEnabled);
48 ashish 30039
      if (lastComparison != 0) {
30040
        return lastComparison;
30041
      }
30042
      return 0;
30043
    }
30044
 
30045
    public void read(TProtocol iprot) throws TException {
30046
      TField field;
30047
      iprot.readStructBegin();
30048
      while (true)
30049
      {
30050
        field = iprot.readFieldBegin();
30051
        if (field.type == TType.STOP) { 
30052
          break;
30053
        }
30054
        _Fields fieldId = _Fields.findByThriftId(field.id);
30055
        if (fieldId == null) {
30056
          TProtocolUtil.skip(iprot, field.type);
30057
        } else {
30058
          switch (fieldId) {
553 chandransh 30059
            case TYPE:
30060
              if (field.type == TType.I32) {
30061
                this.type = WidgetType.findByValue(iprot.readI32());
48 ashish 30062
              } else { 
30063
                TProtocolUtil.skip(iprot, field.type);
30064
              }
30065
              break;
553 chandransh 30066
            case USER_ID:
30067
              if (field.type == TType.I64) {
30068
                this.userId = iprot.readI64();
30069
                setUserIdIsSet(true);
48 ashish 30070
              } else { 
30071
                TProtocolUtil.skip(iprot, field.type);
30072
              }
30073
              break;
553 chandransh 30074
            case ONLY_ENABLED:
30075
              if (field.type == TType.BOOL) {
30076
                this.onlyEnabled = iprot.readBool();
30077
                setOnlyEnabledIsSet(true);
48 ashish 30078
              } else { 
30079
                TProtocolUtil.skip(iprot, field.type);
30080
              }
30081
              break;
30082
          }
30083
          iprot.readFieldEnd();
30084
        }
30085
      }
30086
      iprot.readStructEnd();
30087
      validate();
30088
    }
30089
 
30090
    public void write(TProtocol oprot) throws TException {
30091
      validate();
30092
 
30093
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 30094
      if (this.type != null) {
30095
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
30096
        oprot.writeI32(this.type.getValue());
48 ashish 30097
        oprot.writeFieldEnd();
30098
      }
553 chandransh 30099
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30100
      oprot.writeI64(this.userId);
30101
      oprot.writeFieldEnd();
30102
      oprot.writeFieldBegin(ONLY_ENABLED_FIELD_DESC);
30103
      oprot.writeBool(this.onlyEnabled);
30104
      oprot.writeFieldEnd();
30105
      oprot.writeFieldStop();
30106
      oprot.writeStructEnd();
30107
    }
30108
 
30109
    @Override
30110
    public String toString() {
30111
      StringBuilder sb = new StringBuilder("getWidget_args(");
30112
      boolean first = true;
30113
 
30114
      sb.append("type:");
30115
      if (this.type == null) {
30116
        sb.append("null");
30117
      } else {
30118
        String type_name = type.name();
30119
        if (type_name != null) {
30120
          sb.append(type_name);
30121
          sb.append(" (");
30122
        }
30123
        sb.append(this.type);
30124
        if (type_name != null) {
30125
          sb.append(")");
30126
        }
30127
      }
30128
      first = false;
30129
      if (!first) sb.append(", ");
30130
      sb.append("userId:");
30131
      sb.append(this.userId);
30132
      first = false;
30133
      if (!first) sb.append(", ");
30134
      sb.append("onlyEnabled:");
30135
      sb.append(this.onlyEnabled);
30136
      first = false;
30137
      sb.append(")");
30138
      return sb.toString();
30139
    }
30140
 
30141
    public void validate() throws TException {
30142
      // check for required fields
30143
    }
30144
 
30145
  }
30146
 
30147
  public static class getWidget_result implements TBase<getWidget_result._Fields>, java.io.Serializable, Cloneable, Comparable<getWidget_result>   {
30148
    private static final TStruct STRUCT_DESC = new TStruct("getWidget_result");
30149
 
30150
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
30151
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30152
 
30153
    private Widget success;
30154
    private WidgetException scx;
30155
 
30156
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30157
    public enum _Fields implements TFieldIdEnum {
30158
      SUCCESS((short)0, "success"),
30159
      SCX((short)1, "scx");
30160
 
30161
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30162
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30163
 
30164
      static {
30165
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30166
          byId.put((int)field._thriftId, field);
30167
          byName.put(field.getFieldName(), field);
30168
        }
30169
      }
30170
 
30171
      /**
30172
       * Find the _Fields constant that matches fieldId, or null if its not found.
30173
       */
30174
      public static _Fields findByThriftId(int fieldId) {
30175
        return byId.get(fieldId);
30176
      }
30177
 
30178
      /**
30179
       * Find the _Fields constant that matches fieldId, throwing an exception
30180
       * if it is not found.
30181
       */
30182
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30183
        _Fields fields = findByThriftId(fieldId);
30184
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30185
        return fields;
30186
      }
30187
 
30188
      /**
30189
       * Find the _Fields constant that matches name, or null if its not found.
30190
       */
30191
      public static _Fields findByName(String name) {
30192
        return byName.get(name);
30193
      }
30194
 
30195
      private final short _thriftId;
30196
      private final String _fieldName;
30197
 
30198
      _Fields(short thriftId, String fieldName) {
30199
        _thriftId = thriftId;
30200
        _fieldName = fieldName;
30201
      }
30202
 
30203
      public short getThriftFieldId() {
30204
        return _thriftId;
30205
      }
30206
 
30207
      public String getFieldName() {
30208
        return _fieldName;
30209
      }
30210
    }
30211
 
30212
    // isset id assignments
30213
 
30214
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30215
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30216
          new StructMetaData(TType.STRUCT, Widget.class)));
30217
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
30218
          new FieldValueMetaData(TType.STRUCT)));
30219
    }});
30220
 
30221
    static {
30222
      FieldMetaData.addStructMetaDataMap(getWidget_result.class, metaDataMap);
30223
    }
30224
 
30225
    public getWidget_result() {
30226
    }
30227
 
30228
    public getWidget_result(
30229
      Widget success,
30230
      WidgetException scx)
30231
    {
30232
      this();
30233
      this.success = success;
30234
      this.scx = scx;
30235
    }
30236
 
30237
    /**
30238
     * Performs a deep copy on <i>other</i>.
30239
     */
30240
    public getWidget_result(getWidget_result other) {
30241
      if (other.isSetSuccess()) {
30242
        this.success = new Widget(other.success);
30243
      }
30244
      if (other.isSetScx()) {
30245
        this.scx = new WidgetException(other.scx);
30246
      }
30247
    }
30248
 
30249
    public getWidget_result deepCopy() {
30250
      return new getWidget_result(this);
30251
    }
30252
 
30253
    @Deprecated
30254
    public getWidget_result clone() {
30255
      return new getWidget_result(this);
30256
    }
30257
 
30258
    public Widget getSuccess() {
30259
      return this.success;
30260
    }
30261
 
30262
    public getWidget_result setSuccess(Widget success) {
30263
      this.success = success;
30264
      return this;
30265
    }
30266
 
30267
    public void unsetSuccess() {
30268
      this.success = null;
30269
    }
30270
 
30271
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30272
    public boolean isSetSuccess() {
30273
      return this.success != null;
30274
    }
30275
 
30276
    public void setSuccessIsSet(boolean value) {
30277
      if (!value) {
30278
        this.success = null;
30279
      }
30280
    }
30281
 
30282
    public WidgetException getScx() {
30283
      return this.scx;
30284
    }
30285
 
30286
    public getWidget_result setScx(WidgetException scx) {
30287
      this.scx = scx;
30288
      return this;
30289
    }
30290
 
30291
    public void unsetScx() {
30292
      this.scx = null;
30293
    }
30294
 
30295
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30296
    public boolean isSetScx() {
30297
      return this.scx != null;
30298
    }
30299
 
30300
    public void setScxIsSet(boolean value) {
30301
      if (!value) {
30302
        this.scx = null;
30303
      }
30304
    }
30305
 
30306
    public void setFieldValue(_Fields field, Object value) {
30307
      switch (field) {
30308
      case SUCCESS:
30309
        if (value == null) {
30310
          unsetSuccess();
30311
        } else {
30312
          setSuccess((Widget)value);
30313
        }
30314
        break;
30315
 
30316
      case SCX:
30317
        if (value == null) {
30318
          unsetScx();
30319
        } else {
30320
          setScx((WidgetException)value);
30321
        }
30322
        break;
30323
 
30324
      }
30325
    }
30326
 
30327
    public void setFieldValue(int fieldID, Object value) {
30328
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30329
    }
30330
 
30331
    public Object getFieldValue(_Fields field) {
30332
      switch (field) {
30333
      case SUCCESS:
30334
        return getSuccess();
30335
 
30336
      case SCX:
30337
        return getScx();
30338
 
30339
      }
30340
      throw new IllegalStateException();
30341
    }
30342
 
30343
    public Object getFieldValue(int fieldId) {
30344
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30345
    }
30346
 
30347
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30348
    public boolean isSet(_Fields field) {
30349
      switch (field) {
30350
      case SUCCESS:
30351
        return isSetSuccess();
30352
      case SCX:
30353
        return isSetScx();
30354
      }
30355
      throw new IllegalStateException();
30356
    }
30357
 
30358
    public boolean isSet(int fieldID) {
30359
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30360
    }
30361
 
30362
    @Override
30363
    public boolean equals(Object that) {
30364
      if (that == null)
30365
        return false;
30366
      if (that instanceof getWidget_result)
30367
        return this.equals((getWidget_result)that);
30368
      return false;
30369
    }
30370
 
30371
    public boolean equals(getWidget_result that) {
30372
      if (that == null)
30373
        return false;
30374
 
30375
      boolean this_present_success = true && this.isSetSuccess();
30376
      boolean that_present_success = true && that.isSetSuccess();
30377
      if (this_present_success || that_present_success) {
30378
        if (!(this_present_success && that_present_success))
30379
          return false;
30380
        if (!this.success.equals(that.success))
30381
          return false;
30382
      }
30383
 
30384
      boolean this_present_scx = true && this.isSetScx();
30385
      boolean that_present_scx = true && that.isSetScx();
30386
      if (this_present_scx || that_present_scx) {
30387
        if (!(this_present_scx && that_present_scx))
30388
          return false;
30389
        if (!this.scx.equals(that.scx))
30390
          return false;
30391
      }
30392
 
30393
      return true;
30394
    }
30395
 
30396
    @Override
30397
    public int hashCode() {
30398
      return 0;
30399
    }
30400
 
30401
    public int compareTo(getWidget_result other) {
30402
      if (!getClass().equals(other.getClass())) {
30403
        return getClass().getName().compareTo(other.getClass().getName());
30404
      }
30405
 
30406
      int lastComparison = 0;
30407
      getWidget_result typedOther = (getWidget_result)other;
30408
 
30409
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30410
      if (lastComparison != 0) {
30411
        return lastComparison;
30412
      }
30413
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30414
      if (lastComparison != 0) {
30415
        return lastComparison;
30416
      }
30417
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
30418
      if (lastComparison != 0) {
30419
        return lastComparison;
30420
      }
30421
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
30422
      if (lastComparison != 0) {
30423
        return lastComparison;
30424
      }
30425
      return 0;
30426
    }
30427
 
30428
    public void read(TProtocol iprot) throws TException {
30429
      TField field;
30430
      iprot.readStructBegin();
30431
      while (true)
30432
      {
30433
        field = iprot.readFieldBegin();
30434
        if (field.type == TType.STOP) { 
30435
          break;
30436
        }
30437
        _Fields fieldId = _Fields.findByThriftId(field.id);
30438
        if (fieldId == null) {
30439
          TProtocolUtil.skip(iprot, field.type);
30440
        } else {
30441
          switch (fieldId) {
30442
            case SUCCESS:
30443
              if (field.type == TType.STRUCT) {
30444
                this.success = new Widget();
30445
                this.success.read(iprot);
30446
              } else { 
30447
                TProtocolUtil.skip(iprot, field.type);
30448
              }
30449
              break;
30450
            case SCX:
30451
              if (field.type == TType.STRUCT) {
30452
                this.scx = new WidgetException();
30453
                this.scx.read(iprot);
30454
              } else { 
30455
                TProtocolUtil.skip(iprot, field.type);
30456
              }
30457
              break;
30458
          }
30459
          iprot.readFieldEnd();
30460
        }
30461
      }
30462
      iprot.readStructEnd();
30463
      validate();
30464
    }
30465
 
30466
    public void write(TProtocol oprot) throws TException {
30467
      oprot.writeStructBegin(STRUCT_DESC);
30468
 
30469
      if (this.isSetSuccess()) {
30470
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30471
        this.success.write(oprot);
48 ashish 30472
        oprot.writeFieldEnd();
553 chandransh 30473
      } else if (this.isSetScx()) {
30474
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30475
        this.scx.write(oprot);
30476
        oprot.writeFieldEnd();
48 ashish 30477
      }
30478
      oprot.writeFieldStop();
30479
      oprot.writeStructEnd();
30480
    }
30481
 
30482
    @Override
30483
    public String toString() {
553 chandransh 30484
      StringBuilder sb = new StringBuilder("getWidget_result(");
48 ashish 30485
      boolean first = true;
30486
 
553 chandransh 30487
      sb.append("success:");
30488
      if (this.success == null) {
48 ashish 30489
        sb.append("null");
30490
      } else {
553 chandransh 30491
        sb.append(this.success);
48 ashish 30492
      }
30493
      first = false;
30494
      if (!first) sb.append(", ");
553 chandransh 30495
      sb.append("scx:");
30496
      if (this.scx == null) {
48 ashish 30497
        sb.append("null");
30498
      } else {
553 chandransh 30499
        sb.append(this.scx);
48 ashish 30500
      }
30501
      first = false;
30502
      sb.append(")");
30503
      return sb.toString();
30504
    }
30505
 
30506
    public void validate() throws TException {
30507
      // check for required fields
30508
    }
30509
 
30510
  }
30511
 
553 chandransh 30512
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
30513
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
48 ashish 30514
 
553 chandransh 30515
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
48 ashish 30516
 
553 chandransh 30517
    private long user_id;
48 ashish 30518
 
30519
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30520
    public enum _Fields implements TFieldIdEnum {
553 chandransh 30521
      USER_ID((short)1, "user_id");
48 ashish 30522
 
30523
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30525
 
30526
      static {
30527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30528
          byId.put((int)field._thriftId, field);
30529
          byName.put(field.getFieldName(), field);
30530
        }
30531
      }
30532
 
30533
      /**
30534
       * Find the _Fields constant that matches fieldId, or null if its not found.
30535
       */
30536
      public static _Fields findByThriftId(int fieldId) {
30537
        return byId.get(fieldId);
30538
      }
30539
 
30540
      /**
30541
       * Find the _Fields constant that matches fieldId, throwing an exception
30542
       * if it is not found.
30543
       */
30544
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30545
        _Fields fields = findByThriftId(fieldId);
30546
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30547
        return fields;
30548
      }
30549
 
30550
      /**
30551
       * Find the _Fields constant that matches name, or null if its not found.
30552
       */
30553
      public static _Fields findByName(String name) {
30554
        return byName.get(name);
30555
      }
30556
 
30557
      private final short _thriftId;
30558
      private final String _fieldName;
30559
 
30560
      _Fields(short thriftId, String fieldName) {
30561
        _thriftId = thriftId;
30562
        _fieldName = fieldName;
30563
      }
30564
 
30565
      public short getThriftFieldId() {
30566
        return _thriftId;
30567
      }
30568
 
30569
      public String getFieldName() {
30570
        return _fieldName;
30571
      }
30572
    }
30573
 
30574
    // isset id assignments
553 chandransh 30575
    private static final int __USER_ID_ISSET_ID = 0;
48 ashish 30576
    private BitSet __isset_bit_vector = new BitSet(1);
30577
 
30578
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 30579
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
30580
          new FieldValueMetaData(TType.I64)));
30581
    }});
30582
 
30583
    static {
30584
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
30585
    }
30586
 
30587
    public getMyResearch_args() {
30588
    }
30589
 
30590
    public getMyResearch_args(
30591
      long user_id)
30592
    {
30593
      this();
30594
      this.user_id = user_id;
30595
      setUser_idIsSet(true);
30596
    }
30597
 
30598
    /**
30599
     * Performs a deep copy on <i>other</i>.
30600
     */
30601
    public getMyResearch_args(getMyResearch_args other) {
30602
      __isset_bit_vector.clear();
30603
      __isset_bit_vector.or(other.__isset_bit_vector);
30604
      this.user_id = other.user_id;
30605
    }
30606
 
30607
    public getMyResearch_args deepCopy() {
30608
      return new getMyResearch_args(this);
30609
    }
30610
 
30611
    @Deprecated
30612
    public getMyResearch_args clone() {
30613
      return new getMyResearch_args(this);
30614
    }
30615
 
30616
    public long getUser_id() {
30617
      return this.user_id;
30618
    }
30619
 
30620
    public getMyResearch_args setUser_id(long user_id) {
30621
      this.user_id = user_id;
30622
      setUser_idIsSet(true);
30623
      return this;
30624
    }
30625
 
30626
    public void unsetUser_id() {
30627
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
30628
    }
30629
 
30630
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
30631
    public boolean isSetUser_id() {
30632
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
30633
    }
30634
 
30635
    public void setUser_idIsSet(boolean value) {
30636
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
30637
    }
30638
 
30639
    public void setFieldValue(_Fields field, Object value) {
30640
      switch (field) {
30641
      case USER_ID:
30642
        if (value == null) {
30643
          unsetUser_id();
30644
        } else {
30645
          setUser_id((Long)value);
30646
        }
30647
        break;
30648
 
30649
      }
30650
    }
30651
 
30652
    public void setFieldValue(int fieldID, Object value) {
30653
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30654
    }
30655
 
30656
    public Object getFieldValue(_Fields field) {
30657
      switch (field) {
30658
      case USER_ID:
30659
        return new Long(getUser_id());
30660
 
30661
      }
30662
      throw new IllegalStateException();
30663
    }
30664
 
30665
    public Object getFieldValue(int fieldId) {
30666
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30667
    }
30668
 
30669
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30670
    public boolean isSet(_Fields field) {
30671
      switch (field) {
30672
      case USER_ID:
30673
        return isSetUser_id();
30674
      }
30675
      throw new IllegalStateException();
30676
    }
30677
 
30678
    public boolean isSet(int fieldID) {
30679
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30680
    }
30681
 
30682
    @Override
30683
    public boolean equals(Object that) {
30684
      if (that == null)
30685
        return false;
30686
      if (that instanceof getMyResearch_args)
30687
        return this.equals((getMyResearch_args)that);
30688
      return false;
30689
    }
30690
 
30691
    public boolean equals(getMyResearch_args that) {
30692
      if (that == null)
30693
        return false;
30694
 
30695
      boolean this_present_user_id = true;
30696
      boolean that_present_user_id = true;
30697
      if (this_present_user_id || that_present_user_id) {
30698
        if (!(this_present_user_id && that_present_user_id))
30699
          return false;
30700
        if (this.user_id != that.user_id)
30701
          return false;
30702
      }
30703
 
30704
      return true;
30705
    }
30706
 
30707
    @Override
30708
    public int hashCode() {
30709
      return 0;
30710
    }
30711
 
30712
    public int compareTo(getMyResearch_args other) {
30713
      if (!getClass().equals(other.getClass())) {
30714
        return getClass().getName().compareTo(other.getClass().getName());
30715
      }
30716
 
30717
      int lastComparison = 0;
30718
      getMyResearch_args typedOther = (getMyResearch_args)other;
30719
 
30720
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
30721
      if (lastComparison != 0) {
30722
        return lastComparison;
30723
      }
30724
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
30725
      if (lastComparison != 0) {
30726
        return lastComparison;
30727
      }
30728
      return 0;
30729
    }
30730
 
30731
    public void read(TProtocol iprot) throws TException {
30732
      TField field;
30733
      iprot.readStructBegin();
30734
      while (true)
30735
      {
30736
        field = iprot.readFieldBegin();
30737
        if (field.type == TType.STOP) { 
30738
          break;
30739
        }
30740
        _Fields fieldId = _Fields.findByThriftId(field.id);
30741
        if (fieldId == null) {
30742
          TProtocolUtil.skip(iprot, field.type);
30743
        } else {
30744
          switch (fieldId) {
30745
            case USER_ID:
30746
              if (field.type == TType.I64) {
30747
                this.user_id = iprot.readI64();
30748
                setUser_idIsSet(true);
30749
              } else { 
30750
                TProtocolUtil.skip(iprot, field.type);
30751
              }
30752
              break;
30753
          }
30754
          iprot.readFieldEnd();
30755
        }
30756
      }
30757
      iprot.readStructEnd();
30758
      validate();
30759
    }
30760
 
30761
    public void write(TProtocol oprot) throws TException {
30762
      validate();
30763
 
30764
      oprot.writeStructBegin(STRUCT_DESC);
30765
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30766
      oprot.writeI64(this.user_id);
30767
      oprot.writeFieldEnd();
30768
      oprot.writeFieldStop();
30769
      oprot.writeStructEnd();
30770
    }
30771
 
30772
    @Override
30773
    public String toString() {
30774
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
30775
      boolean first = true;
30776
 
30777
      sb.append("user_id:");
30778
      sb.append(this.user_id);
30779
      first = false;
30780
      sb.append(")");
30781
      return sb.toString();
30782
    }
30783
 
30784
    public void validate() throws TException {
30785
      // check for required fields
30786
    }
30787
 
30788
  }
30789
 
30790
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
30791
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
30792
 
30793
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
30794
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30795
 
30796
    private Widget success;
30797
    private WidgetException scx;
30798
 
30799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30800
    public enum _Fields implements TFieldIdEnum {
30801
      SUCCESS((short)0, "success"),
30802
      SCX((short)1, "scx");
30803
 
30804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30806
 
30807
      static {
30808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30809
          byId.put((int)field._thriftId, field);
30810
          byName.put(field.getFieldName(), field);
30811
        }
30812
      }
30813
 
30814
      /**
30815
       * Find the _Fields constant that matches fieldId, or null if its not found.
30816
       */
30817
      public static _Fields findByThriftId(int fieldId) {
30818
        return byId.get(fieldId);
30819
      }
30820
 
30821
      /**
30822
       * Find the _Fields constant that matches fieldId, throwing an exception
30823
       * if it is not found.
30824
       */
30825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30826
        _Fields fields = findByThriftId(fieldId);
30827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30828
        return fields;
30829
      }
30830
 
30831
      /**
30832
       * Find the _Fields constant that matches name, or null if its not found.
30833
       */
30834
      public static _Fields findByName(String name) {
30835
        return byName.get(name);
30836
      }
30837
 
30838
      private final short _thriftId;
30839
      private final String _fieldName;
30840
 
30841
      _Fields(short thriftId, String fieldName) {
30842
        _thriftId = thriftId;
30843
        _fieldName = fieldName;
30844
      }
30845
 
30846
      public short getThriftFieldId() {
30847
        return _thriftId;
30848
      }
30849
 
30850
      public String getFieldName() {
30851
        return _fieldName;
30852
      }
30853
    }
30854
 
30855
    // isset id assignments
30856
 
30857
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 30858
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 30859
          new StructMetaData(TType.STRUCT, Widget.class)));
30860
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 30861
          new FieldValueMetaData(TType.STRUCT)));
30862
    }});
30863
 
30864
    static {
553 chandransh 30865
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 30866
    }
30867
 
553 chandransh 30868
    public getMyResearch_result() {
48 ashish 30869
    }
30870
 
553 chandransh 30871
    public getMyResearch_result(
30872
      Widget success,
30873
      WidgetException scx)
48 ashish 30874
    {
30875
      this();
30876
      this.success = success;
553 chandransh 30877
      this.scx = scx;
48 ashish 30878
    }
30879
 
30880
    /**
30881
     * Performs a deep copy on <i>other</i>.
30882
     */
553 chandransh 30883
    public getMyResearch_result(getMyResearch_result other) {
30884
      if (other.isSetSuccess()) {
30885
        this.success = new Widget(other.success);
48 ashish 30886
      }
553 chandransh 30887
      if (other.isSetScx()) {
30888
        this.scx = new WidgetException(other.scx);
30889
      }
48 ashish 30890
    }
30891
 
553 chandransh 30892
    public getMyResearch_result deepCopy() {
30893
      return new getMyResearch_result(this);
48 ashish 30894
    }
30895
 
30896
    @Deprecated
553 chandransh 30897
    public getMyResearch_result clone() {
30898
      return new getMyResearch_result(this);
48 ashish 30899
    }
30900
 
553 chandransh 30901
    public Widget getSuccess() {
48 ashish 30902
      return this.success;
30903
    }
30904
 
553 chandransh 30905
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 30906
      this.success = success;
30907
      return this;
30908
    }
30909
 
30910
    public void unsetSuccess() {
553 chandransh 30911
      this.success = null;
48 ashish 30912
    }
30913
 
30914
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30915
    public boolean isSetSuccess() {
553 chandransh 30916
      return this.success != null;
48 ashish 30917
    }
30918
 
30919
    public void setSuccessIsSet(boolean value) {
553 chandransh 30920
      if (!value) {
30921
        this.success = null;
30922
      }
48 ashish 30923
    }
30924
 
553 chandransh 30925
    public WidgetException getScx() {
30926
      return this.scx;
48 ashish 30927
    }
30928
 
553 chandransh 30929
    public getMyResearch_result setScx(WidgetException scx) {
30930
      this.scx = scx;
48 ashish 30931
      return this;
30932
    }
30933
 
553 chandransh 30934
    public void unsetScx() {
30935
      this.scx = null;
48 ashish 30936
    }
30937
 
553 chandransh 30938
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30939
    public boolean isSetScx() {
30940
      return this.scx != null;
48 ashish 30941
    }
30942
 
553 chandransh 30943
    public void setScxIsSet(boolean value) {
48 ashish 30944
      if (!value) {
553 chandransh 30945
        this.scx = null;
48 ashish 30946
      }
30947
    }
30948
 
30949
    public void setFieldValue(_Fields field, Object value) {
30950
      switch (field) {
30951
      case SUCCESS:
30952
        if (value == null) {
30953
          unsetSuccess();
30954
        } else {
553 chandransh 30955
          setSuccess((Widget)value);
48 ashish 30956
        }
30957
        break;
30958
 
553 chandransh 30959
      case SCX:
48 ashish 30960
        if (value == null) {
553 chandransh 30961
          unsetScx();
48 ashish 30962
        } else {
553 chandransh 30963
          setScx((WidgetException)value);
48 ashish 30964
        }
30965
        break;
30966
 
30967
      }
30968
    }
30969
 
30970
    public void setFieldValue(int fieldID, Object value) {
30971
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30972
    }
30973
 
30974
    public Object getFieldValue(_Fields field) {
30975
      switch (field) {
30976
      case SUCCESS:
553 chandransh 30977
        return getSuccess();
48 ashish 30978
 
553 chandransh 30979
      case SCX:
30980
        return getScx();
48 ashish 30981
 
30982
      }
30983
      throw new IllegalStateException();
30984
    }
30985
 
30986
    public Object getFieldValue(int fieldId) {
30987
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30988
    }
30989
 
30990
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30991
    public boolean isSet(_Fields field) {
30992
      switch (field) {
30993
      case SUCCESS:
30994
        return isSetSuccess();
553 chandransh 30995
      case SCX:
30996
        return isSetScx();
48 ashish 30997
      }
30998
      throw new IllegalStateException();
30999
    }
31000
 
31001
    public boolean isSet(int fieldID) {
31002
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31003
    }
31004
 
31005
    @Override
31006
    public boolean equals(Object that) {
31007
      if (that == null)
31008
        return false;
553 chandransh 31009
      if (that instanceof getMyResearch_result)
31010
        return this.equals((getMyResearch_result)that);
48 ashish 31011
      return false;
31012
    }
31013
 
553 chandransh 31014
    public boolean equals(getMyResearch_result that) {
48 ashish 31015
      if (that == null)
31016
        return false;
31017
 
553 chandransh 31018
      boolean this_present_success = true && this.isSetSuccess();
31019
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 31020
      if (this_present_success || that_present_success) {
31021
        if (!(this_present_success && that_present_success))
31022
          return false;
553 chandransh 31023
        if (!this.success.equals(that.success))
48 ashish 31024
          return false;
31025
      }
31026
 
553 chandransh 31027
      boolean this_present_scx = true && this.isSetScx();
31028
      boolean that_present_scx = true && that.isSetScx();
31029
      if (this_present_scx || that_present_scx) {
31030
        if (!(this_present_scx && that_present_scx))
48 ashish 31031
          return false;
553 chandransh 31032
        if (!this.scx.equals(that.scx))
48 ashish 31033
          return false;
31034
      }
31035
 
31036
      return true;
31037
    }
31038
 
31039
    @Override
31040
    public int hashCode() {
31041
      return 0;
31042
    }
31043
 
553 chandransh 31044
    public int compareTo(getMyResearch_result other) {
48 ashish 31045
      if (!getClass().equals(other.getClass())) {
31046
        return getClass().getName().compareTo(other.getClass().getName());
31047
      }
31048
 
31049
      int lastComparison = 0;
553 chandransh 31050
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 31051
 
31052
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31053
      if (lastComparison != 0) {
31054
        return lastComparison;
31055
      }
31056
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31057
      if (lastComparison != 0) {
31058
        return lastComparison;
31059
      }
553 chandransh 31060
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 31061
      if (lastComparison != 0) {
31062
        return lastComparison;
31063
      }
553 chandransh 31064
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 31065
      if (lastComparison != 0) {
31066
        return lastComparison;
31067
      }
31068
      return 0;
31069
    }
31070
 
31071
    public void read(TProtocol iprot) throws TException {
31072
      TField field;
31073
      iprot.readStructBegin();
31074
      while (true)
31075
      {
31076
        field = iprot.readFieldBegin();
31077
        if (field.type == TType.STOP) { 
31078
          break;
31079
        }
31080
        _Fields fieldId = _Fields.findByThriftId(field.id);
31081
        if (fieldId == null) {
31082
          TProtocolUtil.skip(iprot, field.type);
31083
        } else {
31084
          switch (fieldId) {
31085
            case SUCCESS:
553 chandransh 31086
              if (field.type == TType.STRUCT) {
31087
                this.success = new Widget();
31088
                this.success.read(iprot);
48 ashish 31089
              } else { 
31090
                TProtocolUtil.skip(iprot, field.type);
31091
              }
31092
              break;
553 chandransh 31093
            case SCX:
48 ashish 31094
              if (field.type == TType.STRUCT) {
553 chandransh 31095
                this.scx = new WidgetException();
31096
                this.scx.read(iprot);
48 ashish 31097
              } else { 
31098
                TProtocolUtil.skip(iprot, field.type);
31099
              }
31100
              break;
31101
          }
31102
          iprot.readFieldEnd();
31103
        }
31104
      }
31105
      iprot.readStructEnd();
31106
      validate();
31107
    }
31108
 
31109
    public void write(TProtocol oprot) throws TException {
31110
      oprot.writeStructBegin(STRUCT_DESC);
31111
 
31112
      if (this.isSetSuccess()) {
31113
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 31114
        this.success.write(oprot);
48 ashish 31115
        oprot.writeFieldEnd();
553 chandransh 31116
      } else if (this.isSetScx()) {
31117
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31118
        this.scx.write(oprot);
48 ashish 31119
        oprot.writeFieldEnd();
31120
      }
31121
      oprot.writeFieldStop();
31122
      oprot.writeStructEnd();
31123
    }
31124
 
31125
    @Override
31126
    public String toString() {
553 chandransh 31127
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 31128
      boolean first = true;
31129
 
31130
      sb.append("success:");
553 chandransh 31131
      if (this.success == null) {
31132
        sb.append("null");
31133
      } else {
31134
        sb.append(this.success);
31135
      }
48 ashish 31136
      first = false;
31137
      if (!first) sb.append(", ");
553 chandransh 31138
      sb.append("scx:");
31139
      if (this.scx == null) {
48 ashish 31140
        sb.append("null");
31141
      } else {
553 chandransh 31142
        sb.append(this.scx);
48 ashish 31143
      }
31144
      first = false;
31145
      sb.append(")");
31146
      return sb.toString();
31147
    }
31148
 
31149
    public void validate() throws TException {
31150
      // check for required fields
31151
    }
31152
 
31153
  }
31154
 
553 chandransh 31155
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
31156
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 31157
 
553 chandransh 31158
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
31159
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 31160
 
553 chandransh 31161
    private long user_id;
31162
    private long item_id;
130 ashish 31163
 
31164
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31165
    public enum _Fields implements TFieldIdEnum {
553 chandransh 31166
      USER_ID((short)1, "user_id"),
31167
      ITEM_ID((short)2, "item_id");
130 ashish 31168
 
31169
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31170
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31171
 
31172
      static {
31173
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31174
          byId.put((int)field._thriftId, field);
31175
          byName.put(field.getFieldName(), field);
31176
        }
31177
      }
31178
 
31179
      /**
31180
       * Find the _Fields constant that matches fieldId, or null if its not found.
31181
       */
31182
      public static _Fields findByThriftId(int fieldId) {
31183
        return byId.get(fieldId);
31184
      }
31185
 
31186
      /**
31187
       * Find the _Fields constant that matches fieldId, throwing an exception
31188
       * if it is not found.
31189
       */
31190
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31191
        _Fields fields = findByThriftId(fieldId);
31192
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31193
        return fields;
31194
      }
31195
 
31196
      /**
31197
       * Find the _Fields constant that matches name, or null if its not found.
31198
       */
31199
      public static _Fields findByName(String name) {
31200
        return byName.get(name);
31201
      }
31202
 
31203
      private final short _thriftId;
31204
      private final String _fieldName;
31205
 
31206
      _Fields(short thriftId, String fieldName) {
31207
        _thriftId = thriftId;
31208
        _fieldName = fieldName;
31209
      }
31210
 
31211
      public short getThriftFieldId() {
31212
        return _thriftId;
31213
      }
31214
 
31215
      public String getFieldName() {
31216
        return _fieldName;
31217
      }
31218
    }
31219
 
31220
    // isset id assignments
553 chandransh 31221
    private static final int __USER_ID_ISSET_ID = 0;
31222
    private static final int __ITEM_ID_ISSET_ID = 1;
31223
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 31224
 
31225
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 31226
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
130 ashish 31227
          new FieldValueMetaData(TType.I64)));
553 chandransh 31228
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
31229
          new FieldValueMetaData(TType.I64)));
130 ashish 31230
    }});
31231
 
31232
    static {
553 chandransh 31233
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 31234
    }
31235
 
553 chandransh 31236
    public updateMyResearch_args() {
130 ashish 31237
    }
31238
 
553 chandransh 31239
    public updateMyResearch_args(
31240
      long user_id,
31241
      long item_id)
130 ashish 31242
    {
31243
      this();
553 chandransh 31244
      this.user_id = user_id;
31245
      setUser_idIsSet(true);
31246
      this.item_id = item_id;
31247
      setItem_idIsSet(true);
130 ashish 31248
    }
31249
 
31250
    /**
31251
     * Performs a deep copy on <i>other</i>.
31252
     */
553 chandransh 31253
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 31254
      __isset_bit_vector.clear();
31255
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 31256
      this.user_id = other.user_id;
31257
      this.item_id = other.item_id;
130 ashish 31258
    }
31259
 
553 chandransh 31260
    public updateMyResearch_args deepCopy() {
31261
      return new updateMyResearch_args(this);
130 ashish 31262
    }
31263
 
31264
    @Deprecated
553 chandransh 31265
    public updateMyResearch_args clone() {
31266
      return new updateMyResearch_args(this);
130 ashish 31267
    }
31268
 
553 chandransh 31269
    public long getUser_id() {
31270
      return this.user_id;
130 ashish 31271
    }
31272
 
553 chandransh 31273
    public updateMyResearch_args setUser_id(long user_id) {
31274
      this.user_id = user_id;
31275
      setUser_idIsSet(true);
130 ashish 31276
      return this;
31277
    }
31278
 
553 chandransh 31279
    public void unsetUser_id() {
31280
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
130 ashish 31281
    }
31282
 
553 chandransh 31283
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
31284
    public boolean isSetUser_id() {
31285
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
130 ashish 31286
    }
31287
 
553 chandransh 31288
    public void setUser_idIsSet(boolean value) {
31289
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
130 ashish 31290
    }
31291
 
553 chandransh 31292
    public long getItem_id() {
31293
      return this.item_id;
31294
    }
31295
 
31296
    public updateMyResearch_args setItem_id(long item_id) {
31297
      this.item_id = item_id;
31298
      setItem_idIsSet(true);
31299
      return this;
31300
    }
31301
 
31302
    public void unsetItem_id() {
31303
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
31304
    }
31305
 
31306
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
31307
    public boolean isSetItem_id() {
31308
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
31309
    }
31310
 
31311
    public void setItem_idIsSet(boolean value) {
31312
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
31313
    }
31314
 
130 ashish 31315
    public void setFieldValue(_Fields field, Object value) {
31316
      switch (field) {
553 chandransh 31317
      case USER_ID:
130 ashish 31318
        if (value == null) {
553 chandransh 31319
          unsetUser_id();
130 ashish 31320
        } else {
553 chandransh 31321
          setUser_id((Long)value);
130 ashish 31322
        }
31323
        break;
31324
 
553 chandransh 31325
      case ITEM_ID:
31326
        if (value == null) {
31327
          unsetItem_id();
31328
        } else {
31329
          setItem_id((Long)value);
31330
        }
31331
        break;
31332
 
130 ashish 31333
      }
31334
    }
31335
 
31336
    public void setFieldValue(int fieldID, Object value) {
31337
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31338
    }
31339
 
31340
    public Object getFieldValue(_Fields field) {
31341
      switch (field) {
553 chandransh 31342
      case USER_ID:
31343
        return new Long(getUser_id());
130 ashish 31344
 
553 chandransh 31345
      case ITEM_ID:
31346
        return new Long(getItem_id());
31347
 
130 ashish 31348
      }
31349
      throw new IllegalStateException();
31350
    }
31351
 
31352
    public Object getFieldValue(int fieldId) {
31353
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31354
    }
31355
 
31356
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31357
    public boolean isSet(_Fields field) {
31358
      switch (field) {
553 chandransh 31359
      case USER_ID:
31360
        return isSetUser_id();
31361
      case ITEM_ID:
31362
        return isSetItem_id();
130 ashish 31363
      }
31364
      throw new IllegalStateException();
31365
    }
31366
 
31367
    public boolean isSet(int fieldID) {
31368
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31369
    }
31370
 
31371
    @Override
31372
    public boolean equals(Object that) {
31373
      if (that == null)
31374
        return false;
553 chandransh 31375
      if (that instanceof updateMyResearch_args)
31376
        return this.equals((updateMyResearch_args)that);
130 ashish 31377
      return false;
31378
    }
31379
 
553 chandransh 31380
    public boolean equals(updateMyResearch_args that) {
130 ashish 31381
      if (that == null)
31382
        return false;
31383
 
553 chandransh 31384
      boolean this_present_user_id = true;
31385
      boolean that_present_user_id = true;
31386
      if (this_present_user_id || that_present_user_id) {
31387
        if (!(this_present_user_id && that_present_user_id))
130 ashish 31388
          return false;
553 chandransh 31389
        if (this.user_id != that.user_id)
130 ashish 31390
          return false;
31391
      }
31392
 
553 chandransh 31393
      boolean this_present_item_id = true;
31394
      boolean that_present_item_id = true;
31395
      if (this_present_item_id || that_present_item_id) {
31396
        if (!(this_present_item_id && that_present_item_id))
31397
          return false;
31398
        if (this.item_id != that.item_id)
31399
          return false;
31400
      }
31401
 
130 ashish 31402
      return true;
31403
    }
31404
 
31405
    @Override
31406
    public int hashCode() {
31407
      return 0;
31408
    }
31409
 
553 chandransh 31410
    public int compareTo(updateMyResearch_args other) {
130 ashish 31411
      if (!getClass().equals(other.getClass())) {
31412
        return getClass().getName().compareTo(other.getClass().getName());
31413
      }
31414
 
31415
      int lastComparison = 0;
553 chandransh 31416
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 31417
 
553 chandransh 31418
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
130 ashish 31419
      if (lastComparison != 0) {
31420
        return lastComparison;
31421
      }
553 chandransh 31422
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
130 ashish 31423
      if (lastComparison != 0) {
31424
        return lastComparison;
31425
      }
553 chandransh 31426
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
31427
      if (lastComparison != 0) {
31428
        return lastComparison;
31429
      }
31430
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
31431
      if (lastComparison != 0) {
31432
        return lastComparison;
31433
      }
130 ashish 31434
      return 0;
31435
    }
31436
 
31437
    public void read(TProtocol iprot) throws TException {
31438
      TField field;
31439
      iprot.readStructBegin();
31440
      while (true)
31441
      {
31442
        field = iprot.readFieldBegin();
31443
        if (field.type == TType.STOP) { 
31444
          break;
31445
        }
31446
        _Fields fieldId = _Fields.findByThriftId(field.id);
31447
        if (fieldId == null) {
31448
          TProtocolUtil.skip(iprot, field.type);
31449
        } else {
31450
          switch (fieldId) {
553 chandransh 31451
            case USER_ID:
130 ashish 31452
              if (field.type == TType.I64) {
553 chandransh 31453
                this.user_id = iprot.readI64();
31454
                setUser_idIsSet(true);
130 ashish 31455
              } else { 
31456
                TProtocolUtil.skip(iprot, field.type);
31457
              }
31458
              break;
553 chandransh 31459
            case ITEM_ID:
31460
              if (field.type == TType.I64) {
31461
                this.item_id = iprot.readI64();
31462
                setItem_idIsSet(true);
31463
              } else { 
31464
                TProtocolUtil.skip(iprot, field.type);
31465
              }
31466
              break;
130 ashish 31467
          }
31468
          iprot.readFieldEnd();
31469
        }
31470
      }
31471
      iprot.readStructEnd();
31472
      validate();
31473
    }
31474
 
31475
    public void write(TProtocol oprot) throws TException {
31476
      validate();
31477
 
31478
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 31479
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31480
      oprot.writeI64(this.user_id);
130 ashish 31481
      oprot.writeFieldEnd();
553 chandransh 31482
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
31483
      oprot.writeI64(this.item_id);
31484
      oprot.writeFieldEnd();
130 ashish 31485
      oprot.writeFieldStop();
31486
      oprot.writeStructEnd();
31487
    }
31488
 
31489
    @Override
31490
    public String toString() {
553 chandransh 31491
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 31492
      boolean first = true;
31493
 
553 chandransh 31494
      sb.append("user_id:");
31495
      sb.append(this.user_id);
130 ashish 31496
      first = false;
553 chandransh 31497
      if (!first) sb.append(", ");
31498
      sb.append("item_id:");
31499
      sb.append(this.item_id);
31500
      first = false;
130 ashish 31501
      sb.append(")");
31502
      return sb.toString();
31503
    }
31504
 
31505
    public void validate() throws TException {
31506
      // check for required fields
31507
    }
31508
 
31509
  }
31510
 
553 chandransh 31511
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
31512
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 31513
 
31514
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 31515
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 31516
 
31517
    private boolean success;
553 chandransh 31518
    private WidgetException scx;
130 ashish 31519
 
31520
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31521
    public enum _Fields implements TFieldIdEnum {
31522
      SUCCESS((short)0, "success"),
553 chandransh 31523
      SCX((short)1, "scx");
130 ashish 31524
 
31525
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31526
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31527
 
31528
      static {
31529
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31530
          byId.put((int)field._thriftId, field);
31531
          byName.put(field.getFieldName(), field);
31532
        }
31533
      }
31534
 
31535
      /**
31536
       * Find the _Fields constant that matches fieldId, or null if its not found.
31537
       */
31538
      public static _Fields findByThriftId(int fieldId) {
31539
        return byId.get(fieldId);
31540
      }
31541
 
31542
      /**
31543
       * Find the _Fields constant that matches fieldId, throwing an exception
31544
       * if it is not found.
31545
       */
31546
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31547
        _Fields fields = findByThriftId(fieldId);
31548
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31549
        return fields;
31550
      }
31551
 
31552
      /**
31553
       * Find the _Fields constant that matches name, or null if its not found.
31554
       */
31555
      public static _Fields findByName(String name) {
31556
        return byName.get(name);
31557
      }
31558
 
31559
      private final short _thriftId;
31560
      private final String _fieldName;
31561
 
31562
      _Fields(short thriftId, String fieldName) {
31563
        _thriftId = thriftId;
31564
        _fieldName = fieldName;
31565
      }
31566
 
31567
      public short getThriftFieldId() {
31568
        return _thriftId;
31569
      }
31570
 
31571
      public String getFieldName() {
31572
        return _fieldName;
31573
      }
31574
    }
31575
 
31576
    // isset id assignments
31577
    private static final int __SUCCESS_ISSET_ID = 0;
31578
    private BitSet __isset_bit_vector = new BitSet(1);
31579
 
31580
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31581
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31582
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 31583
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 31584
          new FieldValueMetaData(TType.STRUCT)));
31585
    }});
31586
 
31587
    static {
553 chandransh 31588
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 31589
    }
31590
 
553 chandransh 31591
    public updateMyResearch_result() {
130 ashish 31592
    }
31593
 
553 chandransh 31594
    public updateMyResearch_result(
130 ashish 31595
      boolean success,
553 chandransh 31596
      WidgetException scx)
130 ashish 31597
    {
31598
      this();
31599
      this.success = success;
31600
      setSuccessIsSet(true);
553 chandransh 31601
      this.scx = scx;
130 ashish 31602
    }
31603
 
31604
    /**
31605
     * Performs a deep copy on <i>other</i>.
31606
     */
553 chandransh 31607
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 31608
      __isset_bit_vector.clear();
31609
      __isset_bit_vector.or(other.__isset_bit_vector);
31610
      this.success = other.success;
553 chandransh 31611
      if (other.isSetScx()) {
31612
        this.scx = new WidgetException(other.scx);
130 ashish 31613
      }
31614
    }
31615
 
553 chandransh 31616
    public updateMyResearch_result deepCopy() {
31617
      return new updateMyResearch_result(this);
130 ashish 31618
    }
31619
 
31620
    @Deprecated
553 chandransh 31621
    public updateMyResearch_result clone() {
31622
      return new updateMyResearch_result(this);
130 ashish 31623
    }
31624
 
31625
    public boolean isSuccess() {
31626
      return this.success;
31627
    }
31628
 
553 chandransh 31629
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 31630
      this.success = success;
31631
      setSuccessIsSet(true);
31632
      return this;
31633
    }
31634
 
31635
    public void unsetSuccess() {
31636
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31637
    }
31638
 
31639
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31640
    public boolean isSetSuccess() {
31641
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31642
    }
31643
 
31644
    public void setSuccessIsSet(boolean value) {
31645
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31646
    }
31647
 
553 chandransh 31648
    public WidgetException getScx() {
31649
      return this.scx;
130 ashish 31650
    }
31651
 
553 chandransh 31652
    public updateMyResearch_result setScx(WidgetException scx) {
31653
      this.scx = scx;
130 ashish 31654
      return this;
31655
    }
31656
 
553 chandransh 31657
    public void unsetScx() {
31658
      this.scx = null;
130 ashish 31659
    }
31660
 
553 chandransh 31661
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31662
    public boolean isSetScx() {
31663
      return this.scx != null;
130 ashish 31664
    }
31665
 
553 chandransh 31666
    public void setScxIsSet(boolean value) {
130 ashish 31667
      if (!value) {
553 chandransh 31668
        this.scx = null;
130 ashish 31669
      }
31670
    }
31671
 
31672
    public void setFieldValue(_Fields field, Object value) {
31673
      switch (field) {
31674
      case SUCCESS:
31675
        if (value == null) {
31676
          unsetSuccess();
31677
        } else {
31678
          setSuccess((Boolean)value);
31679
        }
31680
        break;
31681
 
553 chandransh 31682
      case SCX:
130 ashish 31683
        if (value == null) {
553 chandransh 31684
          unsetScx();
130 ashish 31685
        } else {
553 chandransh 31686
          setScx((WidgetException)value);
130 ashish 31687
        }
31688
        break;
31689
 
31690
      }
31691
    }
31692
 
31693
    public void setFieldValue(int fieldID, Object value) {
31694
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31695
    }
31696
 
31697
    public Object getFieldValue(_Fields field) {
31698
      switch (field) {
31699
      case SUCCESS:
31700
        return new Boolean(isSuccess());
31701
 
553 chandransh 31702
      case SCX:
31703
        return getScx();
130 ashish 31704
 
31705
      }
31706
      throw new IllegalStateException();
31707
    }
31708
 
31709
    public Object getFieldValue(int fieldId) {
31710
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31711
    }
31712
 
31713
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31714
    public boolean isSet(_Fields field) {
31715
      switch (field) {
31716
      case SUCCESS:
31717
        return isSetSuccess();
553 chandransh 31718
      case SCX:
31719
        return isSetScx();
130 ashish 31720
      }
31721
      throw new IllegalStateException();
31722
    }
31723
 
31724
    public boolean isSet(int fieldID) {
31725
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31726
    }
31727
 
31728
    @Override
31729
    public boolean equals(Object that) {
31730
      if (that == null)
31731
        return false;
553 chandransh 31732
      if (that instanceof updateMyResearch_result)
31733
        return this.equals((updateMyResearch_result)that);
130 ashish 31734
      return false;
31735
    }
31736
 
553 chandransh 31737
    public boolean equals(updateMyResearch_result that) {
130 ashish 31738
      if (that == null)
31739
        return false;
31740
 
31741
      boolean this_present_success = true;
31742
      boolean that_present_success = true;
31743
      if (this_present_success || that_present_success) {
31744
        if (!(this_present_success && that_present_success))
31745
          return false;
31746
        if (this.success != that.success)
31747
          return false;
31748
      }
31749
 
553 chandransh 31750
      boolean this_present_scx = true && this.isSetScx();
31751
      boolean that_present_scx = true && that.isSetScx();
31752
      if (this_present_scx || that_present_scx) {
31753
        if (!(this_present_scx && that_present_scx))
130 ashish 31754
          return false;
553 chandransh 31755
        if (!this.scx.equals(that.scx))
130 ashish 31756
          return false;
31757
      }
31758
 
31759
      return true;
31760
    }
31761
 
31762
    @Override
31763
    public int hashCode() {
31764
      return 0;
31765
    }
31766
 
553 chandransh 31767
    public int compareTo(updateMyResearch_result other) {
130 ashish 31768
      if (!getClass().equals(other.getClass())) {
31769
        return getClass().getName().compareTo(other.getClass().getName());
31770
      }
31771
 
31772
      int lastComparison = 0;
553 chandransh 31773
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 31774
 
31775
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31776
      if (lastComparison != 0) {
31777
        return lastComparison;
31778
      }
31779
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31780
      if (lastComparison != 0) {
31781
        return lastComparison;
31782
      }
553 chandransh 31783
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 31784
      if (lastComparison != 0) {
31785
        return lastComparison;
31786
      }
553 chandransh 31787
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 31788
      if (lastComparison != 0) {
31789
        return lastComparison;
31790
      }
31791
      return 0;
31792
    }
31793
 
31794
    public void read(TProtocol iprot) throws TException {
31795
      TField field;
31796
      iprot.readStructBegin();
31797
      while (true)
31798
      {
31799
        field = iprot.readFieldBegin();
31800
        if (field.type == TType.STOP) { 
31801
          break;
31802
        }
31803
        _Fields fieldId = _Fields.findByThriftId(field.id);
31804
        if (fieldId == null) {
31805
          TProtocolUtil.skip(iprot, field.type);
31806
        } else {
31807
          switch (fieldId) {
31808
            case SUCCESS:
31809
              if (field.type == TType.BOOL) {
31810
                this.success = iprot.readBool();
31811
                setSuccessIsSet(true);
31812
              } else { 
31813
                TProtocolUtil.skip(iprot, field.type);
31814
              }
31815
              break;
553 chandransh 31816
            case SCX:
130 ashish 31817
              if (field.type == TType.STRUCT) {
553 chandransh 31818
                this.scx = new WidgetException();
31819
                this.scx.read(iprot);
130 ashish 31820
              } else { 
31821
                TProtocolUtil.skip(iprot, field.type);
31822
              }
31823
              break;
31824
          }
31825
          iprot.readFieldEnd();
31826
        }
31827
      }
31828
      iprot.readStructEnd();
31829
      validate();
31830
    }
31831
 
31832
    public void write(TProtocol oprot) throws TException {
31833
      oprot.writeStructBegin(STRUCT_DESC);
31834
 
31835
      if (this.isSetSuccess()) {
31836
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31837
        oprot.writeBool(this.success);
31838
        oprot.writeFieldEnd();
553 chandransh 31839
      } else if (this.isSetScx()) {
31840
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31841
        this.scx.write(oprot);
130 ashish 31842
        oprot.writeFieldEnd();
31843
      }
31844
      oprot.writeFieldStop();
31845
      oprot.writeStructEnd();
31846
    }
31847
 
31848
    @Override
31849
    public String toString() {
553 chandransh 31850
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 31851
      boolean first = true;
31852
 
31853
      sb.append("success:");
31854
      sb.append(this.success);
31855
      first = false;
31856
      if (!first) sb.append(", ");
553 chandransh 31857
      sb.append("scx:");
31858
      if (this.scx == null) {
130 ashish 31859
        sb.append("null");
31860
      } else {
553 chandransh 31861
        sb.append(this.scx);
130 ashish 31862
      }
31863
      first = false;
31864
      sb.append(")");
31865
      return sb.toString();
31866
    }
31867
 
31868
    public void validate() throws TException {
31869
      // check for required fields
31870
    }
31871
 
31872
  }
31873
 
553 chandransh 31874
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
31875
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 31876
 
553 chandransh 31877
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
31878
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
130 ashish 31879
 
553 chandransh 31880
    private long user_id;
31881
    private long item_id;
130 ashish 31882
 
31883
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31884
    public enum _Fields implements TFieldIdEnum {
553 chandransh 31885
      USER_ID((short)1, "user_id"),
31886
      ITEM_ID((short)2, "item_id");
130 ashish 31887
 
31888
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31889
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31890
 
31891
      static {
31892
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31893
          byId.put((int)field._thriftId, field);
31894
          byName.put(field.getFieldName(), field);
31895
        }
31896
      }
31897
 
31898
      /**
31899
       * Find the _Fields constant that matches fieldId, or null if its not found.
31900
       */
31901
      public static _Fields findByThriftId(int fieldId) {
31902
        return byId.get(fieldId);
31903
      }
31904
 
31905
      /**
31906
       * Find the _Fields constant that matches fieldId, throwing an exception
31907
       * if it is not found.
31908
       */
31909
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31910
        _Fields fields = findByThriftId(fieldId);
31911
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31912
        return fields;
31913
      }
31914
 
31915
      /**
31916
       * Find the _Fields constant that matches name, or null if its not found.
31917
       */
31918
      public static _Fields findByName(String name) {
31919
        return byName.get(name);
31920
      }
31921
 
31922
      private final short _thriftId;
31923
      private final String _fieldName;
31924
 
31925
      _Fields(short thriftId, String fieldName) {
31926
        _thriftId = thriftId;
31927
        _fieldName = fieldName;
31928
      }
31929
 
31930
      public short getThriftFieldId() {
31931
        return _thriftId;
31932
      }
31933
 
31934
      public String getFieldName() {
31935
        return _fieldName;
31936
      }
31937
    }
31938
 
31939
    // isset id assignments
553 chandransh 31940
    private static final int __USER_ID_ISSET_ID = 0;
31941
    private static final int __ITEM_ID_ISSET_ID = 1;
31942
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 31943
 
31944
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 31945
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
31946
          new FieldValueMetaData(TType.I64)));
31947
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
31948
          new FieldValueMetaData(TType.I64)));
130 ashish 31949
    }});
31950
 
31951
    static {
553 chandransh 31952
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 31953
    }
31954
 
553 chandransh 31955
    public deleteItemFromMyResearch_args() {
130 ashish 31956
    }
31957
 
553 chandransh 31958
    public deleteItemFromMyResearch_args(
31959
      long user_id,
31960
      long item_id)
130 ashish 31961
    {
31962
      this();
553 chandransh 31963
      this.user_id = user_id;
31964
      setUser_idIsSet(true);
31965
      this.item_id = item_id;
31966
      setItem_idIsSet(true);
130 ashish 31967
    }
31968
 
31969
    /**
31970
     * Performs a deep copy on <i>other</i>.
31971
     */
553 chandransh 31972
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 31973
      __isset_bit_vector.clear();
31974
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 31975
      this.user_id = other.user_id;
31976
      this.item_id = other.item_id;
31977
    }
31978
 
31979
    public deleteItemFromMyResearch_args deepCopy() {
31980
      return new deleteItemFromMyResearch_args(this);
31981
    }
31982
 
31983
    @Deprecated
31984
    public deleteItemFromMyResearch_args clone() {
31985
      return new deleteItemFromMyResearch_args(this);
31986
    }
31987
 
31988
    public long getUser_id() {
31989
      return this.user_id;
31990
    }
31991
 
31992
    public deleteItemFromMyResearch_args setUser_id(long user_id) {
31993
      this.user_id = user_id;
31994
      setUser_idIsSet(true);
31995
      return this;
31996
    }
31997
 
31998
    public void unsetUser_id() {
31999
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
32000
    }
32001
 
32002
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
32003
    public boolean isSetUser_id() {
32004
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
32005
    }
32006
 
32007
    public void setUser_idIsSet(boolean value) {
32008
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
32009
    }
32010
 
32011
    public long getItem_id() {
32012
      return this.item_id;
32013
    }
32014
 
32015
    public deleteItemFromMyResearch_args setItem_id(long item_id) {
32016
      this.item_id = item_id;
32017
      setItem_idIsSet(true);
32018
      return this;
32019
    }
32020
 
32021
    public void unsetItem_id() {
32022
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
32023
    }
32024
 
32025
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
32026
    public boolean isSetItem_id() {
32027
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
32028
    }
32029
 
32030
    public void setItem_idIsSet(boolean value) {
32031
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
32032
    }
32033
 
32034
    public void setFieldValue(_Fields field, Object value) {
32035
      switch (field) {
32036
      case USER_ID:
32037
        if (value == null) {
32038
          unsetUser_id();
32039
        } else {
32040
          setUser_id((Long)value);
32041
        }
32042
        break;
32043
 
32044
      case ITEM_ID:
32045
        if (value == null) {
32046
          unsetItem_id();
32047
        } else {
32048
          setItem_id((Long)value);
32049
        }
32050
        break;
32051
 
130 ashish 32052
      }
32053
    }
32054
 
553 chandransh 32055
    public void setFieldValue(int fieldID, Object value) {
32056
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 32057
    }
32058
 
553 chandransh 32059
    public Object getFieldValue(_Fields field) {
32060
      switch (field) {
32061
      case USER_ID:
32062
        return new Long(getUser_id());
32063
 
32064
      case ITEM_ID:
32065
        return new Long(getItem_id());
32066
 
32067
      }
32068
      throw new IllegalStateException();
32069
    }
32070
 
32071
    public Object getFieldValue(int fieldId) {
32072
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32073
    }
32074
 
32075
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32076
    public boolean isSet(_Fields field) {
32077
      switch (field) {
32078
      case USER_ID:
32079
        return isSetUser_id();
32080
      case ITEM_ID:
32081
        return isSetItem_id();
32082
      }
32083
      throw new IllegalStateException();
32084
    }
32085
 
32086
    public boolean isSet(int fieldID) {
32087
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32088
    }
32089
 
32090
    @Override
32091
    public boolean equals(Object that) {
32092
      if (that == null)
32093
        return false;
32094
      if (that instanceof deleteItemFromMyResearch_args)
32095
        return this.equals((deleteItemFromMyResearch_args)that);
32096
      return false;
32097
    }
32098
 
32099
    public boolean equals(deleteItemFromMyResearch_args that) {
32100
      if (that == null)
32101
        return false;
32102
 
32103
      boolean this_present_user_id = true;
32104
      boolean that_present_user_id = true;
32105
      if (this_present_user_id || that_present_user_id) {
32106
        if (!(this_present_user_id && that_present_user_id))
32107
          return false;
32108
        if (this.user_id != that.user_id)
32109
          return false;
32110
      }
32111
 
32112
      boolean this_present_item_id = true;
32113
      boolean that_present_item_id = true;
32114
      if (this_present_item_id || that_present_item_id) {
32115
        if (!(this_present_item_id && that_present_item_id))
32116
          return false;
32117
        if (this.item_id != that.item_id)
32118
          return false;
32119
      }
32120
 
32121
      return true;
32122
    }
32123
 
32124
    @Override
32125
    public int hashCode() {
32126
      return 0;
32127
    }
32128
 
32129
    public int compareTo(deleteItemFromMyResearch_args other) {
32130
      if (!getClass().equals(other.getClass())) {
32131
        return getClass().getName().compareTo(other.getClass().getName());
32132
      }
32133
 
32134
      int lastComparison = 0;
32135
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
32136
 
32137
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
32138
      if (lastComparison != 0) {
32139
        return lastComparison;
32140
      }
32141
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
32142
      if (lastComparison != 0) {
32143
        return lastComparison;
32144
      }
32145
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
32146
      if (lastComparison != 0) {
32147
        return lastComparison;
32148
      }
32149
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
32150
      if (lastComparison != 0) {
32151
        return lastComparison;
32152
      }
32153
      return 0;
32154
    }
32155
 
32156
    public void read(TProtocol iprot) throws TException {
32157
      TField field;
32158
      iprot.readStructBegin();
32159
      while (true)
32160
      {
32161
        field = iprot.readFieldBegin();
32162
        if (field.type == TType.STOP) { 
32163
          break;
32164
        }
32165
        _Fields fieldId = _Fields.findByThriftId(field.id);
32166
        if (fieldId == null) {
32167
          TProtocolUtil.skip(iprot, field.type);
32168
        } else {
32169
          switch (fieldId) {
32170
            case USER_ID:
32171
              if (field.type == TType.I64) {
32172
                this.user_id = iprot.readI64();
32173
                setUser_idIsSet(true);
32174
              } else { 
32175
                TProtocolUtil.skip(iprot, field.type);
32176
              }
32177
              break;
32178
            case ITEM_ID:
32179
              if (field.type == TType.I64) {
32180
                this.item_id = iprot.readI64();
32181
                setItem_idIsSet(true);
32182
              } else { 
32183
                TProtocolUtil.skip(iprot, field.type);
32184
              }
32185
              break;
32186
          }
32187
          iprot.readFieldEnd();
32188
        }
32189
      }
32190
      iprot.readStructEnd();
32191
      validate();
32192
    }
32193
 
32194
    public void write(TProtocol oprot) throws TException {
32195
      validate();
32196
 
32197
      oprot.writeStructBegin(STRUCT_DESC);
32198
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
32199
      oprot.writeI64(this.user_id);
32200
      oprot.writeFieldEnd();
32201
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
32202
      oprot.writeI64(this.item_id);
32203
      oprot.writeFieldEnd();
32204
      oprot.writeFieldStop();
32205
      oprot.writeStructEnd();
32206
    }
32207
 
32208
    @Override
32209
    public String toString() {
32210
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
32211
      boolean first = true;
32212
 
32213
      sb.append("user_id:");
32214
      sb.append(this.user_id);
32215
      first = false;
32216
      if (!first) sb.append(", ");
32217
      sb.append("item_id:");
32218
      sb.append(this.item_id);
32219
      first = false;
32220
      sb.append(")");
32221
      return sb.toString();
32222
    }
32223
 
32224
    public void validate() throws TException {
32225
      // check for required fields
32226
    }
32227
 
32228
  }
32229
 
32230
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
32231
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
32232
 
32233
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
32234
 
32235
    private WidgetException scx;
32236
 
32237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32238
    public enum _Fields implements TFieldIdEnum {
32239
      SCX((short)1, "scx");
32240
 
32241
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32242
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32243
 
32244
      static {
32245
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32246
          byId.put((int)field._thriftId, field);
32247
          byName.put(field.getFieldName(), field);
32248
        }
32249
      }
32250
 
32251
      /**
32252
       * Find the _Fields constant that matches fieldId, or null if its not found.
32253
       */
32254
      public static _Fields findByThriftId(int fieldId) {
32255
        return byId.get(fieldId);
32256
      }
32257
 
32258
      /**
32259
       * Find the _Fields constant that matches fieldId, throwing an exception
32260
       * if it is not found.
32261
       */
32262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32263
        _Fields fields = findByThriftId(fieldId);
32264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32265
        return fields;
32266
      }
32267
 
32268
      /**
32269
       * Find the _Fields constant that matches name, or null if its not found.
32270
       */
32271
      public static _Fields findByName(String name) {
32272
        return byName.get(name);
32273
      }
32274
 
32275
      private final short _thriftId;
32276
      private final String _fieldName;
32277
 
32278
      _Fields(short thriftId, String fieldName) {
32279
        _thriftId = thriftId;
32280
        _fieldName = fieldName;
32281
      }
32282
 
32283
      public short getThriftFieldId() {
32284
        return _thriftId;
32285
      }
32286
 
32287
      public String getFieldName() {
32288
        return _fieldName;
32289
      }
32290
    }
32291
 
32292
    // isset id assignments
32293
 
32294
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32295
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
32296
          new FieldValueMetaData(TType.STRUCT)));
32297
    }});
32298
 
32299
    static {
32300
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
32301
    }
32302
 
32303
    public deleteItemFromMyResearch_result() {
32304
    }
32305
 
32306
    public deleteItemFromMyResearch_result(
32307
      WidgetException scx)
32308
    {
32309
      this();
32310
      this.scx = scx;
32311
    }
32312
 
32313
    /**
32314
     * Performs a deep copy on <i>other</i>.
32315
     */
32316
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
32317
      if (other.isSetScx()) {
32318
        this.scx = new WidgetException(other.scx);
32319
      }
32320
    }
32321
 
32322
    public deleteItemFromMyResearch_result deepCopy() {
32323
      return new deleteItemFromMyResearch_result(this);
32324
    }
32325
 
130 ashish 32326
    @Deprecated
553 chandransh 32327
    public deleteItemFromMyResearch_result clone() {
32328
      return new deleteItemFromMyResearch_result(this);
130 ashish 32329
    }
32330
 
553 chandransh 32331
    public WidgetException getScx() {
32332
      return this.scx;
130 ashish 32333
    }
32334
 
553 chandransh 32335
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
32336
      this.scx = scx;
130 ashish 32337
      return this;
32338
    }
32339
 
553 chandransh 32340
    public void unsetScx() {
32341
      this.scx = null;
130 ashish 32342
    }
32343
 
553 chandransh 32344
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32345
    public boolean isSetScx() {
32346
      return this.scx != null;
130 ashish 32347
    }
32348
 
553 chandransh 32349
    public void setScxIsSet(boolean value) {
130 ashish 32350
      if (!value) {
553 chandransh 32351
        this.scx = null;
130 ashish 32352
      }
32353
    }
32354
 
553 chandransh 32355
    public void setFieldValue(_Fields field, Object value) {
32356
      switch (field) {
32357
      case SCX:
32358
        if (value == null) {
32359
          unsetScx();
32360
        } else {
32361
          setScx((WidgetException)value);
32362
        }
32363
        break;
32364
 
32365
      }
130 ashish 32366
    }
32367
 
553 chandransh 32368
    public void setFieldValue(int fieldID, Object value) {
32369
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32370
    }
32371
 
32372
    public Object getFieldValue(_Fields field) {
32373
      switch (field) {
32374
      case SCX:
32375
        return getScx();
32376
 
32377
      }
32378
      throw new IllegalStateException();
32379
    }
32380
 
32381
    public Object getFieldValue(int fieldId) {
32382
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32383
    }
32384
 
32385
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32386
    public boolean isSet(_Fields field) {
32387
      switch (field) {
32388
      case SCX:
32389
        return isSetScx();
32390
      }
32391
      throw new IllegalStateException();
32392
    }
32393
 
32394
    public boolean isSet(int fieldID) {
32395
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32396
    }
32397
 
32398
    @Override
32399
    public boolean equals(Object that) {
32400
      if (that == null)
32401
        return false;
32402
      if (that instanceof deleteItemFromMyResearch_result)
32403
        return this.equals((deleteItemFromMyResearch_result)that);
32404
      return false;
32405
    }
32406
 
32407
    public boolean equals(deleteItemFromMyResearch_result that) {
32408
      if (that == null)
32409
        return false;
32410
 
32411
      boolean this_present_scx = true && this.isSetScx();
32412
      boolean that_present_scx = true && that.isSetScx();
32413
      if (this_present_scx || that_present_scx) {
32414
        if (!(this_present_scx && that_present_scx))
32415
          return false;
32416
        if (!this.scx.equals(that.scx))
32417
          return false;
32418
      }
32419
 
32420
      return true;
32421
    }
32422
 
32423
    @Override
32424
    public int hashCode() {
32425
      return 0;
32426
    }
32427
 
32428
    public int compareTo(deleteItemFromMyResearch_result other) {
32429
      if (!getClass().equals(other.getClass())) {
32430
        return getClass().getName().compareTo(other.getClass().getName());
32431
      }
32432
 
32433
      int lastComparison = 0;
32434
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
32435
 
32436
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
32437
      if (lastComparison != 0) {
32438
        return lastComparison;
32439
      }
32440
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
32441
      if (lastComparison != 0) {
32442
        return lastComparison;
32443
      }
32444
      return 0;
32445
    }
32446
 
32447
    public void read(TProtocol iprot) throws TException {
32448
      TField field;
32449
      iprot.readStructBegin();
32450
      while (true)
32451
      {
32452
        field = iprot.readFieldBegin();
32453
        if (field.type == TType.STOP) { 
32454
          break;
32455
        }
32456
        _Fields fieldId = _Fields.findByThriftId(field.id);
32457
        if (fieldId == null) {
32458
          TProtocolUtil.skip(iprot, field.type);
32459
        } else {
32460
          switch (fieldId) {
32461
            case SCX:
32462
              if (field.type == TType.STRUCT) {
32463
                this.scx = new WidgetException();
32464
                this.scx.read(iprot);
32465
              } else { 
32466
                TProtocolUtil.skip(iprot, field.type);
32467
              }
32468
              break;
32469
          }
32470
          iprot.readFieldEnd();
32471
        }
32472
      }
32473
      iprot.readStructEnd();
32474
      validate();
32475
    }
32476
 
32477
    public void write(TProtocol oprot) throws TException {
32478
      oprot.writeStructBegin(STRUCT_DESC);
32479
 
32480
      if (this.isSetScx()) {
32481
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32482
        this.scx.write(oprot);
32483
        oprot.writeFieldEnd();
32484
      }
32485
      oprot.writeFieldStop();
32486
      oprot.writeStructEnd();
32487
    }
32488
 
32489
    @Override
32490
    public String toString() {
32491
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
32492
      boolean first = true;
32493
 
32494
      sb.append("scx:");
32495
      if (this.scx == null) {
32496
        sb.append("null");
32497
      } else {
32498
        sb.append(this.scx);
32499
      }
32500
      first = false;
32501
      sb.append(")");
32502
      return sb.toString();
32503
    }
32504
 
32505
    public void validate() throws TException {
32506
      // check for required fields
32507
    }
32508
 
32509
  }
32510
 
32511
  public static class updateRatings_args implements TBase<updateRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_args>   {
32512
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_args");
32513
 
32514
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
32515
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)2);
32516
    private static final TField RATING_FIELD_DESC = new TField("rating", TType.DOUBLE, (short)3);
32517
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)4);
32518
 
32519
    private long item_id;
32520
    private RatingType type;
32521
    private double rating;
32522
    private long user_id;
32523
 
32524
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32525
    public enum _Fields implements TFieldIdEnum {
32526
      ITEM_ID((short)1, "item_id"),
32527
      /**
32528
       * 
32529
       * @see RatingType
32530
       */
32531
      TYPE((short)2, "type"),
32532
      RATING((short)3, "rating"),
32533
      USER_ID((short)4, "user_id");
32534
 
32535
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32536
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32537
 
32538
      static {
32539
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32540
          byId.put((int)field._thriftId, field);
32541
          byName.put(field.getFieldName(), field);
32542
        }
32543
      }
32544
 
32545
      /**
32546
       * Find the _Fields constant that matches fieldId, or null if its not found.
32547
       */
32548
      public static _Fields findByThriftId(int fieldId) {
32549
        return byId.get(fieldId);
32550
      }
32551
 
32552
      /**
32553
       * Find the _Fields constant that matches fieldId, throwing an exception
32554
       * if it is not found.
32555
       */
32556
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32557
        _Fields fields = findByThriftId(fieldId);
32558
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32559
        return fields;
32560
      }
32561
 
32562
      /**
32563
       * Find the _Fields constant that matches name, or null if its not found.
32564
       */
32565
      public static _Fields findByName(String name) {
32566
        return byName.get(name);
32567
      }
32568
 
32569
      private final short _thriftId;
32570
      private final String _fieldName;
32571
 
32572
      _Fields(short thriftId, String fieldName) {
32573
        _thriftId = thriftId;
32574
        _fieldName = fieldName;
32575
      }
32576
 
32577
      public short getThriftFieldId() {
32578
        return _thriftId;
32579
      }
32580
 
32581
      public String getFieldName() {
32582
        return _fieldName;
32583
      }
32584
    }
32585
 
32586
    // isset id assignments
32587
    private static final int __ITEM_ID_ISSET_ID = 0;
32588
    private static final int __RATING_ISSET_ID = 1;
32589
    private static final int __USER_ID_ISSET_ID = 2;
32590
    private BitSet __isset_bit_vector = new BitSet(3);
32591
 
32592
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32593
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
32594
          new FieldValueMetaData(TType.I64)));
32595
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
32596
          new EnumMetaData(TType.ENUM, RatingType.class)));
32597
      put(_Fields.RATING, new FieldMetaData("rating", TFieldRequirementType.DEFAULT, 
32598
          new FieldValueMetaData(TType.DOUBLE)));
32599
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
32600
          new FieldValueMetaData(TType.I64)));
32601
    }});
32602
 
32603
    static {
32604
      FieldMetaData.addStructMetaDataMap(updateRatings_args.class, metaDataMap);
32605
    }
32606
 
32607
    public updateRatings_args() {
32608
    }
32609
 
32610
    public updateRatings_args(
32611
      long item_id,
32612
      RatingType type,
32613
      double rating,
32614
      long user_id)
32615
    {
32616
      this();
32617
      this.item_id = item_id;
32618
      setItem_idIsSet(true);
32619
      this.type = type;
32620
      this.rating = rating;
32621
      setRatingIsSet(true);
32622
      this.user_id = user_id;
32623
      setUser_idIsSet(true);
32624
    }
32625
 
32626
    /**
32627
     * Performs a deep copy on <i>other</i>.
32628
     */
32629
    public updateRatings_args(updateRatings_args other) {
32630
      __isset_bit_vector.clear();
32631
      __isset_bit_vector.or(other.__isset_bit_vector);
32632
      this.item_id = other.item_id;
32633
      if (other.isSetType()) {
32634
        this.type = other.type;
32635
      }
32636
      this.rating = other.rating;
32637
      this.user_id = other.user_id;
32638
    }
32639
 
32640
    public updateRatings_args deepCopy() {
32641
      return new updateRatings_args(this);
32642
    }
32643
 
32644
    @Deprecated
32645
    public updateRatings_args clone() {
32646
      return new updateRatings_args(this);
32647
    }
32648
 
32649
    public long getItem_id() {
32650
      return this.item_id;
32651
    }
32652
 
32653
    public updateRatings_args setItem_id(long item_id) {
32654
      this.item_id = item_id;
32655
      setItem_idIsSet(true);
130 ashish 32656
      return this;
32657
    }
32658
 
553 chandransh 32659
    public void unsetItem_id() {
32660
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
130 ashish 32661
    }
32662
 
553 chandransh 32663
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
32664
    public boolean isSetItem_id() {
32665
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
130 ashish 32666
    }
32667
 
553 chandransh 32668
    public void setItem_idIsSet(boolean value) {
32669
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
130 ashish 32670
    }
32671
 
553 chandransh 32672
    /**
32673
     * 
32674
     * @see RatingType
32675
     */
32676
    public RatingType getType() {
32677
      return this.type;
32678
    }
32679
 
32680
    /**
32681
     * 
32682
     * @see RatingType
32683
     */
32684
    public updateRatings_args setType(RatingType type) {
32685
      this.type = type;
32686
      return this;
32687
    }
32688
 
32689
    public void unsetType() {
32690
      this.type = null;
32691
    }
32692
 
32693
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
32694
    public boolean isSetType() {
32695
      return this.type != null;
32696
    }
32697
 
32698
    public void setTypeIsSet(boolean value) {
32699
      if (!value) {
32700
        this.type = null;
32701
      }
32702
    }
32703
 
32704
    public double getRating() {
32705
      return this.rating;
32706
    }
32707
 
32708
    public updateRatings_args setRating(double rating) {
32709
      this.rating = rating;
32710
      setRatingIsSet(true);
32711
      return this;
32712
    }
32713
 
32714
    public void unsetRating() {
32715
      __isset_bit_vector.clear(__RATING_ISSET_ID);
32716
    }
32717
 
32718
    /** Returns true if field rating is set (has been asigned a value) and false otherwise */
32719
    public boolean isSetRating() {
32720
      return __isset_bit_vector.get(__RATING_ISSET_ID);
32721
    }
32722
 
32723
    public void setRatingIsSet(boolean value) {
32724
      __isset_bit_vector.set(__RATING_ISSET_ID, value);
32725
    }
32726
 
32727
    public long getUser_id() {
32728
      return this.user_id;
32729
    }
32730
 
32731
    public updateRatings_args setUser_id(long user_id) {
32732
      this.user_id = user_id;
32733
      setUser_idIsSet(true);
32734
      return this;
32735
    }
32736
 
32737
    public void unsetUser_id() {
32738
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
32739
    }
32740
 
32741
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
32742
    public boolean isSetUser_id() {
32743
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
32744
    }
32745
 
32746
    public void setUser_idIsSet(boolean value) {
32747
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
32748
    }
32749
 
130 ashish 32750
    public void setFieldValue(_Fields field, Object value) {
32751
      switch (field) {
553 chandransh 32752
      case ITEM_ID:
130 ashish 32753
        if (value == null) {
553 chandransh 32754
          unsetItem_id();
130 ashish 32755
        } else {
553 chandransh 32756
          setItem_id((Long)value);
130 ashish 32757
        }
32758
        break;
32759
 
553 chandransh 32760
      case TYPE:
130 ashish 32761
        if (value == null) {
553 chandransh 32762
          unsetType();
130 ashish 32763
        } else {
553 chandransh 32764
          setType((RatingType)value);
130 ashish 32765
        }
32766
        break;
32767
 
553 chandransh 32768
      case RATING:
32769
        if (value == null) {
32770
          unsetRating();
32771
        } else {
32772
          setRating((Double)value);
32773
        }
32774
        break;
32775
 
32776
      case USER_ID:
32777
        if (value == null) {
32778
          unsetUser_id();
32779
        } else {
32780
          setUser_id((Long)value);
32781
        }
32782
        break;
32783
 
130 ashish 32784
      }
32785
    }
32786
 
32787
    public void setFieldValue(int fieldID, Object value) {
32788
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32789
    }
32790
 
32791
    public Object getFieldValue(_Fields field) {
32792
      switch (field) {
553 chandransh 32793
      case ITEM_ID:
32794
        return new Long(getItem_id());
130 ashish 32795
 
553 chandransh 32796
      case TYPE:
32797
        return getType();
130 ashish 32798
 
553 chandransh 32799
      case RATING:
32800
        return new Double(getRating());
32801
 
32802
      case USER_ID:
32803
        return new Long(getUser_id());
32804
 
130 ashish 32805
      }
32806
      throw new IllegalStateException();
32807
    }
32808
 
32809
    public Object getFieldValue(int fieldId) {
32810
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32811
    }
32812
 
32813
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32814
    public boolean isSet(_Fields field) {
32815
      switch (field) {
553 chandransh 32816
      case ITEM_ID:
32817
        return isSetItem_id();
32818
      case TYPE:
32819
        return isSetType();
32820
      case RATING:
32821
        return isSetRating();
32822
      case USER_ID:
32823
        return isSetUser_id();
130 ashish 32824
      }
32825
      throw new IllegalStateException();
32826
    }
32827
 
32828
    public boolean isSet(int fieldID) {
32829
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32830
    }
32831
 
32832
    @Override
32833
    public boolean equals(Object that) {
32834
      if (that == null)
32835
        return false;
553 chandransh 32836
      if (that instanceof updateRatings_args)
32837
        return this.equals((updateRatings_args)that);
130 ashish 32838
      return false;
32839
    }
32840
 
553 chandransh 32841
    public boolean equals(updateRatings_args that) {
130 ashish 32842
      if (that == null)
32843
        return false;
32844
 
553 chandransh 32845
      boolean this_present_item_id = true;
32846
      boolean that_present_item_id = true;
32847
      if (this_present_item_id || that_present_item_id) {
32848
        if (!(this_present_item_id && that_present_item_id))
130 ashish 32849
          return false;
553 chandransh 32850
        if (this.item_id != that.item_id)
130 ashish 32851
          return false;
32852
      }
32853
 
553 chandransh 32854
      boolean this_present_type = true && this.isSetType();
32855
      boolean that_present_type = true && that.isSetType();
32856
      if (this_present_type || that_present_type) {
32857
        if (!(this_present_type && that_present_type))
130 ashish 32858
          return false;
553 chandransh 32859
        if (!this.type.equals(that.type))
130 ashish 32860
          return false;
32861
      }
32862
 
553 chandransh 32863
      boolean this_present_rating = true;
32864
      boolean that_present_rating = true;
32865
      if (this_present_rating || that_present_rating) {
32866
        if (!(this_present_rating && that_present_rating))
32867
          return false;
32868
        if (this.rating != that.rating)
32869
          return false;
32870
      }
32871
 
32872
      boolean this_present_user_id = true;
32873
      boolean that_present_user_id = true;
32874
      if (this_present_user_id || that_present_user_id) {
32875
        if (!(this_present_user_id && that_present_user_id))
32876
          return false;
32877
        if (this.user_id != that.user_id)
32878
          return false;
32879
      }
32880
 
130 ashish 32881
      return true;
32882
    }
32883
 
32884
    @Override
32885
    public int hashCode() {
32886
      return 0;
32887
    }
32888
 
553 chandransh 32889
    public int compareTo(updateRatings_args other) {
130 ashish 32890
      if (!getClass().equals(other.getClass())) {
32891
        return getClass().getName().compareTo(other.getClass().getName());
32892
      }
32893
 
32894
      int lastComparison = 0;
553 chandransh 32895
      updateRatings_args typedOther = (updateRatings_args)other;
130 ashish 32896
 
553 chandransh 32897
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
130 ashish 32898
      if (lastComparison != 0) {
32899
        return lastComparison;
32900
      }
553 chandransh 32901
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
130 ashish 32902
      if (lastComparison != 0) {
32903
        return lastComparison;
32904
      }
553 chandransh 32905
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
130 ashish 32906
      if (lastComparison != 0) {
32907
        return lastComparison;
32908
      }
553 chandransh 32909
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
130 ashish 32910
      if (lastComparison != 0) {
32911
        return lastComparison;
32912
      }
553 chandransh 32913
      lastComparison = Boolean.valueOf(isSetRating()).compareTo(isSetRating());
32914
      if (lastComparison != 0) {
32915
        return lastComparison;
32916
      }
32917
      lastComparison = TBaseHelper.compareTo(rating, typedOther.rating);
32918
      if (lastComparison != 0) {
32919
        return lastComparison;
32920
      }
32921
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
32922
      if (lastComparison != 0) {
32923
        return lastComparison;
32924
      }
32925
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
32926
      if (lastComparison != 0) {
32927
        return lastComparison;
32928
      }
130 ashish 32929
      return 0;
32930
    }
32931
 
32932
    public void read(TProtocol iprot) throws TException {
32933
      TField field;
32934
      iprot.readStructBegin();
32935
      while (true)
32936
      {
32937
        field = iprot.readFieldBegin();
32938
        if (field.type == TType.STOP) { 
32939
          break;
32940
        }
32941
        _Fields fieldId = _Fields.findByThriftId(field.id);
32942
        if (fieldId == null) {
32943
          TProtocolUtil.skip(iprot, field.type);
32944
        } else {
32945
          switch (fieldId) {
553 chandransh 32946
            case ITEM_ID:
32947
              if (field.type == TType.I64) {
32948
                this.item_id = iprot.readI64();
32949
                setItem_idIsSet(true);
130 ashish 32950
              } else { 
32951
                TProtocolUtil.skip(iprot, field.type);
32952
              }
32953
              break;
553 chandransh 32954
            case TYPE:
32955
              if (field.type == TType.I32) {
32956
                this.type = RatingType.findByValue(iprot.readI32());
130 ashish 32957
              } else { 
32958
                TProtocolUtil.skip(iprot, field.type);
32959
              }
32960
              break;
553 chandransh 32961
            case RATING:
32962
              if (field.type == TType.DOUBLE) {
32963
                this.rating = iprot.readDouble();
32964
                setRatingIsSet(true);
32965
              } else { 
32966
                TProtocolUtil.skip(iprot, field.type);
32967
              }
32968
              break;
32969
            case USER_ID:
32970
              if (field.type == TType.I64) {
32971
                this.user_id = iprot.readI64();
32972
                setUser_idIsSet(true);
32973
              } else { 
32974
                TProtocolUtil.skip(iprot, field.type);
32975
              }
32976
              break;
130 ashish 32977
          }
32978
          iprot.readFieldEnd();
32979
        }
32980
      }
32981
      iprot.readStructEnd();
32982
      validate();
32983
    }
32984
 
32985
    public void write(TProtocol oprot) throws TException {
32986
      validate();
32987
 
32988
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 32989
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
32990
      oprot.writeI64(this.item_id);
32991
      oprot.writeFieldEnd();
32992
      if (this.type != null) {
32993
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
32994
        oprot.writeI32(this.type.getValue());
130 ashish 32995
        oprot.writeFieldEnd();
32996
      }
553 chandransh 32997
      oprot.writeFieldBegin(RATING_FIELD_DESC);
32998
      oprot.writeDouble(this.rating);
130 ashish 32999
      oprot.writeFieldEnd();
553 chandransh 33000
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
33001
      oprot.writeI64(this.user_id);
33002
      oprot.writeFieldEnd();
130 ashish 33003
      oprot.writeFieldStop();
33004
      oprot.writeStructEnd();
33005
    }
33006
 
33007
    @Override
33008
    public String toString() {
553 chandransh 33009
      StringBuilder sb = new StringBuilder("updateRatings_args(");
130 ashish 33010
      boolean first = true;
33011
 
553 chandransh 33012
      sb.append("item_id:");
33013
      sb.append(this.item_id);
33014
      first = false;
33015
      if (!first) sb.append(", ");
33016
      sb.append("type:");
33017
      if (this.type == null) {
130 ashish 33018
        sb.append("null");
33019
      } else {
553 chandransh 33020
        String type_name = type.name();
33021
        if (type_name != null) {
33022
          sb.append(type_name);
33023
          sb.append(" (");
33024
        }
33025
        sb.append(this.type);
33026
        if (type_name != null) {
33027
          sb.append(")");
33028
        }
130 ashish 33029
      }
33030
      first = false;
33031
      if (!first) sb.append(", ");
553 chandransh 33032
      sb.append("rating:");
33033
      sb.append(this.rating);
130 ashish 33034
      first = false;
553 chandransh 33035
      if (!first) sb.append(", ");
33036
      sb.append("user_id:");
33037
      sb.append(this.user_id);
33038
      first = false;
130 ashish 33039
      sb.append(")");
33040
      return sb.toString();
33041
    }
33042
 
33043
    public void validate() throws TException {
33044
      // check for required fields
33045
    }
33046
 
33047
  }
33048
 
553 chandransh 33049
  public static class updateRatings_result implements TBase<updateRatings_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateRatings_result>   {
33050
    private static final TStruct STRUCT_DESC = new TStruct("updateRatings_result");
130 ashish 33051
 
33052
 
33053
 
33054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33055
    public enum _Fields implements TFieldIdEnum {
553 chandransh 33056
;
33057
 
33058
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33059
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33060
 
33061
      static {
33062
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33063
          byId.put((int)field._thriftId, field);
33064
          byName.put(field.getFieldName(), field);
33065
        }
33066
      }
33067
 
33068
      /**
33069
       * Find the _Fields constant that matches fieldId, or null if its not found.
33070
       */
33071
      public static _Fields findByThriftId(int fieldId) {
33072
        return byId.get(fieldId);
33073
      }
33074
 
33075
      /**
33076
       * Find the _Fields constant that matches fieldId, throwing an exception
33077
       * if it is not found.
33078
       */
33079
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33080
        _Fields fields = findByThriftId(fieldId);
33081
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33082
        return fields;
33083
      }
33084
 
33085
      /**
33086
       * Find the _Fields constant that matches name, or null if its not found.
33087
       */
33088
      public static _Fields findByName(String name) {
33089
        return byName.get(name);
33090
      }
33091
 
33092
      private final short _thriftId;
33093
      private final String _fieldName;
33094
 
33095
      _Fields(short thriftId, String fieldName) {
33096
        _thriftId = thriftId;
33097
        _fieldName = fieldName;
33098
      }
33099
 
33100
      public short getThriftFieldId() {
33101
        return _thriftId;
33102
      }
33103
 
33104
      public String getFieldName() {
33105
        return _fieldName;
33106
      }
33107
    }
33108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33109
    }});
33110
 
33111
    static {
33112
      FieldMetaData.addStructMetaDataMap(updateRatings_result.class, metaDataMap);
33113
    }
33114
 
33115
    public updateRatings_result() {
33116
    }
33117
 
33118
    /**
33119
     * Performs a deep copy on <i>other</i>.
33120
     */
33121
    public updateRatings_result(updateRatings_result other) {
33122
    }
33123
 
33124
    public updateRatings_result deepCopy() {
33125
      return new updateRatings_result(this);
33126
    }
33127
 
33128
    @Deprecated
33129
    public updateRatings_result clone() {
33130
      return new updateRatings_result(this);
33131
    }
33132
 
33133
    public void setFieldValue(_Fields field, Object value) {
33134
      switch (field) {
33135
      }
33136
    }
33137
 
33138
    public void setFieldValue(int fieldID, Object value) {
33139
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33140
    }
33141
 
33142
    public Object getFieldValue(_Fields field) {
33143
      switch (field) {
33144
      }
33145
      throw new IllegalStateException();
33146
    }
33147
 
33148
    public Object getFieldValue(int fieldId) {
33149
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33150
    }
33151
 
33152
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33153
    public boolean isSet(_Fields field) {
33154
      switch (field) {
33155
      }
33156
      throw new IllegalStateException();
33157
    }
33158
 
33159
    public boolean isSet(int fieldID) {
33160
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33161
    }
33162
 
33163
    @Override
33164
    public boolean equals(Object that) {
33165
      if (that == null)
33166
        return false;
33167
      if (that instanceof updateRatings_result)
33168
        return this.equals((updateRatings_result)that);
33169
      return false;
33170
    }
33171
 
33172
    public boolean equals(updateRatings_result that) {
33173
      if (that == null)
33174
        return false;
33175
 
33176
      return true;
33177
    }
33178
 
33179
    @Override
33180
    public int hashCode() {
33181
      return 0;
33182
    }
33183
 
33184
    public int compareTo(updateRatings_result other) {
33185
      if (!getClass().equals(other.getClass())) {
33186
        return getClass().getName().compareTo(other.getClass().getName());
33187
      }
33188
 
33189
      int lastComparison = 0;
33190
      updateRatings_result typedOther = (updateRatings_result)other;
33191
 
33192
      return 0;
33193
    }
33194
 
33195
    public void read(TProtocol iprot) throws TException {
33196
      TField field;
33197
      iprot.readStructBegin();
33198
      while (true)
33199
      {
33200
        field = iprot.readFieldBegin();
33201
        if (field.type == TType.STOP) { 
33202
          break;
33203
        }
33204
        _Fields fieldId = _Fields.findByThriftId(field.id);
33205
        if (fieldId == null) {
33206
          TProtocolUtil.skip(iprot, field.type);
33207
        } else {
33208
          switch (fieldId) {
33209
          }
33210
          iprot.readFieldEnd();
33211
        }
33212
      }
33213
      iprot.readStructEnd();
33214
      validate();
33215
    }
33216
 
33217
    public void write(TProtocol oprot) throws TException {
33218
      oprot.writeStructBegin(STRUCT_DESC);
33219
 
33220
      oprot.writeFieldStop();
33221
      oprot.writeStructEnd();
33222
    }
33223
 
33224
    @Override
33225
    public String toString() {
33226
      StringBuilder sb = new StringBuilder("updateRatings_result(");
33227
      boolean first = true;
33228
 
33229
      sb.append(")");
33230
      return sb.toString();
33231
    }
33232
 
33233
    public void validate() throws TException {
33234
      // check for required fields
33235
    }
33236
 
33237
  }
33238
 
33239
  public static class getRatings_args implements TBase<getRatings_args._Fields>, java.io.Serializable, Cloneable, Comparable<getRatings_args>   {
33240
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_args");
33241
 
33242
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)1);
33243
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)2);
33244
 
33245
    private long item_id;
33246
    private long user_id;
33247
 
33248
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33249
    public enum _Fields implements TFieldIdEnum {
33250
      ITEM_ID((short)1, "item_id"),
33251
      USER_ID((short)2, "user_id");
33252
 
33253
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33254
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33255
 
33256
      static {
33257
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33258
          byId.put((int)field._thriftId, field);
33259
          byName.put(field.getFieldName(), field);
33260
        }
33261
      }
33262
 
33263
      /**
33264
       * Find the _Fields constant that matches fieldId, or null if its not found.
33265
       */
33266
      public static _Fields findByThriftId(int fieldId) {
33267
        return byId.get(fieldId);
33268
      }
33269
 
33270
      /**
33271
       * Find the _Fields constant that matches fieldId, throwing an exception
33272
       * if it is not found.
33273
       */
33274
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33275
        _Fields fields = findByThriftId(fieldId);
33276
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33277
        return fields;
33278
      }
33279
 
33280
      /**
33281
       * Find the _Fields constant that matches name, or null if its not found.
33282
       */
33283
      public static _Fields findByName(String name) {
33284
        return byName.get(name);
33285
      }
33286
 
33287
      private final short _thriftId;
33288
      private final String _fieldName;
33289
 
33290
      _Fields(short thriftId, String fieldName) {
33291
        _thriftId = thriftId;
33292
        _fieldName = fieldName;
33293
      }
33294
 
33295
      public short getThriftFieldId() {
33296
        return _thriftId;
33297
      }
33298
 
33299
      public String getFieldName() {
33300
        return _fieldName;
33301
      }
33302
    }
33303
 
33304
    // isset id assignments
33305
    private static final int __ITEM_ID_ISSET_ID = 0;
33306
    private static final int __USER_ID_ISSET_ID = 1;
33307
    private BitSet __isset_bit_vector = new BitSet(2);
33308
 
33309
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33310
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
33311
          new FieldValueMetaData(TType.I64)));
33312
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
33313
          new FieldValueMetaData(TType.I64)));
33314
    }});
33315
 
33316
    static {
33317
      FieldMetaData.addStructMetaDataMap(getRatings_args.class, metaDataMap);
33318
    }
33319
 
33320
    public getRatings_args() {
33321
    }
33322
 
33323
    public getRatings_args(
33324
      long item_id,
33325
      long user_id)
33326
    {
33327
      this();
33328
      this.item_id = item_id;
33329
      setItem_idIsSet(true);
33330
      this.user_id = user_id;
33331
      setUser_idIsSet(true);
33332
    }
33333
 
33334
    /**
33335
     * Performs a deep copy on <i>other</i>.
33336
     */
33337
    public getRatings_args(getRatings_args other) {
33338
      __isset_bit_vector.clear();
33339
      __isset_bit_vector.or(other.__isset_bit_vector);
33340
      this.item_id = other.item_id;
33341
      this.user_id = other.user_id;
33342
    }
33343
 
33344
    public getRatings_args deepCopy() {
33345
      return new getRatings_args(this);
33346
    }
33347
 
33348
    @Deprecated
33349
    public getRatings_args clone() {
33350
      return new getRatings_args(this);
33351
    }
33352
 
33353
    public long getItem_id() {
33354
      return this.item_id;
33355
    }
33356
 
33357
    public getRatings_args setItem_id(long item_id) {
33358
      this.item_id = item_id;
33359
      setItem_idIsSet(true);
33360
      return this;
33361
    }
33362
 
33363
    public void unsetItem_id() {
33364
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
33365
    }
33366
 
33367
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
33368
    public boolean isSetItem_id() {
33369
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
33370
    }
33371
 
33372
    public void setItem_idIsSet(boolean value) {
33373
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
33374
    }
33375
 
33376
    public long getUser_id() {
33377
      return this.user_id;
33378
    }
33379
 
33380
    public getRatings_args setUser_id(long user_id) {
33381
      this.user_id = user_id;
33382
      setUser_idIsSet(true);
33383
      return this;
33384
    }
33385
 
33386
    public void unsetUser_id() {
33387
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
33388
    }
33389
 
33390
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
33391
    public boolean isSetUser_id() {
33392
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
33393
    }
33394
 
33395
    public void setUser_idIsSet(boolean value) {
33396
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
33397
    }
33398
 
33399
    public void setFieldValue(_Fields field, Object value) {
33400
      switch (field) {
33401
      case ITEM_ID:
33402
        if (value == null) {
33403
          unsetItem_id();
33404
        } else {
33405
          setItem_id((Long)value);
33406
        }
33407
        break;
33408
 
33409
      case USER_ID:
33410
        if (value == null) {
33411
          unsetUser_id();
33412
        } else {
33413
          setUser_id((Long)value);
33414
        }
33415
        break;
33416
 
33417
      }
33418
    }
33419
 
33420
    public void setFieldValue(int fieldID, Object value) {
33421
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33422
    }
33423
 
33424
    public Object getFieldValue(_Fields field) {
33425
      switch (field) {
33426
      case ITEM_ID:
33427
        return new Long(getItem_id());
33428
 
33429
      case USER_ID:
33430
        return new Long(getUser_id());
33431
 
33432
      }
33433
      throw new IllegalStateException();
33434
    }
33435
 
33436
    public Object getFieldValue(int fieldId) {
33437
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33438
    }
33439
 
33440
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33441
    public boolean isSet(_Fields field) {
33442
      switch (field) {
33443
      case ITEM_ID:
33444
        return isSetItem_id();
33445
      case USER_ID:
33446
        return isSetUser_id();
33447
      }
33448
      throw new IllegalStateException();
33449
    }
33450
 
33451
    public boolean isSet(int fieldID) {
33452
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33453
    }
33454
 
33455
    @Override
33456
    public boolean equals(Object that) {
33457
      if (that == null)
33458
        return false;
33459
      if (that instanceof getRatings_args)
33460
        return this.equals((getRatings_args)that);
33461
      return false;
33462
    }
33463
 
33464
    public boolean equals(getRatings_args that) {
33465
      if (that == null)
33466
        return false;
33467
 
33468
      boolean this_present_item_id = true;
33469
      boolean that_present_item_id = true;
33470
      if (this_present_item_id || that_present_item_id) {
33471
        if (!(this_present_item_id && that_present_item_id))
33472
          return false;
33473
        if (this.item_id != that.item_id)
33474
          return false;
33475
      }
33476
 
33477
      boolean this_present_user_id = true;
33478
      boolean that_present_user_id = true;
33479
      if (this_present_user_id || that_present_user_id) {
33480
        if (!(this_present_user_id && that_present_user_id))
33481
          return false;
33482
        if (this.user_id != that.user_id)
33483
          return false;
33484
      }
33485
 
33486
      return true;
33487
    }
33488
 
33489
    @Override
33490
    public int hashCode() {
33491
      return 0;
33492
    }
33493
 
33494
    public int compareTo(getRatings_args other) {
33495
      if (!getClass().equals(other.getClass())) {
33496
        return getClass().getName().compareTo(other.getClass().getName());
33497
      }
33498
 
33499
      int lastComparison = 0;
33500
      getRatings_args typedOther = (getRatings_args)other;
33501
 
33502
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
33503
      if (lastComparison != 0) {
33504
        return lastComparison;
33505
      }
33506
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
33507
      if (lastComparison != 0) {
33508
        return lastComparison;
33509
      }
33510
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
33511
      if (lastComparison != 0) {
33512
        return lastComparison;
33513
      }
33514
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
33515
      if (lastComparison != 0) {
33516
        return lastComparison;
33517
      }
33518
      return 0;
33519
    }
33520
 
33521
    public void read(TProtocol iprot) throws TException {
33522
      TField field;
33523
      iprot.readStructBegin();
33524
      while (true)
33525
      {
33526
        field = iprot.readFieldBegin();
33527
        if (field.type == TType.STOP) { 
33528
          break;
33529
        }
33530
        _Fields fieldId = _Fields.findByThriftId(field.id);
33531
        if (fieldId == null) {
33532
          TProtocolUtil.skip(iprot, field.type);
33533
        } else {
33534
          switch (fieldId) {
33535
            case ITEM_ID:
33536
              if (field.type == TType.I64) {
33537
                this.item_id = iprot.readI64();
33538
                setItem_idIsSet(true);
33539
              } else { 
33540
                TProtocolUtil.skip(iprot, field.type);
33541
              }
33542
              break;
33543
            case USER_ID:
33544
              if (field.type == TType.I64) {
33545
                this.user_id = iprot.readI64();
33546
                setUser_idIsSet(true);
33547
              } else { 
33548
                TProtocolUtil.skip(iprot, field.type);
33549
              }
33550
              break;
33551
          }
33552
          iprot.readFieldEnd();
33553
        }
33554
      }
33555
      iprot.readStructEnd();
33556
      validate();
33557
    }
33558
 
33559
    public void write(TProtocol oprot) throws TException {
33560
      validate();
33561
 
33562
      oprot.writeStructBegin(STRUCT_DESC);
33563
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
33564
      oprot.writeI64(this.item_id);
33565
      oprot.writeFieldEnd();
33566
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
33567
      oprot.writeI64(this.user_id);
33568
      oprot.writeFieldEnd();
33569
      oprot.writeFieldStop();
33570
      oprot.writeStructEnd();
33571
    }
33572
 
33573
    @Override
33574
    public String toString() {
33575
      StringBuilder sb = new StringBuilder("getRatings_args(");
33576
      boolean first = true;
33577
 
33578
      sb.append("item_id:");
33579
      sb.append(this.item_id);
33580
      first = false;
33581
      if (!first) sb.append(", ");
33582
      sb.append("user_id:");
33583
      sb.append(this.user_id);
33584
      first = false;
33585
      sb.append(")");
33586
      return sb.toString();
33587
    }
33588
 
33589
    public void validate() throws TException {
33590
      // check for required fields
33591
    }
33592
 
33593
  }
33594
 
33595
  public static class getRatings_result implements TBase<getRatings_result._Fields>, java.io.Serializable, Cloneable   {
33596
    private static final TStruct STRUCT_DESC = new TStruct("getRatings_result");
33597
 
33598
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
33599
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
33600
 
33601
    private RatingsWidget success;
33602
    private WidgetException scx;
33603
 
33604
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33605
    public enum _Fields implements TFieldIdEnum {
130 ashish 33606
      SUCCESS((short)0, "success"),
553 chandransh 33607
      SCX((short)1, "scx");
130 ashish 33608
 
33609
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33610
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33611
 
33612
      static {
33613
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33614
          byId.put((int)field._thriftId, field);
33615
          byName.put(field.getFieldName(), field);
33616
        }
33617
      }
33618
 
33619
      /**
33620
       * Find the _Fields constant that matches fieldId, or null if its not found.
33621
       */
33622
      public static _Fields findByThriftId(int fieldId) {
33623
        return byId.get(fieldId);
33624
      }
33625
 
33626
      /**
33627
       * Find the _Fields constant that matches fieldId, throwing an exception
33628
       * if it is not found.
33629
       */
33630
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33631
        _Fields fields = findByThriftId(fieldId);
33632
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33633
        return fields;
33634
      }
33635
 
33636
      /**
33637
       * Find the _Fields constant that matches name, or null if its not found.
33638
       */
33639
      public static _Fields findByName(String name) {
33640
        return byName.get(name);
33641
      }
33642
 
33643
      private final short _thriftId;
33644
      private final String _fieldName;
33645
 
33646
      _Fields(short thriftId, String fieldName) {
33647
        _thriftId = thriftId;
33648
        _fieldName = fieldName;
33649
      }
33650
 
33651
      public short getThriftFieldId() {
33652
        return _thriftId;
33653
      }
33654
 
33655
      public String getFieldName() {
33656
        return _fieldName;
33657
      }
33658
    }
33659
 
33660
    // isset id assignments
33661
 
33662
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33663
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 33664
          new StructMetaData(TType.STRUCT, RatingsWidget.class)));
33665
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 33666
          new FieldValueMetaData(TType.STRUCT)));
33667
    }});
33668
 
33669
    static {
553 chandransh 33670
      FieldMetaData.addStructMetaDataMap(getRatings_result.class, metaDataMap);
130 ashish 33671
    }
33672
 
553 chandransh 33673
    public getRatings_result() {
130 ashish 33674
    }
33675
 
553 chandransh 33676
    public getRatings_result(
33677
      RatingsWidget success,
33678
      WidgetException scx)
130 ashish 33679
    {
33680
      this();
33681
      this.success = success;
553 chandransh 33682
      this.scx = scx;
130 ashish 33683
    }
33684
 
33685
    /**
33686
     * Performs a deep copy on <i>other</i>.
33687
     */
553 chandransh 33688
    public getRatings_result(getRatings_result other) {
33689
      if (other.isSetSuccess()) {
33690
        this.success = new RatingsWidget(other.success);
33691
      }
33692
      if (other.isSetScx()) {
33693
        this.scx = new WidgetException(other.scx);
33694
      }
33695
    }
33696
 
33697
    public getRatings_result deepCopy() {
33698
      return new getRatings_result(this);
33699
    }
33700
 
33701
    @Deprecated
33702
    public getRatings_result clone() {
33703
      return new getRatings_result(this);
33704
    }
33705
 
33706
    public RatingsWidget getSuccess() {
33707
      return this.success;
33708
    }
33709
 
33710
    public getRatings_result setSuccess(RatingsWidget success) {
33711
      this.success = success;
33712
      return this;
33713
    }
33714
 
33715
    public void unsetSuccess() {
33716
      this.success = null;
33717
    }
33718
 
33719
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
33720
    public boolean isSetSuccess() {
33721
      return this.success != null;
33722
    }
33723
 
33724
    public void setSuccessIsSet(boolean value) {
33725
      if (!value) {
33726
        this.success = null;
33727
      }
33728
    }
33729
 
33730
    public WidgetException getScx() {
33731
      return this.scx;
33732
    }
33733
 
33734
    public getRatings_result setScx(WidgetException scx) {
33735
      this.scx = scx;
33736
      return this;
33737
    }
33738
 
33739
    public void unsetScx() {
33740
      this.scx = null;
33741
    }
33742
 
33743
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
33744
    public boolean isSetScx() {
33745
      return this.scx != null;
33746
    }
33747
 
33748
    public void setScxIsSet(boolean value) {
33749
      if (!value) {
33750
        this.scx = null;
33751
      }
33752
    }
33753
 
33754
    public void setFieldValue(_Fields field, Object value) {
33755
      switch (field) {
33756
      case SUCCESS:
33757
        if (value == null) {
33758
          unsetSuccess();
33759
        } else {
33760
          setSuccess((RatingsWidget)value);
33761
        }
33762
        break;
33763
 
33764
      case SCX:
33765
        if (value == null) {
33766
          unsetScx();
33767
        } else {
33768
          setScx((WidgetException)value);
33769
        }
33770
        break;
33771
 
33772
      }
33773
    }
33774
 
33775
    public void setFieldValue(int fieldID, Object value) {
33776
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33777
    }
33778
 
33779
    public Object getFieldValue(_Fields field) {
33780
      switch (field) {
33781
      case SUCCESS:
33782
        return getSuccess();
33783
 
33784
      case SCX:
33785
        return getScx();
33786
 
33787
      }
33788
      throw new IllegalStateException();
33789
    }
33790
 
33791
    public Object getFieldValue(int fieldId) {
33792
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33793
    }
33794
 
33795
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33796
    public boolean isSet(_Fields field) {
33797
      switch (field) {
33798
      case SUCCESS:
33799
        return isSetSuccess();
33800
      case SCX:
33801
        return isSetScx();
33802
      }
33803
      throw new IllegalStateException();
33804
    }
33805
 
33806
    public boolean isSet(int fieldID) {
33807
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33808
    }
33809
 
33810
    @Override
33811
    public boolean equals(Object that) {
33812
      if (that == null)
33813
        return false;
33814
      if (that instanceof getRatings_result)
33815
        return this.equals((getRatings_result)that);
33816
      return false;
33817
    }
33818
 
33819
    public boolean equals(getRatings_result that) {
33820
      if (that == null)
33821
        return false;
33822
 
33823
      boolean this_present_success = true && this.isSetSuccess();
33824
      boolean that_present_success = true && that.isSetSuccess();
33825
      if (this_present_success || that_present_success) {
33826
        if (!(this_present_success && that_present_success))
33827
          return false;
33828
        if (!this.success.equals(that.success))
33829
          return false;
33830
      }
33831
 
33832
      boolean this_present_scx = true && this.isSetScx();
33833
      boolean that_present_scx = true && that.isSetScx();
33834
      if (this_present_scx || that_present_scx) {
33835
        if (!(this_present_scx && that_present_scx))
33836
          return false;
33837
        if (!this.scx.equals(that.scx))
33838
          return false;
33839
      }
33840
 
33841
      return true;
33842
    }
33843
 
33844
    @Override
33845
    public int hashCode() {
33846
      return 0;
33847
    }
33848
 
33849
    public void read(TProtocol iprot) throws TException {
33850
      TField field;
33851
      iprot.readStructBegin();
33852
      while (true)
33853
      {
33854
        field = iprot.readFieldBegin();
33855
        if (field.type == TType.STOP) { 
33856
          break;
33857
        }
33858
        _Fields fieldId = _Fields.findByThriftId(field.id);
33859
        if (fieldId == null) {
33860
          TProtocolUtil.skip(iprot, field.type);
33861
        } else {
33862
          switch (fieldId) {
33863
            case SUCCESS:
33864
              if (field.type == TType.STRUCT) {
33865
                this.success = new RatingsWidget();
33866
                this.success.read(iprot);
33867
              } else { 
33868
                TProtocolUtil.skip(iprot, field.type);
33869
              }
33870
              break;
33871
            case SCX:
33872
              if (field.type == TType.STRUCT) {
33873
                this.scx = new WidgetException();
33874
                this.scx.read(iprot);
33875
              } else { 
33876
                TProtocolUtil.skip(iprot, field.type);
33877
              }
33878
              break;
33879
          }
33880
          iprot.readFieldEnd();
33881
        }
33882
      }
33883
      iprot.readStructEnd();
33884
      validate();
33885
    }
33886
 
33887
    public void write(TProtocol oprot) throws TException {
33888
      oprot.writeStructBegin(STRUCT_DESC);
33889
 
33890
      if (this.isSetSuccess()) {
33891
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
33892
        this.success.write(oprot);
33893
        oprot.writeFieldEnd();
33894
      } else if (this.isSetScx()) {
33895
        oprot.writeFieldBegin(SCX_FIELD_DESC);
33896
        this.scx.write(oprot);
33897
        oprot.writeFieldEnd();
33898
      }
33899
      oprot.writeFieldStop();
33900
      oprot.writeStructEnd();
33901
    }
33902
 
33903
    @Override
33904
    public String toString() {
33905
      StringBuilder sb = new StringBuilder("getRatings_result(");
33906
      boolean first = true;
33907
 
33908
      sb.append("success:");
33909
      if (this.success == null) {
33910
        sb.append("null");
33911
      } else {
33912
        sb.append(this.success);
33913
      }
33914
      first = false;
33915
      if (!first) sb.append(", ");
33916
      sb.append("scx:");
33917
      if (this.scx == null) {
33918
        sb.append("null");
33919
      } else {
33920
        sb.append(this.scx);
33921
      }
33922
      first = false;
33923
      sb.append(")");
33924
      return sb.toString();
33925
    }
33926
 
33927
    public void validate() throws TException {
33928
      // check for required fields
33929
    }
33930
 
33931
  }
33932
 
33933
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
33934
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
33935
 
33936
    private static final TField USER_ID_FIELD_DESC = new TField("user_id", TType.I64, (short)1);
33937
    private static final TField ITEM_ID_FIELD_DESC = new TField("item_id", TType.I64, (short)2);
33938
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)3);
33939
 
33940
    private long user_id;
33941
    private long item_id;
33942
    private boolean isSessionId;
33943
 
33944
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33945
    public enum _Fields implements TFieldIdEnum {
33946
      USER_ID((short)1, "user_id"),
33947
      ITEM_ID((short)2, "item_id"),
33948
      IS_SESSION_ID((short)3, "isSessionId");
33949
 
33950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33952
 
33953
      static {
33954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33955
          byId.put((int)field._thriftId, field);
33956
          byName.put(field.getFieldName(), field);
33957
        }
33958
      }
33959
 
33960
      /**
33961
       * Find the _Fields constant that matches fieldId, or null if its not found.
33962
       */
33963
      public static _Fields findByThriftId(int fieldId) {
33964
        return byId.get(fieldId);
33965
      }
33966
 
33967
      /**
33968
       * Find the _Fields constant that matches fieldId, throwing an exception
33969
       * if it is not found.
33970
       */
33971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33972
        _Fields fields = findByThriftId(fieldId);
33973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33974
        return fields;
33975
      }
33976
 
33977
      /**
33978
       * Find the _Fields constant that matches name, or null if its not found.
33979
       */
33980
      public static _Fields findByName(String name) {
33981
        return byName.get(name);
33982
      }
33983
 
33984
      private final short _thriftId;
33985
      private final String _fieldName;
33986
 
33987
      _Fields(short thriftId, String fieldName) {
33988
        _thriftId = thriftId;
33989
        _fieldName = fieldName;
33990
      }
33991
 
33992
      public short getThriftFieldId() {
33993
        return _thriftId;
33994
      }
33995
 
33996
      public String getFieldName() {
33997
        return _fieldName;
33998
      }
33999
    }
34000
 
34001
    // isset id assignments
34002
    private static final int __USER_ID_ISSET_ID = 0;
34003
    private static final int __ITEM_ID_ISSET_ID = 1;
34004
    private static final int __ISSESSIONID_ISSET_ID = 2;
34005
    private BitSet __isset_bit_vector = new BitSet(3);
34006
 
34007
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34008
      put(_Fields.USER_ID, new FieldMetaData("user_id", TFieldRequirementType.DEFAULT, 
34009
          new FieldValueMetaData(TType.I64)));
34010
      put(_Fields.ITEM_ID, new FieldMetaData("item_id", TFieldRequirementType.DEFAULT, 
34011
          new FieldValueMetaData(TType.I64)));
34012
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
34013
          new FieldValueMetaData(TType.BOOL)));
34014
    }});
34015
 
34016
    static {
34017
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
34018
    }
34019
 
34020
    public updateBrowseHistory_args() {
34021
    }
34022
 
34023
    public updateBrowseHistory_args(
34024
      long user_id,
34025
      long item_id,
34026
      boolean isSessionId)
34027
    {
34028
      this();
34029
      this.user_id = user_id;
34030
      setUser_idIsSet(true);
34031
      this.item_id = item_id;
34032
      setItem_idIsSet(true);
34033
      this.isSessionId = isSessionId;
34034
      setIsSessionIdIsSet(true);
34035
    }
34036
 
34037
    /**
34038
     * Performs a deep copy on <i>other</i>.
34039
     */
34040
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
130 ashish 34041
      __isset_bit_vector.clear();
34042
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 34043
      this.user_id = other.user_id;
34044
      this.item_id = other.item_id;
34045
      this.isSessionId = other.isSessionId;
34046
    }
34047
 
34048
    public updateBrowseHistory_args deepCopy() {
34049
      return new updateBrowseHistory_args(this);
34050
    }
34051
 
34052
    @Deprecated
34053
    public updateBrowseHistory_args clone() {
34054
      return new updateBrowseHistory_args(this);
34055
    }
34056
 
34057
    public long getUser_id() {
34058
      return this.user_id;
34059
    }
34060
 
34061
    public updateBrowseHistory_args setUser_id(long user_id) {
34062
      this.user_id = user_id;
34063
      setUser_idIsSet(true);
34064
      return this;
34065
    }
34066
 
34067
    public void unsetUser_id() {
34068
      __isset_bit_vector.clear(__USER_ID_ISSET_ID);
34069
    }
34070
 
34071
    /** Returns true if field user_id is set (has been asigned a value) and false otherwise */
34072
    public boolean isSetUser_id() {
34073
      return __isset_bit_vector.get(__USER_ID_ISSET_ID);
34074
    }
34075
 
34076
    public void setUser_idIsSet(boolean value) {
34077
      __isset_bit_vector.set(__USER_ID_ISSET_ID, value);
34078
    }
34079
 
34080
    public long getItem_id() {
34081
      return this.item_id;
34082
    }
34083
 
34084
    public updateBrowseHistory_args setItem_id(long item_id) {
34085
      this.item_id = item_id;
34086
      setItem_idIsSet(true);
34087
      return this;
34088
    }
34089
 
34090
    public void unsetItem_id() {
34091
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
34092
    }
34093
 
34094
    /** Returns true if field item_id is set (has been asigned a value) and false otherwise */
34095
    public boolean isSetItem_id() {
34096
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
34097
    }
34098
 
34099
    public void setItem_idIsSet(boolean value) {
34100
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
34101
    }
34102
 
34103
    public boolean isIsSessionId() {
34104
      return this.isSessionId;
34105
    }
34106
 
34107
    public updateBrowseHistory_args setIsSessionId(boolean isSessionId) {
34108
      this.isSessionId = isSessionId;
34109
      setIsSessionIdIsSet(true);
34110
      return this;
34111
    }
34112
 
34113
    public void unsetIsSessionId() {
34114
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
34115
    }
34116
 
34117
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
34118
    public boolean isSetIsSessionId() {
34119
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
34120
    }
34121
 
34122
    public void setIsSessionIdIsSet(boolean value) {
34123
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
34124
    }
34125
 
34126
    public void setFieldValue(_Fields field, Object value) {
34127
      switch (field) {
34128
      case USER_ID:
34129
        if (value == null) {
34130
          unsetUser_id();
34131
        } else {
34132
          setUser_id((Long)value);
34133
        }
34134
        break;
34135
 
34136
      case ITEM_ID:
34137
        if (value == null) {
34138
          unsetItem_id();
34139
        } else {
34140
          setItem_id((Long)value);
34141
        }
34142
        break;
34143
 
34144
      case IS_SESSION_ID:
34145
        if (value == null) {
34146
          unsetIsSessionId();
34147
        } else {
34148
          setIsSessionId((Boolean)value);
34149
        }
34150
        break;
34151
 
130 ashish 34152
      }
34153
    }
34154
 
553 chandransh 34155
    public void setFieldValue(int fieldID, Object value) {
34156
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 34157
    }
34158
 
553 chandransh 34159
    public Object getFieldValue(_Fields field) {
34160
      switch (field) {
34161
      case USER_ID:
34162
        return new Long(getUser_id());
34163
 
34164
      case ITEM_ID:
34165
        return new Long(getItem_id());
34166
 
34167
      case IS_SESSION_ID:
34168
        return new Boolean(isIsSessionId());
34169
 
34170
      }
34171
      throw new IllegalStateException();
34172
    }
34173
 
34174
    public Object getFieldValue(int fieldId) {
34175
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34176
    }
34177
 
34178
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34179
    public boolean isSet(_Fields field) {
34180
      switch (field) {
34181
      case USER_ID:
34182
        return isSetUser_id();
34183
      case ITEM_ID:
34184
        return isSetItem_id();
34185
      case IS_SESSION_ID:
34186
        return isSetIsSessionId();
34187
      }
34188
      throw new IllegalStateException();
34189
    }
34190
 
34191
    public boolean isSet(int fieldID) {
34192
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34193
    }
34194
 
34195
    @Override
34196
    public boolean equals(Object that) {
34197
      if (that == null)
34198
        return false;
34199
      if (that instanceof updateBrowseHistory_args)
34200
        return this.equals((updateBrowseHistory_args)that);
34201
      return false;
34202
    }
34203
 
34204
    public boolean equals(updateBrowseHistory_args that) {
34205
      if (that == null)
34206
        return false;
34207
 
34208
      boolean this_present_user_id = true;
34209
      boolean that_present_user_id = true;
34210
      if (this_present_user_id || that_present_user_id) {
34211
        if (!(this_present_user_id && that_present_user_id))
34212
          return false;
34213
        if (this.user_id != that.user_id)
34214
          return false;
34215
      }
34216
 
34217
      boolean this_present_item_id = true;
34218
      boolean that_present_item_id = true;
34219
      if (this_present_item_id || that_present_item_id) {
34220
        if (!(this_present_item_id && that_present_item_id))
34221
          return false;
34222
        if (this.item_id != that.item_id)
34223
          return false;
34224
      }
34225
 
34226
      boolean this_present_isSessionId = true;
34227
      boolean that_present_isSessionId = true;
34228
      if (this_present_isSessionId || that_present_isSessionId) {
34229
        if (!(this_present_isSessionId && that_present_isSessionId))
34230
          return false;
34231
        if (this.isSessionId != that.isSessionId)
34232
          return false;
34233
      }
34234
 
34235
      return true;
34236
    }
34237
 
34238
    @Override
34239
    public int hashCode() {
34240
      return 0;
34241
    }
34242
 
34243
    public int compareTo(updateBrowseHistory_args other) {
34244
      if (!getClass().equals(other.getClass())) {
34245
        return getClass().getName().compareTo(other.getClass().getName());
34246
      }
34247
 
34248
      int lastComparison = 0;
34249
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
34250
 
34251
      lastComparison = Boolean.valueOf(isSetUser_id()).compareTo(isSetUser_id());
34252
      if (lastComparison != 0) {
34253
        return lastComparison;
34254
      }
34255
      lastComparison = TBaseHelper.compareTo(user_id, typedOther.user_id);
34256
      if (lastComparison != 0) {
34257
        return lastComparison;
34258
      }
34259
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(isSetItem_id());
34260
      if (lastComparison != 0) {
34261
        return lastComparison;
34262
      }
34263
      lastComparison = TBaseHelper.compareTo(item_id, typedOther.item_id);
34264
      if (lastComparison != 0) {
34265
        return lastComparison;
34266
      }
34267
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
34268
      if (lastComparison != 0) {
34269
        return lastComparison;
34270
      }
34271
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
34272
      if (lastComparison != 0) {
34273
        return lastComparison;
34274
      }
34275
      return 0;
34276
    }
34277
 
34278
    public void read(TProtocol iprot) throws TException {
34279
      TField field;
34280
      iprot.readStructBegin();
34281
      while (true)
34282
      {
34283
        field = iprot.readFieldBegin();
34284
        if (field.type == TType.STOP) { 
34285
          break;
34286
        }
34287
        _Fields fieldId = _Fields.findByThriftId(field.id);
34288
        if (fieldId == null) {
34289
          TProtocolUtil.skip(iprot, field.type);
34290
        } else {
34291
          switch (fieldId) {
34292
            case USER_ID:
34293
              if (field.type == TType.I64) {
34294
                this.user_id = iprot.readI64();
34295
                setUser_idIsSet(true);
34296
              } else { 
34297
                TProtocolUtil.skip(iprot, field.type);
34298
              }
34299
              break;
34300
            case ITEM_ID:
34301
              if (field.type == TType.I64) {
34302
                this.item_id = iprot.readI64();
34303
                setItem_idIsSet(true);
34304
              } else { 
34305
                TProtocolUtil.skip(iprot, field.type);
34306
              }
34307
              break;
34308
            case IS_SESSION_ID:
34309
              if (field.type == TType.BOOL) {
34310
                this.isSessionId = iprot.readBool();
34311
                setIsSessionIdIsSet(true);
34312
              } else { 
34313
                TProtocolUtil.skip(iprot, field.type);
34314
              }
34315
              break;
34316
          }
34317
          iprot.readFieldEnd();
34318
        }
34319
      }
34320
      iprot.readStructEnd();
34321
      validate();
34322
    }
34323
 
34324
    public void write(TProtocol oprot) throws TException {
34325
      validate();
34326
 
34327
      oprot.writeStructBegin(STRUCT_DESC);
34328
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
34329
      oprot.writeI64(this.user_id);
34330
      oprot.writeFieldEnd();
34331
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
34332
      oprot.writeI64(this.item_id);
34333
      oprot.writeFieldEnd();
34334
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
34335
      oprot.writeBool(this.isSessionId);
34336
      oprot.writeFieldEnd();
34337
      oprot.writeFieldStop();
34338
      oprot.writeStructEnd();
34339
    }
34340
 
34341
    @Override
34342
    public String toString() {
34343
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
34344
      boolean first = true;
34345
 
34346
      sb.append("user_id:");
34347
      sb.append(this.user_id);
34348
      first = false;
34349
      if (!first) sb.append(", ");
34350
      sb.append("item_id:");
34351
      sb.append(this.item_id);
34352
      first = false;
34353
      if (!first) sb.append(", ");
34354
      sb.append("isSessionId:");
34355
      sb.append(this.isSessionId);
34356
      first = false;
34357
      sb.append(")");
34358
      return sb.toString();
34359
    }
34360
 
34361
    public void validate() throws TException {
34362
      // check for required fields
34363
    }
34364
 
34365
  }
34366
 
34367
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
34368
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
34369
 
34370
 
34371
 
34372
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34373
    public enum _Fields implements TFieldIdEnum {
34374
;
34375
 
34376
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34377
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34378
 
34379
      static {
34380
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34381
          byId.put((int)field._thriftId, field);
34382
          byName.put(field.getFieldName(), field);
34383
        }
34384
      }
34385
 
34386
      /**
34387
       * Find the _Fields constant that matches fieldId, or null if its not found.
34388
       */
34389
      public static _Fields findByThriftId(int fieldId) {
34390
        return byId.get(fieldId);
34391
      }
34392
 
34393
      /**
34394
       * Find the _Fields constant that matches fieldId, throwing an exception
34395
       * if it is not found.
34396
       */
34397
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34398
        _Fields fields = findByThriftId(fieldId);
34399
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34400
        return fields;
34401
      }
34402
 
34403
      /**
34404
       * Find the _Fields constant that matches name, or null if its not found.
34405
       */
34406
      public static _Fields findByName(String name) {
34407
        return byName.get(name);
34408
      }
34409
 
34410
      private final short _thriftId;
34411
      private final String _fieldName;
34412
 
34413
      _Fields(short thriftId, String fieldName) {
34414
        _thriftId = thriftId;
34415
        _fieldName = fieldName;
34416
      }
34417
 
34418
      public short getThriftFieldId() {
34419
        return _thriftId;
34420
      }
34421
 
34422
      public String getFieldName() {
34423
        return _fieldName;
34424
      }
34425
    }
34426
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34427
    }});
34428
 
34429
    static {
34430
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
34431
    }
34432
 
34433
    public updateBrowseHistory_result() {
34434
    }
34435
 
34436
    /**
34437
     * Performs a deep copy on <i>other</i>.
34438
     */
34439
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
34440
    }
34441
 
34442
    public updateBrowseHistory_result deepCopy() {
34443
      return new updateBrowseHistory_result(this);
34444
    }
34445
 
130 ashish 34446
    @Deprecated
553 chandransh 34447
    public updateBrowseHistory_result clone() {
34448
      return new updateBrowseHistory_result(this);
130 ashish 34449
    }
34450
 
553 chandransh 34451
    public void setFieldValue(_Fields field, Object value) {
34452
      switch (field) {
34453
      }
34454
    }
34455
 
34456
    public void setFieldValue(int fieldID, Object value) {
34457
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34458
    }
34459
 
34460
    public Object getFieldValue(_Fields field) {
34461
      switch (field) {
34462
      }
34463
      throw new IllegalStateException();
34464
    }
34465
 
34466
    public Object getFieldValue(int fieldId) {
34467
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34468
    }
34469
 
34470
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34471
    public boolean isSet(_Fields field) {
34472
      switch (field) {
34473
      }
34474
      throw new IllegalStateException();
34475
    }
34476
 
34477
    public boolean isSet(int fieldID) {
34478
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34479
    }
34480
 
34481
    @Override
34482
    public boolean equals(Object that) {
34483
      if (that == null)
34484
        return false;
34485
      if (that instanceof updateBrowseHistory_result)
34486
        return this.equals((updateBrowseHistory_result)that);
34487
      return false;
34488
    }
34489
 
34490
    public boolean equals(updateBrowseHistory_result that) {
34491
      if (that == null)
34492
        return false;
34493
 
34494
      return true;
34495
    }
34496
 
34497
    @Override
34498
    public int hashCode() {
34499
      return 0;
34500
    }
34501
 
34502
    public int compareTo(updateBrowseHistory_result other) {
34503
      if (!getClass().equals(other.getClass())) {
34504
        return getClass().getName().compareTo(other.getClass().getName());
34505
      }
34506
 
34507
      int lastComparison = 0;
34508
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
34509
 
34510
      return 0;
34511
    }
34512
 
34513
    public void read(TProtocol iprot) throws TException {
34514
      TField field;
34515
      iprot.readStructBegin();
34516
      while (true)
34517
      {
34518
        field = iprot.readFieldBegin();
34519
        if (field.type == TType.STOP) { 
34520
          break;
34521
        }
34522
        _Fields fieldId = _Fields.findByThriftId(field.id);
34523
        if (fieldId == null) {
34524
          TProtocolUtil.skip(iprot, field.type);
34525
        } else {
34526
          switch (fieldId) {
34527
          }
34528
          iprot.readFieldEnd();
34529
        }
34530
      }
34531
      iprot.readStructEnd();
34532
      validate();
34533
    }
34534
 
34535
    public void write(TProtocol oprot) throws TException {
34536
      oprot.writeStructBegin(STRUCT_DESC);
34537
 
34538
      oprot.writeFieldStop();
34539
      oprot.writeStructEnd();
34540
    }
34541
 
34542
    @Override
34543
    public String toString() {
34544
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
34545
      boolean first = true;
34546
 
34547
      sb.append(")");
34548
      return sb.toString();
34549
    }
34550
 
34551
    public void validate() throws TException {
34552
      // check for required fields
34553
    }
34554
 
34555
  }
34556
 
34557
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
34558
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
34559
 
34560
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
34561
    private static final TField IS_SESSION_ID_FIELD_DESC = new TField("isSessionId", TType.BOOL, (short)2);
34562
 
34563
    private long userId;
34564
    private boolean isSessionId;
34565
 
34566
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34567
    public enum _Fields implements TFieldIdEnum {
34568
      USER_ID((short)1, "userId"),
34569
      IS_SESSION_ID((short)2, "isSessionId");
34570
 
34571
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34572
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34573
 
34574
      static {
34575
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34576
          byId.put((int)field._thriftId, field);
34577
          byName.put(field.getFieldName(), field);
34578
        }
34579
      }
34580
 
34581
      /**
34582
       * Find the _Fields constant that matches fieldId, or null if its not found.
34583
       */
34584
      public static _Fields findByThriftId(int fieldId) {
34585
        return byId.get(fieldId);
34586
      }
34587
 
34588
      /**
34589
       * Find the _Fields constant that matches fieldId, throwing an exception
34590
       * if it is not found.
34591
       */
34592
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34593
        _Fields fields = findByThriftId(fieldId);
34594
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34595
        return fields;
34596
      }
34597
 
34598
      /**
34599
       * Find the _Fields constant that matches name, or null if its not found.
34600
       */
34601
      public static _Fields findByName(String name) {
34602
        return byName.get(name);
34603
      }
34604
 
34605
      private final short _thriftId;
34606
      private final String _fieldName;
34607
 
34608
      _Fields(short thriftId, String fieldName) {
34609
        _thriftId = thriftId;
34610
        _fieldName = fieldName;
34611
      }
34612
 
34613
      public short getThriftFieldId() {
34614
        return _thriftId;
34615
      }
34616
 
34617
      public String getFieldName() {
34618
        return _fieldName;
34619
      }
34620
    }
34621
 
34622
    // isset id assignments
34623
    private static final int __USERID_ISSET_ID = 0;
34624
    private static final int __ISSESSIONID_ISSET_ID = 1;
34625
    private BitSet __isset_bit_vector = new BitSet(2);
34626
 
34627
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34628
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
34629
          new FieldValueMetaData(TType.I64)));
34630
      put(_Fields.IS_SESSION_ID, new FieldMetaData("isSessionId", TFieldRequirementType.DEFAULT, 
34631
          new FieldValueMetaData(TType.BOOL)));
34632
    }});
34633
 
34634
    static {
34635
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
34636
    }
34637
 
34638
    public getBrowseHistory_args() {
34639
    }
34640
 
34641
    public getBrowseHistory_args(
34642
      long userId,
34643
      boolean isSessionId)
34644
    {
34645
      this();
34646
      this.userId = userId;
34647
      setUserIdIsSet(true);
34648
      this.isSessionId = isSessionId;
34649
      setIsSessionIdIsSet(true);
34650
    }
34651
 
34652
    /**
34653
     * Performs a deep copy on <i>other</i>.
34654
     */
34655
    public getBrowseHistory_args(getBrowseHistory_args other) {
34656
      __isset_bit_vector.clear();
34657
      __isset_bit_vector.or(other.__isset_bit_vector);
34658
      this.userId = other.userId;
34659
      this.isSessionId = other.isSessionId;
34660
    }
34661
 
34662
    public getBrowseHistory_args deepCopy() {
34663
      return new getBrowseHistory_args(this);
34664
    }
34665
 
34666
    @Deprecated
34667
    public getBrowseHistory_args clone() {
34668
      return new getBrowseHistory_args(this);
34669
    }
34670
 
34671
    public long getUserId() {
34672
      return this.userId;
34673
    }
34674
 
34675
    public getBrowseHistory_args setUserId(long userId) {
34676
      this.userId = userId;
34677
      setUserIdIsSet(true);
34678
      return this;
34679
    }
34680
 
34681
    public void unsetUserId() {
34682
      __isset_bit_vector.clear(__USERID_ISSET_ID);
34683
    }
34684
 
34685
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
34686
    public boolean isSetUserId() {
34687
      return __isset_bit_vector.get(__USERID_ISSET_ID);
34688
    }
34689
 
34690
    public void setUserIdIsSet(boolean value) {
34691
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
34692
    }
34693
 
34694
    public boolean isIsSessionId() {
34695
      return this.isSessionId;
34696
    }
34697
 
34698
    public getBrowseHistory_args setIsSessionId(boolean isSessionId) {
34699
      this.isSessionId = isSessionId;
34700
      setIsSessionIdIsSet(true);
34701
      return this;
34702
    }
34703
 
34704
    public void unsetIsSessionId() {
34705
      __isset_bit_vector.clear(__ISSESSIONID_ISSET_ID);
34706
    }
34707
 
34708
    /** Returns true if field isSessionId is set (has been asigned a value) and false otherwise */
34709
    public boolean isSetIsSessionId() {
34710
      return __isset_bit_vector.get(__ISSESSIONID_ISSET_ID);
34711
    }
34712
 
34713
    public void setIsSessionIdIsSet(boolean value) {
34714
      __isset_bit_vector.set(__ISSESSIONID_ISSET_ID, value);
34715
    }
34716
 
34717
    public void setFieldValue(_Fields field, Object value) {
34718
      switch (field) {
34719
      case USER_ID:
34720
        if (value == null) {
34721
          unsetUserId();
34722
        } else {
34723
          setUserId((Long)value);
34724
        }
34725
        break;
34726
 
34727
      case IS_SESSION_ID:
34728
        if (value == null) {
34729
          unsetIsSessionId();
34730
        } else {
34731
          setIsSessionId((Boolean)value);
34732
        }
34733
        break;
34734
 
34735
      }
34736
    }
34737
 
34738
    public void setFieldValue(int fieldID, Object value) {
34739
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34740
    }
34741
 
34742
    public Object getFieldValue(_Fields field) {
34743
      switch (field) {
34744
      case USER_ID:
34745
        return new Long(getUserId());
34746
 
34747
      case IS_SESSION_ID:
34748
        return new Boolean(isIsSessionId());
34749
 
34750
      }
34751
      throw new IllegalStateException();
34752
    }
34753
 
34754
    public Object getFieldValue(int fieldId) {
34755
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34756
    }
34757
 
34758
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34759
    public boolean isSet(_Fields field) {
34760
      switch (field) {
34761
      case USER_ID:
34762
        return isSetUserId();
34763
      case IS_SESSION_ID:
34764
        return isSetIsSessionId();
34765
      }
34766
      throw new IllegalStateException();
34767
    }
34768
 
34769
    public boolean isSet(int fieldID) {
34770
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34771
    }
34772
 
34773
    @Override
34774
    public boolean equals(Object that) {
34775
      if (that == null)
34776
        return false;
34777
      if (that instanceof getBrowseHistory_args)
34778
        return this.equals((getBrowseHistory_args)that);
34779
      return false;
34780
    }
34781
 
34782
    public boolean equals(getBrowseHistory_args that) {
34783
      if (that == null)
34784
        return false;
34785
 
34786
      boolean this_present_userId = true;
34787
      boolean that_present_userId = true;
34788
      if (this_present_userId || that_present_userId) {
34789
        if (!(this_present_userId && that_present_userId))
34790
          return false;
34791
        if (this.userId != that.userId)
34792
          return false;
34793
      }
34794
 
34795
      boolean this_present_isSessionId = true;
34796
      boolean that_present_isSessionId = true;
34797
      if (this_present_isSessionId || that_present_isSessionId) {
34798
        if (!(this_present_isSessionId && that_present_isSessionId))
34799
          return false;
34800
        if (this.isSessionId != that.isSessionId)
34801
          return false;
34802
      }
34803
 
34804
      return true;
34805
    }
34806
 
34807
    @Override
34808
    public int hashCode() {
34809
      return 0;
34810
    }
34811
 
34812
    public int compareTo(getBrowseHistory_args other) {
34813
      if (!getClass().equals(other.getClass())) {
34814
        return getClass().getName().compareTo(other.getClass().getName());
34815
      }
34816
 
34817
      int lastComparison = 0;
34818
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
34819
 
34820
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
34821
      if (lastComparison != 0) {
34822
        return lastComparison;
34823
      }
34824
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
34825
      if (lastComparison != 0) {
34826
        return lastComparison;
34827
      }
34828
      lastComparison = Boolean.valueOf(isSetIsSessionId()).compareTo(isSetIsSessionId());
34829
      if (lastComparison != 0) {
34830
        return lastComparison;
34831
      }
34832
      lastComparison = TBaseHelper.compareTo(isSessionId, typedOther.isSessionId);
34833
      if (lastComparison != 0) {
34834
        return lastComparison;
34835
      }
34836
      return 0;
34837
    }
34838
 
34839
    public void read(TProtocol iprot) throws TException {
34840
      TField field;
34841
      iprot.readStructBegin();
34842
      while (true)
34843
      {
34844
        field = iprot.readFieldBegin();
34845
        if (field.type == TType.STOP) { 
34846
          break;
34847
        }
34848
        _Fields fieldId = _Fields.findByThriftId(field.id);
34849
        if (fieldId == null) {
34850
          TProtocolUtil.skip(iprot, field.type);
34851
        } else {
34852
          switch (fieldId) {
34853
            case USER_ID:
34854
              if (field.type == TType.I64) {
34855
                this.userId = iprot.readI64();
34856
                setUserIdIsSet(true);
34857
              } else { 
34858
                TProtocolUtil.skip(iprot, field.type);
34859
              }
34860
              break;
34861
            case IS_SESSION_ID:
34862
              if (field.type == TType.BOOL) {
34863
                this.isSessionId = iprot.readBool();
34864
                setIsSessionIdIsSet(true);
34865
              } else { 
34866
                TProtocolUtil.skip(iprot, field.type);
34867
              }
34868
              break;
34869
          }
34870
          iprot.readFieldEnd();
34871
        }
34872
      }
34873
      iprot.readStructEnd();
34874
      validate();
34875
    }
34876
 
34877
    public void write(TProtocol oprot) throws TException {
34878
      validate();
34879
 
34880
      oprot.writeStructBegin(STRUCT_DESC);
34881
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
34882
      oprot.writeI64(this.userId);
34883
      oprot.writeFieldEnd();
34884
      oprot.writeFieldBegin(IS_SESSION_ID_FIELD_DESC);
34885
      oprot.writeBool(this.isSessionId);
34886
      oprot.writeFieldEnd();
34887
      oprot.writeFieldStop();
34888
      oprot.writeStructEnd();
34889
    }
34890
 
34891
    @Override
34892
    public String toString() {
34893
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
34894
      boolean first = true;
34895
 
34896
      sb.append("userId:");
34897
      sb.append(this.userId);
34898
      first = false;
34899
      if (!first) sb.append(", ");
34900
      sb.append("isSessionId:");
34901
      sb.append(this.isSessionId);
34902
      first = false;
34903
      sb.append(")");
34904
      return sb.toString();
34905
    }
34906
 
34907
    public void validate() throws TException {
34908
      // check for required fields
34909
    }
34910
 
34911
  }
34912
 
34913
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
34914
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
34915
 
34916
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
34917
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
34918
 
34919
    private Widget success;
34920
    private WidgetException scx;
34921
 
34922
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34923
    public enum _Fields implements TFieldIdEnum {
34924
      SUCCESS((short)0, "success"),
34925
      SCX((short)1, "scx");
34926
 
34927
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34928
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34929
 
34930
      static {
34931
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34932
          byId.put((int)field._thriftId, field);
34933
          byName.put(field.getFieldName(), field);
34934
        }
34935
      }
34936
 
34937
      /**
34938
       * Find the _Fields constant that matches fieldId, or null if its not found.
34939
       */
34940
      public static _Fields findByThriftId(int fieldId) {
34941
        return byId.get(fieldId);
34942
      }
34943
 
34944
      /**
34945
       * Find the _Fields constant that matches fieldId, throwing an exception
34946
       * if it is not found.
34947
       */
34948
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34949
        _Fields fields = findByThriftId(fieldId);
34950
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34951
        return fields;
34952
      }
34953
 
34954
      /**
34955
       * Find the _Fields constant that matches name, or null if its not found.
34956
       */
34957
      public static _Fields findByName(String name) {
34958
        return byName.get(name);
34959
      }
34960
 
34961
      private final short _thriftId;
34962
      private final String _fieldName;
34963
 
34964
      _Fields(short thriftId, String fieldName) {
34965
        _thriftId = thriftId;
34966
        _fieldName = fieldName;
34967
      }
34968
 
34969
      public short getThriftFieldId() {
34970
        return _thriftId;
34971
      }
34972
 
34973
      public String getFieldName() {
34974
        return _fieldName;
34975
      }
34976
    }
34977
 
34978
    // isset id assignments
34979
 
34980
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34981
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
34982
          new StructMetaData(TType.STRUCT, Widget.class)));
34983
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
34984
          new FieldValueMetaData(TType.STRUCT)));
34985
    }});
34986
 
34987
    static {
34988
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
34989
    }
34990
 
34991
    public getBrowseHistory_result() {
34992
    }
34993
 
34994
    public getBrowseHistory_result(
34995
      Widget success,
34996
      WidgetException scx)
34997
    {
34998
      this();
34999
      this.success = success;
35000
      this.scx = scx;
35001
    }
35002
 
35003
    /**
35004
     * Performs a deep copy on <i>other</i>.
35005
     */
35006
    public getBrowseHistory_result(getBrowseHistory_result other) {
35007
      if (other.isSetSuccess()) {
35008
        this.success = new Widget(other.success);
35009
      }
35010
      if (other.isSetScx()) {
35011
        this.scx = new WidgetException(other.scx);
35012
      }
35013
    }
35014
 
35015
    public getBrowseHistory_result deepCopy() {
35016
      return new getBrowseHistory_result(this);
35017
    }
35018
 
35019
    @Deprecated
35020
    public getBrowseHistory_result clone() {
35021
      return new getBrowseHistory_result(this);
35022
    }
35023
 
35024
    public Widget getSuccess() {
130 ashish 35025
      return this.success;
35026
    }
35027
 
553 chandransh 35028
    public getBrowseHistory_result setSuccess(Widget success) {
130 ashish 35029
      this.success = success;
35030
      return this;
35031
    }
35032
 
35033
    public void unsetSuccess() {
553 chandransh 35034
      this.success = null;
130 ashish 35035
    }
35036
 
35037
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
35038
    public boolean isSetSuccess() {
553 chandransh 35039
      return this.success != null;
130 ashish 35040
    }
35041
 
35042
    public void setSuccessIsSet(boolean value) {
553 chandransh 35043
      if (!value) {
35044
        this.success = null;
35045
      }
130 ashish 35046
    }
35047
 
553 chandransh 35048
    public WidgetException getScx() {
35049
      return this.scx;
130 ashish 35050
    }
35051
 
553 chandransh 35052
    public getBrowseHistory_result setScx(WidgetException scx) {
35053
      this.scx = scx;
130 ashish 35054
      return this;
35055
    }
35056
 
553 chandransh 35057
    public void unsetScx() {
35058
      this.scx = null;
130 ashish 35059
    }
35060
 
553 chandransh 35061
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
35062
    public boolean isSetScx() {
35063
      return this.scx != null;
130 ashish 35064
    }
35065
 
553 chandransh 35066
    public void setScxIsSet(boolean value) {
130 ashish 35067
      if (!value) {
553 chandransh 35068
        this.scx = null;
130 ashish 35069
      }
35070
    }
35071
 
35072
    public void setFieldValue(_Fields field, Object value) {
35073
      switch (field) {
35074
      case SUCCESS:
35075
        if (value == null) {
35076
          unsetSuccess();
35077
        } else {
553 chandransh 35078
          setSuccess((Widget)value);
130 ashish 35079
        }
35080
        break;
35081
 
553 chandransh 35082
      case SCX:
130 ashish 35083
        if (value == null) {
553 chandransh 35084
          unsetScx();
130 ashish 35085
        } else {
553 chandransh 35086
          setScx((WidgetException)value);
130 ashish 35087
        }
35088
        break;
35089
 
35090
      }
35091
    }
35092
 
35093
    public void setFieldValue(int fieldID, Object value) {
35094
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35095
    }
35096
 
35097
    public Object getFieldValue(_Fields field) {
35098
      switch (field) {
35099
      case SUCCESS:
553 chandransh 35100
        return getSuccess();
130 ashish 35101
 
553 chandransh 35102
      case SCX:
35103
        return getScx();
130 ashish 35104
 
35105
      }
35106
      throw new IllegalStateException();
35107
    }
35108
 
35109
    public Object getFieldValue(int fieldId) {
35110
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35111
    }
35112
 
35113
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35114
    public boolean isSet(_Fields field) {
35115
      switch (field) {
35116
      case SUCCESS:
35117
        return isSetSuccess();
553 chandransh 35118
      case SCX:
35119
        return isSetScx();
130 ashish 35120
      }
35121
      throw new IllegalStateException();
35122
    }
35123
 
35124
    public boolean isSet(int fieldID) {
35125
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35126
    }
35127
 
35128
    @Override
35129
    public boolean equals(Object that) {
35130
      if (that == null)
35131
        return false;
553 chandransh 35132
      if (that instanceof getBrowseHistory_result)
35133
        return this.equals((getBrowseHistory_result)that);
130 ashish 35134
      return false;
35135
    }
35136
 
553 chandransh 35137
    public boolean equals(getBrowseHistory_result that) {
130 ashish 35138
      if (that == null)
35139
        return false;
35140
 
553 chandransh 35141
      boolean this_present_success = true && this.isSetSuccess();
35142
      boolean that_present_success = true && that.isSetSuccess();
130 ashish 35143
      if (this_present_success || that_present_success) {
35144
        if (!(this_present_success && that_present_success))
35145
          return false;
553 chandransh 35146
        if (!this.success.equals(that.success))
130 ashish 35147
          return false;
35148
      }
35149
 
553 chandransh 35150
      boolean this_present_scx = true && this.isSetScx();
35151
      boolean that_present_scx = true && that.isSetScx();
35152
      if (this_present_scx || that_present_scx) {
35153
        if (!(this_present_scx && that_present_scx))
130 ashish 35154
          return false;
553 chandransh 35155
        if (!this.scx.equals(that.scx))
130 ashish 35156
          return false;
35157
      }
35158
 
35159
      return true;
35160
    }
35161
 
35162
    @Override
35163
    public int hashCode() {
35164
      return 0;
35165
    }
35166
 
553 chandransh 35167
    public int compareTo(getBrowseHistory_result other) {
130 ashish 35168
      if (!getClass().equals(other.getClass())) {
35169
        return getClass().getName().compareTo(other.getClass().getName());
35170
      }
35171
 
35172
      int lastComparison = 0;
553 chandransh 35173
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
130 ashish 35174
 
35175
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
35176
      if (lastComparison != 0) {
35177
        return lastComparison;
35178
      }
35179
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
35180
      if (lastComparison != 0) {
35181
        return lastComparison;
35182
      }
553 chandransh 35183
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 35184
      if (lastComparison != 0) {
35185
        return lastComparison;
35186
      }
553 chandransh 35187
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 35188
      if (lastComparison != 0) {
35189
        return lastComparison;
35190
      }
35191
      return 0;
35192
    }
35193
 
35194
    public void read(TProtocol iprot) throws TException {
35195
      TField field;
35196
      iprot.readStructBegin();
35197
      while (true)
35198
      {
35199
        field = iprot.readFieldBegin();
35200
        if (field.type == TType.STOP) { 
35201
          break;
35202
        }
35203
        _Fields fieldId = _Fields.findByThriftId(field.id);
35204
        if (fieldId == null) {
35205
          TProtocolUtil.skip(iprot, field.type);
35206
        } else {
35207
          switch (fieldId) {
35208
            case SUCCESS:
553 chandransh 35209
              if (field.type == TType.STRUCT) {
35210
                this.success = new Widget();
35211
                this.success.read(iprot);
130 ashish 35212
              } else { 
35213
                TProtocolUtil.skip(iprot, field.type);
35214
              }
35215
              break;
553 chandransh 35216
            case SCX:
130 ashish 35217
              if (field.type == TType.STRUCT) {
553 chandransh 35218
                this.scx = new WidgetException();
35219
                this.scx.read(iprot);
130 ashish 35220
              } else { 
35221
                TProtocolUtil.skip(iprot, field.type);
35222
              }
35223
              break;
35224
          }
35225
          iprot.readFieldEnd();
35226
        }
35227
      }
35228
      iprot.readStructEnd();
35229
      validate();
35230
    }
35231
 
35232
    public void write(TProtocol oprot) throws TException {
35233
      oprot.writeStructBegin(STRUCT_DESC);
35234
 
35235
      if (this.isSetSuccess()) {
35236
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 35237
        this.success.write(oprot);
130 ashish 35238
        oprot.writeFieldEnd();
553 chandransh 35239
      } else if (this.isSetScx()) {
35240
        oprot.writeFieldBegin(SCX_FIELD_DESC);
35241
        this.scx.write(oprot);
130 ashish 35242
        oprot.writeFieldEnd();
35243
      }
35244
      oprot.writeFieldStop();
35245
      oprot.writeStructEnd();
35246
    }
35247
 
35248
    @Override
35249
    public String toString() {
553 chandransh 35250
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
130 ashish 35251
      boolean first = true;
35252
 
35253
      sb.append("success:");
553 chandransh 35254
      if (this.success == null) {
35255
        sb.append("null");
35256
      } else {
35257
        sb.append(this.success);
35258
      }
130 ashish 35259
      first = false;
35260
      if (!first) sb.append(", ");
553 chandransh 35261
      sb.append("scx:");
35262
      if (this.scx == null) {
130 ashish 35263
        sb.append("null");
35264
      } else {
553 chandransh 35265
        sb.append(this.scx);
130 ashish 35266
      }
35267
      first = false;
35268
      sb.append(")");
35269
      return sb.toString();
35270
    }
35271
 
35272
    public void validate() throws TException {
35273
      // check for required fields
35274
    }
35275
 
35276
  }
35277
 
48 ashish 35278
}