Subversion Repositories SmartDukaan

Rev

Rev 896 | Rev 1177 | Go to most recent revision | Details | Compare with Previous | 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
 
764 rajveer 33
    /**
34
     * For closing the open session in sqlalchemy
35
     */
36
    public void closeSession() throws TException;
37
 
553 chandransh 38
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException;
48 ashish 39
 
553 chandransh 40
    public User getUserById(long userId) throws UserContextException, TException;
48 ashish 41
 
553 chandransh 42
    public User createUser(User user) throws UserContextException, TException;
48 ashish 43
 
553 chandransh 44
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 45
 
553 chandransh 46
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 47
 
553 chandransh 48
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 49
 
553 chandransh 50
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 51
 
52
    public boolean userExists(String email) throws UserContextException, TException;
53
 
571 rajveer 54
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 55
 
56
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
57
 
58
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
59
 
60
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
61
 
506 rajveer 62
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
63
 
593 rajveer 64
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 65
 
896 rajveer 66
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException;
582 rajveer 67
 
593 rajveer 68
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
69
 
70
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
71
 
784 rajveer 72
    public String getDefaultPincode(long userId) throws UserContextException, TException;
73
 
553 chandransh 74
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 75
 
553 chandransh 76
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 77
 
553 chandransh 78
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 79
 
553 chandransh 80
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 81
 
553 chandransh 82
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 83
 
553 chandransh 84
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 85
 
553 chandransh 86
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 87
 
553 chandransh 88
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 89
 
553 chandransh 90
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
91
 
92
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
93
 
94
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
95
 
578 chandransh 96
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 97
 
688 chandransh 98
    /**
99
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
100
     * 
101
     * @param cartId
102
     */
103
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 104
 
688 chandransh 105
    /**
106
     * Validates that:
107
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
108
     * 2. None of the lines in the cart for an inactive item.
109
     * 3. The estimate for any of the lines in cart doesn't change.
110
     * Returns true only if all three hold.
111
     * 
112
     * @param cartId
113
     */
578 chandransh 114
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 115
 
688 chandransh 116
    /**
117
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
118
     * 
119
     * @param fromCartId
120
     * @param toCartId
121
     */
553 chandransh 122
    public void mergeCart(long fromCartId, long toCartId) throws TException;
123
 
688 chandransh 124
    /**
125
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
126
     * 
127
     * @param cartId
128
     */
129
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
130
 
131
    /**
132
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
133
     * This methods removes the specified quantiry of the specified item from the cart.
134
     * 
135
     * @param cartId
136
     * @param items
137
     */
708 rajveer 138
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 139
 
771 rajveer 140
    /**
141
     * Widgets
142
     * 
143
     * @param userId
144
     */
145
    public Widget getMyResearch(long userId) throws WidgetException, TException;
553 chandransh 146
 
771 rajveer 147
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 148
 
771 rajveer 149
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 150
 
771 rajveer 151
    public void updateBrowseHistory(long userId, long itemId) throws TException;
553 chandransh 152
 
771 rajveer 153
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
553 chandransh 154
 
771 rajveer 155
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
553 chandransh 156
 
48 ashish 157
  }
158
 
159
  public static class Client implements Iface {
160
    public Client(TProtocol prot)
161
    {
162
      this(prot, prot);
163
    }
164
 
165
    public Client(TProtocol iprot, TProtocol oprot)
166
    {
167
      iprot_ = iprot;
168
      oprot_ = oprot;
169
    }
170
 
171
    protected TProtocol iprot_;
172
    protected TProtocol oprot_;
173
 
174
    protected int seqid_;
175
 
176
    public TProtocol getInputProtocol()
177
    {
178
      return this.iprot_;
179
    }
180
 
181
    public TProtocol getOutputProtocol()
182
    {
183
      return this.oprot_;
184
    }
185
 
764 rajveer 186
    public void closeSession() throws TException
187
    {
188
      send_closeSession();
189
      recv_closeSession();
190
    }
191
 
192
    public void send_closeSession() throws TException
193
    {
194
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
195
      closeSession_args args = new closeSession_args();
196
      args.write(oprot_);
197
      oprot_.writeMessageEnd();
198
      oprot_.getTransport().flush();
199
    }
200
 
201
    public void recv_closeSession() throws TException
202
    {
203
      TMessage msg = iprot_.readMessageBegin();
204
      if (msg.type == TMessageType.EXCEPTION) {
205
        TApplicationException x = TApplicationException.read(iprot_);
206
        iprot_.readMessageEnd();
207
        throw x;
208
      }
209
      closeSession_result result = new closeSession_result();
210
      result.read(iprot_);
211
      iprot_.readMessageEnd();
212
      return;
213
    }
214
 
553 chandransh 215
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 216
    {
553 chandransh 217
      send_createAnonymousUser(jsessionId);
218
      return recv_createAnonymousUser();
48 ashish 219
    }
220
 
553 chandransh 221
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 222
    {
553 chandransh 223
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
224
      createAnonymousUser_args args = new createAnonymousUser_args();
225
      args.jsessionId = jsessionId;
48 ashish 226
      args.write(oprot_);
227
      oprot_.writeMessageEnd();
228
      oprot_.getTransport().flush();
229
    }
230
 
553 chandransh 231
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 232
    {
233
      TMessage msg = iprot_.readMessageBegin();
234
      if (msg.type == TMessageType.EXCEPTION) {
235
        TApplicationException x = TApplicationException.read(iprot_);
236
        iprot_.readMessageEnd();
237
        throw x;
238
      }
553 chandransh 239
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 240
      result.read(iprot_);
241
      iprot_.readMessageEnd();
242
      if (result.isSetSuccess()) {
243
        return result.success;
244
      }
553 chandransh 245
      if (result.ucex != null) {
246
        throw result.ucex;
48 ashish 247
      }
553 chandransh 248
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 249
    }
250
 
553 chandransh 251
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 252
    {
553 chandransh 253
      send_getUserById(userId);
254
      return recv_getUserById();
48 ashish 255
    }
256
 
553 chandransh 257
    public void send_getUserById(long userId) throws TException
48 ashish 258
    {
553 chandransh 259
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
260
      getUserById_args args = new getUserById_args();
48 ashish 261
      args.userId = userId;
262
      args.write(oprot_);
263
      oprot_.writeMessageEnd();
264
      oprot_.getTransport().flush();
265
    }
266
 
553 chandransh 267
    public User recv_getUserById() throws UserContextException, TException
48 ashish 268
    {
269
      TMessage msg = iprot_.readMessageBegin();
270
      if (msg.type == TMessageType.EXCEPTION) {
271
        TApplicationException x = TApplicationException.read(iprot_);
272
        iprot_.readMessageEnd();
273
        throw x;
274
      }
553 chandransh 275
      getUserById_result result = new getUserById_result();
48 ashish 276
      result.read(iprot_);
277
      iprot_.readMessageEnd();
278
      if (result.isSetSuccess()) {
279
        return result.success;
280
      }
553 chandransh 281
      if (result.ucex != null) {
282
        throw result.ucex;
48 ashish 283
      }
553 chandransh 284
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 285
    }
286
 
553 chandransh 287
    public User createUser(User user) throws UserContextException, TException
48 ashish 288
    {
553 chandransh 289
      send_createUser(user);
290
      return recv_createUser();
48 ashish 291
    }
292
 
553 chandransh 293
    public void send_createUser(User user) throws TException
48 ashish 294
    {
553 chandransh 295
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
296
      createUser_args args = new createUser_args();
297
      args.user = user;
48 ashish 298
      args.write(oprot_);
299
      oprot_.writeMessageEnd();
300
      oprot_.getTransport().flush();
301
    }
302
 
553 chandransh 303
    public User recv_createUser() throws UserContextException, TException
48 ashish 304
    {
305
      TMessage msg = iprot_.readMessageBegin();
306
      if (msg.type == TMessageType.EXCEPTION) {
307
        TApplicationException x = TApplicationException.read(iprot_);
308
        iprot_.readMessageEnd();
309
        throw x;
310
      }
553 chandransh 311
      createUser_result result = new createUser_result();
48 ashish 312
      result.read(iprot_);
313
      iprot_.readMessageEnd();
314
      if (result.isSetSuccess()) {
315
        return result.success;
316
      }
553 chandransh 317
      if (result.ucex != null) {
318
        throw result.ucex;
48 ashish 319
      }
553 chandransh 320
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 321
    }
322
 
553 chandransh 323
    public User updateUser(User user) throws UserContextException, TException
48 ashish 324
    {
553 chandransh 325
      send_updateUser(user);
326
      return recv_updateUser();
48 ashish 327
    }
328
 
553 chandransh 329
    public void send_updateUser(User user) throws TException
48 ashish 330
    {
553 chandransh 331
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
332
      updateUser_args args = new updateUser_args();
333
      args.user = user;
48 ashish 334
      args.write(oprot_);
335
      oprot_.writeMessageEnd();
336
      oprot_.getTransport().flush();
337
    }
338
 
553 chandransh 339
    public User recv_updateUser() throws UserContextException, TException
48 ashish 340
    {
341
      TMessage msg = iprot_.readMessageBegin();
342
      if (msg.type == TMessageType.EXCEPTION) {
343
        TApplicationException x = TApplicationException.read(iprot_);
344
        iprot_.readMessageEnd();
345
        throw x;
346
      }
553 chandransh 347
      updateUser_result result = new updateUser_result();
48 ashish 348
      result.read(iprot_);
349
      iprot_.readMessageEnd();
350
      if (result.isSetSuccess()) {
351
        return result.success;
352
      }
553 chandransh 353
      if (result.ucex != null) {
354
        throw result.ucex;
48 ashish 355
      }
553 chandransh 356
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 357
    }
358
 
553 chandransh 359
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 360
    {
553 chandransh 361
      send_deleteUser(userId);
362
      return recv_deleteUser();
48 ashish 363
    }
364
 
553 chandransh 365
    public void send_deleteUser(long userId) throws TException
48 ashish 366
    {
553 chandransh 367
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
368
      deleteUser_args args = new deleteUser_args();
48 ashish 369
      args.userId = userId;
370
      args.write(oprot_);
371
      oprot_.writeMessageEnd();
372
      oprot_.getTransport().flush();
373
    }
374
 
553 chandransh 375
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 376
    {
377
      TMessage msg = iprot_.readMessageBegin();
378
      if (msg.type == TMessageType.EXCEPTION) {
379
        TApplicationException x = TApplicationException.read(iprot_);
380
        iprot_.readMessageEnd();
381
        throw x;
382
      }
553 chandransh 383
      deleteUser_result result = new deleteUser_result();
48 ashish 384
      result.read(iprot_);
385
      iprot_.readMessageEnd();
386
      if (result.isSetSuccess()) {
387
        return result.success;
388
      }
553 chandransh 389
      if (result.ucex != null) {
390
        throw result.ucex;
48 ashish 391
      }
553 chandransh 392
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 393
    }
394
 
553 chandransh 395
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 396
    {
553 chandransh 397
      send_getUserState(userId);
398
      return recv_getUserState();
48 ashish 399
    }
400
 
553 chandransh 401
    public void send_getUserState(long userId) throws TException
48 ashish 402
    {
553 chandransh 403
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
404
      getUserState_args args = new getUserState_args();
48 ashish 405
      args.userId = userId;
406
      args.write(oprot_);
407
      oprot_.writeMessageEnd();
408
      oprot_.getTransport().flush();
409
    }
410
 
553 chandransh 411
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 412
    {
413
      TMessage msg = iprot_.readMessageBegin();
414
      if (msg.type == TMessageType.EXCEPTION) {
415
        TApplicationException x = TApplicationException.read(iprot_);
416
        iprot_.readMessageEnd();
417
        throw x;
418
      }
553 chandransh 419
      getUserState_result result = new getUserState_result();
48 ashish 420
      result.read(iprot_);
421
      iprot_.readMessageEnd();
422
      if (result.isSetSuccess()) {
423
        return result.success;
424
      }
553 chandransh 425
      if (result.ucex != null) {
426
        throw result.ucex;
48 ashish 427
      }
553 chandransh 428
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 429
    }
430
 
553 chandransh 431
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 432
    {
553 chandransh 433
      send_authenticateUser(email, password);
123 ashish 434
      return recv_authenticateUser();
435
    }
436
 
553 chandransh 437
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 438
    {
439
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
440
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 441
      args.email = email;
123 ashish 442
      args.password = password;
443
      args.write(oprot_);
444
      oprot_.writeMessageEnd();
445
      oprot_.getTransport().flush();
446
    }
447
 
553 chandransh 448
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 449
    {
450
      TMessage msg = iprot_.readMessageBegin();
451
      if (msg.type == TMessageType.EXCEPTION) {
452
        TApplicationException x = TApplicationException.read(iprot_);
453
        iprot_.readMessageEnd();
454
        throw x;
455
      }
456
      authenticateUser_result result = new authenticateUser_result();
457
      result.read(iprot_);
458
      iprot_.readMessageEnd();
459
      if (result.isSetSuccess()) {
460
        return result.success;
461
      }
553 chandransh 462
      if (result.auex != null) {
463
        throw result.auex;
123 ashish 464
      }
465
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
466
    }
467
 
48 ashish 468
    public boolean userExists(String email) throws UserContextException, TException
469
    {
470
      send_userExists(email);
471
      return recv_userExists();
472
    }
473
 
474
    public void send_userExists(String email) throws TException
475
    {
476
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
477
      userExists_args args = new userExists_args();
478
      args.email = email;
479
      args.write(oprot_);
480
      oprot_.writeMessageEnd();
481
      oprot_.getTransport().flush();
482
    }
483
 
484
    public boolean recv_userExists() throws UserContextException, TException
485
    {
486
      TMessage msg = iprot_.readMessageBegin();
487
      if (msg.type == TMessageType.EXCEPTION) {
488
        TApplicationException x = TApplicationException.read(iprot_);
489
        iprot_.readMessageEnd();
490
        throw x;
491
      }
492
      userExists_result result = new userExists_result();
493
      result.read(iprot_);
494
      iprot_.readMessageEnd();
495
      if (result.isSetSuccess()) {
496
        return result.success;
497
      }
498
      if (result.ucx != null) {
499
        throw result.ucx;
500
      }
501
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
502
    }
503
 
571 rajveer 504
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 505
    {
571 rajveer 506
      send_addAddressForUser(userId, address, setDefault);
48 ashish 507
      return recv_addAddressForUser();
508
    }
509
 
571 rajveer 510
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 511
    {
512
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
513
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 514
      args.userId = userId;
48 ashish 515
      args.address = address;
513 rajveer 516
      args.setDefault = setDefault;
48 ashish 517
      args.write(oprot_);
518
      oprot_.writeMessageEnd();
519
      oprot_.getTransport().flush();
520
    }
521
 
571 rajveer 522
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 523
    {
524
      TMessage msg = iprot_.readMessageBegin();
525
      if (msg.type == TMessageType.EXCEPTION) {
526
        TApplicationException x = TApplicationException.read(iprot_);
527
        iprot_.readMessageEnd();
528
        throw x;
529
      }
530
      addAddressForUser_result result = new addAddressForUser_result();
531
      result.read(iprot_);
532
      iprot_.readMessageEnd();
533
      if (result.isSetSuccess()) {
534
        return result.success;
535
      }
536
      if (result.ucx != null) {
537
        throw result.ucx;
538
      }
539
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
540
    }
541
 
542
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
543
    {
544
      send_removeAddressForUser(userid, addressId);
545
      return recv_removeAddressForUser();
546
    }
547
 
548
    public void send_removeAddressForUser(long userid, long addressId) throws TException
549
    {
550
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
551
      removeAddressForUser_args args = new removeAddressForUser_args();
552
      args.userid = userid;
553
      args.addressId = addressId;
554
      args.write(oprot_);
555
      oprot_.writeMessageEnd();
556
      oprot_.getTransport().flush();
557
    }
558
 
559
    public boolean recv_removeAddressForUser() throws UserContextException, TException
560
    {
561
      TMessage msg = iprot_.readMessageBegin();
562
      if (msg.type == TMessageType.EXCEPTION) {
563
        TApplicationException x = TApplicationException.read(iprot_);
564
        iprot_.readMessageEnd();
565
        throw x;
566
      }
567
      removeAddressForUser_result result = new removeAddressForUser_result();
568
      result.read(iprot_);
569
      iprot_.readMessageEnd();
570
      if (result.isSetSuccess()) {
571
        return result.success;
572
      }
573
      if (result.ucx != null) {
574
        throw result.ucx;
575
      }
576
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
577
    }
578
 
579
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
580
    {
581
      send_setUserAsLoggedIn(userId, timestamp);
582
      return recv_setUserAsLoggedIn();
583
    }
584
 
585
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
586
    {
587
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
588
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
589
      args.userId = userId;
590
      args.timestamp = timestamp;
591
      args.write(oprot_);
592
      oprot_.writeMessageEnd();
593
      oprot_.getTransport().flush();
594
    }
595
 
596
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
597
    {
598
      TMessage msg = iprot_.readMessageBegin();
599
      if (msg.type == TMessageType.EXCEPTION) {
600
        TApplicationException x = TApplicationException.read(iprot_);
601
        iprot_.readMessageEnd();
602
        throw x;
603
      }
604
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
605
      result.read(iprot_);
606
      iprot_.readMessageEnd();
607
      if (result.isSetSuccess()) {
608
        return result.success;
609
      }
610
      if (result.ucx != null) {
611
        throw result.ucx;
612
      }
613
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
614
    }
615
 
616
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
617
    {
618
      send_setUserAsLoggedOut(userid, timestamp);
619
      return recv_setUserAsLoggedOut();
620
    }
621
 
622
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
623
    {
624
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
625
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
626
      args.userid = userid;
627
      args.timestamp = timestamp;
628
      args.write(oprot_);
629
      oprot_.writeMessageEnd();
630
      oprot_.getTransport().flush();
631
    }
632
 
633
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
634
    {
635
      TMessage msg = iprot_.readMessageBegin();
636
      if (msg.type == TMessageType.EXCEPTION) {
637
        TApplicationException x = TApplicationException.read(iprot_);
638
        iprot_.readMessageEnd();
639
        throw x;
640
      }
641
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
642
      result.read(iprot_);
643
      iprot_.readMessageEnd();
644
      if (result.isSetSuccess()) {
645
        return result.success;
646
      }
647
      if (result.ucx != null) {
648
        throw result.ucx;
649
      }
650
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
651
    }
652
 
506 rajveer 653
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
654
    {
655
      send_setDefaultAddress(userid, addressId);
656
      return recv_setDefaultAddress();
657
    }
658
 
659
    public void send_setDefaultAddress(long userid, long addressId) throws TException
660
    {
661
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
662
      setDefaultAddress_args args = new setDefaultAddress_args();
663
      args.userid = userid;
664
      args.addressId = addressId;
665
      args.write(oprot_);
666
      oprot_.writeMessageEnd();
667
      oprot_.getTransport().flush();
668
    }
669
 
670
    public boolean recv_setDefaultAddress() throws UserContextException, TException
671
    {
672
      TMessage msg = iprot_.readMessageBegin();
673
      if (msg.type == TMessageType.EXCEPTION) {
674
        TApplicationException x = TApplicationException.read(iprot_);
675
        iprot_.readMessageEnd();
676
        throw x;
677
      }
678
      setDefaultAddress_result result = new setDefaultAddress_result();
679
      result.read(iprot_);
680
      iprot_.readMessageEnd();
681
      if (result.isSetSuccess()) {
682
        return result.success;
683
      }
684
      if (result.ucx != null) {
685
        throw result.ucx;
686
      }
687
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
688
    }
689
 
593 rajveer 690
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 691
    {
593 rajveer 692
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 693
      return recv_updatePassword();
694
    }
695
 
593 rajveer 696
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 697
    {
698
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
699
      updatePassword_args args = new updatePassword_args();
700
      args.userid = userid;
593 rajveer 701
      args.oldPassword = oldPassword;
702
      args.newPassword = newPassword;
48 ashish 703
      args.write(oprot_);
704
      oprot_.writeMessageEnd();
705
      oprot_.getTransport().flush();
706
    }
707
 
708
    public boolean recv_updatePassword() throws UserContextException, TException
709
    {
710
      TMessage msg = iprot_.readMessageBegin();
711
      if (msg.type == TMessageType.EXCEPTION) {
712
        TApplicationException x = TApplicationException.read(iprot_);
713
        iprot_.readMessageEnd();
714
        throw x;
715
      }
716
      updatePassword_result result = new updatePassword_result();
717
      result.read(iprot_);
718
      iprot_.readMessageEnd();
719
      if (result.isSetSuccess()) {
720
        return result.success;
721
      }
722
      if (result.ucx != null) {
723
        throw result.ucx;
724
      }
725
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
726
    }
727
 
896 rajveer 728
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException
582 rajveer 729
    {
896 rajveer 730
      send_forgotPassword(email, newPassword);
582 rajveer 731
      return recv_forgotPassword();
732
    }
733
 
896 rajveer 734
    public void send_forgotPassword(String email, String newPassword) throws TException
582 rajveer 735
    {
736
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
737
      forgotPassword_args args = new forgotPassword_args();
738
      args.email = email;
896 rajveer 739
      args.newPassword = newPassword;
582 rajveer 740
      args.write(oprot_);
741
      oprot_.writeMessageEnd();
742
      oprot_.getTransport().flush();
743
    }
744
 
745
    public boolean recv_forgotPassword() throws UserContextException, TException
746
    {
747
      TMessage msg = iprot_.readMessageBegin();
748
      if (msg.type == TMessageType.EXCEPTION) {
749
        TApplicationException x = TApplicationException.read(iprot_);
750
        iprot_.readMessageEnd();
751
        throw x;
752
      }
753
      forgotPassword_result result = new forgotPassword_result();
754
      result.read(iprot_);
755
      iprot_.readMessageEnd();
756
      if (result.isSetSuccess()) {
757
        return result.success;
758
      }
759
      if (result.ucx != null) {
760
        throw result.ucx;
761
      }
762
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
763
    }
764
 
593 rajveer 765
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
766
    {
767
      send_getAllAddressesForUser(userId);
768
      return recv_getAllAddressesForUser();
769
    }
770
 
771
    public void send_getAllAddressesForUser(long userId) throws TException
772
    {
773
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
774
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
775
      args.userId = userId;
776
      args.write(oprot_);
777
      oprot_.writeMessageEnd();
778
      oprot_.getTransport().flush();
779
    }
780
 
781
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
782
    {
783
      TMessage msg = iprot_.readMessageBegin();
784
      if (msg.type == TMessageType.EXCEPTION) {
785
        TApplicationException x = TApplicationException.read(iprot_);
786
        iprot_.readMessageEnd();
787
        throw x;
788
      }
789
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
790
      result.read(iprot_);
791
      iprot_.readMessageEnd();
792
      if (result.isSetSuccess()) {
793
        return result.success;
794
      }
795
      if (result.ucx != null) {
796
        throw result.ucx;
797
      }
798
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
799
    }
800
 
801
    public long getDefaultAddressId(long userId) throws UserContextException, TException
802
    {
803
      send_getDefaultAddressId(userId);
804
      return recv_getDefaultAddressId();
805
    }
806
 
807
    public void send_getDefaultAddressId(long userId) throws TException
808
    {
809
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
810
      getDefaultAddressId_args args = new getDefaultAddressId_args();
811
      args.userId = userId;
812
      args.write(oprot_);
813
      oprot_.writeMessageEnd();
814
      oprot_.getTransport().flush();
815
    }
816
 
817
    public long recv_getDefaultAddressId() throws UserContextException, TException
818
    {
819
      TMessage msg = iprot_.readMessageBegin();
820
      if (msg.type == TMessageType.EXCEPTION) {
821
        TApplicationException x = TApplicationException.read(iprot_);
822
        iprot_.readMessageEnd();
823
        throw x;
824
      }
825
      getDefaultAddressId_result result = new getDefaultAddressId_result();
826
      result.read(iprot_);
827
      iprot_.readMessageEnd();
828
      if (result.isSetSuccess()) {
829
        return result.success;
830
      }
831
      if (result.ucx != null) {
832
        throw result.ucx;
833
      }
834
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
835
    }
836
 
784 rajveer 837
    public String getDefaultPincode(long userId) throws UserContextException, TException
838
    {
839
      send_getDefaultPincode(userId);
840
      return recv_getDefaultPincode();
841
    }
842
 
843
    public void send_getDefaultPincode(long userId) throws TException
844
    {
845
      oprot_.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.CALL, seqid_));
846
      getDefaultPincode_args args = new getDefaultPincode_args();
847
      args.userId = userId;
848
      args.write(oprot_);
849
      oprot_.writeMessageEnd();
850
      oprot_.getTransport().flush();
851
    }
852
 
853
    public String recv_getDefaultPincode() throws UserContextException, TException
854
    {
855
      TMessage msg = iprot_.readMessageBegin();
856
      if (msg.type == TMessageType.EXCEPTION) {
857
        TApplicationException x = TApplicationException.read(iprot_);
858
        iprot_.readMessageEnd();
859
        throw x;
860
      }
861
      getDefaultPincode_result result = new getDefaultPincode_result();
862
      result.read(iprot_);
863
      iprot_.readMessageEnd();
864
      if (result.isSetSuccess()) {
865
        return result.success;
866
      }
867
      if (result.ucx != null) {
868
        throw result.ucx;
869
      }
870
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
871
    }
872
 
553 chandransh 873
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 874
    {
553 chandransh 875
      send_createCart(userId);
876
      return recv_createCart();
48 ashish 877
    }
878
 
553 chandransh 879
    public void send_createCart(long userId) throws TException
48 ashish 880
    {
553 chandransh 881
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
882
      createCart_args args = new createCart_args();
883
      args.userId = userId;
48 ashish 884
      args.write(oprot_);
885
      oprot_.writeMessageEnd();
886
      oprot_.getTransport().flush();
887
    }
888
 
553 chandransh 889
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 890
    {
891
      TMessage msg = iprot_.readMessageBegin();
892
      if (msg.type == TMessageType.EXCEPTION) {
893
        TApplicationException x = TApplicationException.read(iprot_);
894
        iprot_.readMessageEnd();
895
        throw x;
896
      }
553 chandransh 897
      createCart_result result = new createCart_result();
48 ashish 898
      result.read(iprot_);
899
      iprot_.readMessageEnd();
900
      if (result.isSetSuccess()) {
901
        return result.success;
902
      }
553 chandransh 903
      if (result.scx != null) {
904
        throw result.scx;
48 ashish 905
      }
553 chandransh 906
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 907
    }
908
 
553 chandransh 909
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 910
    {
553 chandransh 911
      send_getCurrentCart(userId);
912
      return recv_getCurrentCart();
48 ashish 913
    }
914
 
553 chandransh 915
    public void send_getCurrentCart(long userId) throws TException
48 ashish 916
    {
553 chandransh 917
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
918
      getCurrentCart_args args = new getCurrentCart_args();
919
      args.userId = userId;
48 ashish 920
      args.write(oprot_);
921
      oprot_.writeMessageEnd();
922
      oprot_.getTransport().flush();
923
    }
924
 
553 chandransh 925
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 926
    {
927
      TMessage msg = iprot_.readMessageBegin();
928
      if (msg.type == TMessageType.EXCEPTION) {
929
        TApplicationException x = TApplicationException.read(iprot_);
930
        iprot_.readMessageEnd();
931
        throw x;
932
      }
553 chandransh 933
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 934
      result.read(iprot_);
935
      iprot_.readMessageEnd();
936
      if (result.isSetSuccess()) {
937
        return result.success;
938
      }
553 chandransh 939
      if (result.scx != null) {
940
        throw result.scx;
48 ashish 941
      }
553 chandransh 942
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 943
    }
944
 
553 chandransh 945
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 946
    {
553 chandransh 947
      send_getCart(cartId);
948
      return recv_getCart();
48 ashish 949
    }
950
 
553 chandransh 951
    public void send_getCart(long cartId) throws TException
48 ashish 952
    {
553 chandransh 953
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
954
      getCart_args args = new getCart_args();
955
      args.cartId = cartId;
48 ashish 956
      args.write(oprot_);
957
      oprot_.writeMessageEnd();
958
      oprot_.getTransport().flush();
959
    }
960
 
553 chandransh 961
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 962
    {
963
      TMessage msg = iprot_.readMessageBegin();
964
      if (msg.type == TMessageType.EXCEPTION) {
965
        TApplicationException x = TApplicationException.read(iprot_);
966
        iprot_.readMessageEnd();
967
        throw x;
968
      }
553 chandransh 969
      getCart_result result = new getCart_result();
48 ashish 970
      result.read(iprot_);
971
      iprot_.readMessageEnd();
972
      if (result.isSetSuccess()) {
973
        return result.success;
974
      }
553 chandransh 975
      if (result.scx != null) {
976
        throw result.scx;
48 ashish 977
      }
553 chandransh 978
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 979
    }
980
 
553 chandransh 981
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 982
    {
553 chandransh 983
      send_getCartsForUser(userId, status);
984
      return recv_getCartsForUser();
48 ashish 985
    }
986
 
553 chandransh 987
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 988
    {
553 chandransh 989
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
990
      getCartsForUser_args args = new getCartsForUser_args();
991
      args.userId = userId;
992
      args.status = status;
48 ashish 993
      args.write(oprot_);
994
      oprot_.writeMessageEnd();
995
      oprot_.getTransport().flush();
996
    }
997
 
553 chandransh 998
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 999
    {
1000
      TMessage msg = iprot_.readMessageBegin();
1001
      if (msg.type == TMessageType.EXCEPTION) {
1002
        TApplicationException x = TApplicationException.read(iprot_);
1003
        iprot_.readMessageEnd();
1004
        throw x;
1005
      }
553 chandransh 1006
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 1007
      result.read(iprot_);
1008
      iprot_.readMessageEnd();
1009
      if (result.isSetSuccess()) {
1010
        return result.success;
1011
      }
553 chandransh 1012
      if (result.scx != null) {
1013
        throw result.scx;
48 ashish 1014
      }
553 chandransh 1015
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 1016
    }
1017
 
553 chandransh 1018
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 1019
    {
553 chandransh 1020
      send_getCartsByStatus(status);
1021
      return recv_getCartsByStatus();
48 ashish 1022
    }
1023
 
553 chandransh 1024
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 1025
    {
553 chandransh 1026
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
1027
      getCartsByStatus_args args = new getCartsByStatus_args();
1028
      args.status = status;
48 ashish 1029
      args.write(oprot_);
1030
      oprot_.writeMessageEnd();
1031
      oprot_.getTransport().flush();
1032
    }
1033
 
553 chandransh 1034
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 1035
    {
1036
      TMessage msg = iprot_.readMessageBegin();
1037
      if (msg.type == TMessageType.EXCEPTION) {
1038
        TApplicationException x = TApplicationException.read(iprot_);
1039
        iprot_.readMessageEnd();
1040
        throw x;
1041
      }
553 chandransh 1042
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1043
      result.read(iprot_);
1044
      iprot_.readMessageEnd();
1045
      if (result.isSetSuccess()) {
1046
        return result.success;
1047
      }
553 chandransh 1048
      if (result.scx != null) {
1049
        throw result.scx;
48 ashish 1050
      }
553 chandransh 1051
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1052
    }
1053
 
553 chandransh 1054
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1055
    {
553 chandransh 1056
      send_getCartsByTime(from_time, to_time, status);
1057
      return recv_getCartsByTime();
48 ashish 1058
    }
1059
 
553 chandransh 1060
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1061
    {
553 chandransh 1062
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1063
      getCartsByTime_args args = new getCartsByTime_args();
1064
      args.from_time = from_time;
1065
      args.to_time = to_time;
1066
      args.status = status;
48 ashish 1067
      args.write(oprot_);
1068
      oprot_.writeMessageEnd();
1069
      oprot_.getTransport().flush();
1070
    }
1071
 
553 chandransh 1072
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 1073
    {
1074
      TMessage msg = iprot_.readMessageBegin();
1075
      if (msg.type == TMessageType.EXCEPTION) {
1076
        TApplicationException x = TApplicationException.read(iprot_);
1077
        iprot_.readMessageEnd();
1078
        throw x;
1079
      }
553 chandransh 1080
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 1081
      result.read(iprot_);
1082
      iprot_.readMessageEnd();
1083
      if (result.isSetSuccess()) {
1084
        return result.success;
1085
      }
553 chandransh 1086
      if (result.scx != null) {
1087
        throw result.scx;
48 ashish 1088
      }
553 chandransh 1089
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 1090
    }
1091
 
553 chandransh 1092
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1093
    {
553 chandransh 1094
      send_changeCartStatus(cartId, status);
1095
      recv_changeCartStatus();
130 ashish 1096
    }
1097
 
553 chandransh 1098
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1099
    {
553 chandransh 1100
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1101
      changeCartStatus_args args = new changeCartStatus_args();
1102
      args.cartId = cartId;
1103
      args.status = status;
130 ashish 1104
      args.write(oprot_);
1105
      oprot_.writeMessageEnd();
1106
      oprot_.getTransport().flush();
1107
    }
1108
 
553 chandransh 1109
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1110
    {
1111
      TMessage msg = iprot_.readMessageBegin();
1112
      if (msg.type == TMessageType.EXCEPTION) {
1113
        TApplicationException x = TApplicationException.read(iprot_);
1114
        iprot_.readMessageEnd();
1115
        throw x;
1116
      }
553 chandransh 1117
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1118
      result.read(iprot_);
1119
      iprot_.readMessageEnd();
553 chandransh 1120
      if (result.scx != null) {
1121
        throw result.scx;
1122
      }
1123
      return;
1124
    }
1125
 
1126
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1127
    {
1128
      send_addItemToCart(cartId, itemId, quantity);
1129
      recv_addItemToCart();
1130
    }
1131
 
1132
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1133
    {
1134
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1135
      addItemToCart_args args = new addItemToCart_args();
1136
      args.cartId = cartId;
1137
      args.itemId = itemId;
1138
      args.quantity = quantity;
1139
      args.write(oprot_);
1140
      oprot_.writeMessageEnd();
1141
      oprot_.getTransport().flush();
1142
    }
1143
 
1144
    public void recv_addItemToCart() throws ShoppingCartException, TException
1145
    {
1146
      TMessage msg = iprot_.readMessageBegin();
1147
      if (msg.type == TMessageType.EXCEPTION) {
1148
        TApplicationException x = TApplicationException.read(iprot_);
1149
        iprot_.readMessageEnd();
1150
        throw x;
1151
      }
1152
      addItemToCart_result result = new addItemToCart_result();
1153
      result.read(iprot_);
1154
      iprot_.readMessageEnd();
1155
      if (result.scx != null) {
1156
        throw result.scx;
1157
      }
1158
      return;
1159
    }
1160
 
1161
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1162
    {
1163
      send_deleteItemFromCart(cartId, itemId);
1164
      recv_deleteItemFromCart();
1165
    }
1166
 
1167
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1168
    {
1169
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1170
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1171
      args.cartId = cartId;
1172
      args.itemId = itemId;
1173
      args.write(oprot_);
1174
      oprot_.writeMessageEnd();
1175
      oprot_.getTransport().flush();
1176
    }
1177
 
1178
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1179
    {
1180
      TMessage msg = iprot_.readMessageBegin();
1181
      if (msg.type == TMessageType.EXCEPTION) {
1182
        TApplicationException x = TApplicationException.read(iprot_);
1183
        iprot_.readMessageEnd();
1184
        throw x;
1185
      }
1186
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1187
      result.read(iprot_);
1188
      iprot_.readMessageEnd();
1189
      if (result.scx != null) {
1190
        throw result.scx;
1191
      }
1192
      return;
1193
    }
1194
 
1195
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1196
    {
1197
      send_changeQuantity(cartId, itemId, quantity);
1198
      recv_changeQuantity();
1199
    }
1200
 
1201
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1202
    {
1203
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1204
      changeQuantity_args args = new changeQuantity_args();
1205
      args.cartId = cartId;
1206
      args.itemId = itemId;
1207
      args.quantity = quantity;
1208
      args.write(oprot_);
1209
      oprot_.writeMessageEnd();
1210
      oprot_.getTransport().flush();
1211
    }
1212
 
1213
    public void recv_changeQuantity() throws ShoppingCartException, TException
1214
    {
1215
      TMessage msg = iprot_.readMessageBegin();
1216
      if (msg.type == TMessageType.EXCEPTION) {
1217
        TApplicationException x = TApplicationException.read(iprot_);
1218
        iprot_.readMessageEnd();
1219
        throw x;
1220
      }
1221
      changeQuantity_result result = new changeQuantity_result();
1222
      result.read(iprot_);
1223
      iprot_.readMessageEnd();
1224
      if (result.scx != null) {
1225
        throw result.scx;
1226
      }
1227
      return;
1228
    }
1229
 
1230
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1231
    {
1232
      send_changeItemStatus(cartId, itemId, status);
1233
      recv_changeItemStatus();
1234
    }
1235
 
1236
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1237
    {
1238
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1239
      changeItemStatus_args args = new changeItemStatus_args();
1240
      args.cartId = cartId;
1241
      args.itemId = itemId;
1242
      args.status = status;
1243
      args.write(oprot_);
1244
      oprot_.writeMessageEnd();
1245
      oprot_.getTransport().flush();
1246
    }
1247
 
1248
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1249
    {
1250
      TMessage msg = iprot_.readMessageBegin();
1251
      if (msg.type == TMessageType.EXCEPTION) {
1252
        TApplicationException x = TApplicationException.read(iprot_);
1253
        iprot_.readMessageEnd();
1254
        throw x;
1255
      }
1256
      changeItemStatus_result result = new changeItemStatus_result();
1257
      result.read(iprot_);
1258
      iprot_.readMessageEnd();
1259
      if (result.scx != null) {
1260
        throw result.scx;
1261
      }
1262
      return;
1263
    }
1264
 
578 chandransh 1265
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1266
    {
1267
      send_addAddressToCart(cartId, addressId);
1268
      recv_addAddressToCart();
1269
    }
1270
 
1271
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1272
    {
1273
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1274
      addAddressToCart_args args = new addAddressToCart_args();
1275
      args.cartId = cartId;
1276
      args.addressId = addressId;
1277
      args.write(oprot_);
1278
      oprot_.writeMessageEnd();
1279
      oprot_.getTransport().flush();
1280
    }
1281
 
578 chandransh 1282
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1283
    {
1284
      TMessage msg = iprot_.readMessageBegin();
1285
      if (msg.type == TMessageType.EXCEPTION) {
1286
        TApplicationException x = TApplicationException.read(iprot_);
1287
        iprot_.readMessageEnd();
1288
        throw x;
1289
      }
1290
      addAddressToCart_result result = new addAddressToCart_result();
1291
      result.read(iprot_);
1292
      iprot_.readMessageEnd();
578 chandransh 1293
      if (result.scx != null) {
1294
        throw result.scx;
1295
      }
553 chandransh 1296
      return;
1297
    }
1298
 
688 chandransh 1299
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1300
    {
688 chandransh 1301
      send_createOrders(cartId);
1302
      return recv_createOrders();
553 chandransh 1303
    }
1304
 
688 chandransh 1305
    public void send_createOrders(long cartId) throws TException
553 chandransh 1306
    {
688 chandransh 1307
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1308
      createOrders_args args = new createOrders_args();
553 chandransh 1309
      args.cartId = cartId;
1310
      args.write(oprot_);
1311
      oprot_.writeMessageEnd();
1312
      oprot_.getTransport().flush();
1313
    }
1314
 
688 chandransh 1315
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1316
    {
1317
      TMessage msg = iprot_.readMessageBegin();
1318
      if (msg.type == TMessageType.EXCEPTION) {
1319
        TApplicationException x = TApplicationException.read(iprot_);
1320
        iprot_.readMessageEnd();
1321
        throw x;
1322
      }
688 chandransh 1323
      createOrders_result result = new createOrders_result();
553 chandransh 1324
      result.read(iprot_);
1325
      iprot_.readMessageEnd();
130 ashish 1326
      if (result.isSetSuccess()) {
1327
        return result.success;
1328
      }
553 chandransh 1329
      if (result.scx != null) {
1330
        throw result.scx;
130 ashish 1331
      }
688 chandransh 1332
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1333
    }
1334
 
578 chandransh 1335
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1336
    {
553 chandransh 1337
      send_validateCart(cartId);
1338
      return recv_validateCart();
130 ashish 1339
    }
1340
 
553 chandransh 1341
    public void send_validateCart(long cartId) throws TException
130 ashish 1342
    {
553 chandransh 1343
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1344
      validateCart_args args = new validateCart_args();
1345
      args.cartId = cartId;
130 ashish 1346
      args.write(oprot_);
1347
      oprot_.writeMessageEnd();
1348
      oprot_.getTransport().flush();
1349
    }
1350
 
578 chandransh 1351
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1352
    {
1353
      TMessage msg = iprot_.readMessageBegin();
1354
      if (msg.type == TMessageType.EXCEPTION) {
1355
        TApplicationException x = TApplicationException.read(iprot_);
1356
        iprot_.readMessageEnd();
1357
        throw x;
1358
      }
553 chandransh 1359
      validateCart_result result = new validateCart_result();
130 ashish 1360
      result.read(iprot_);
1361
      iprot_.readMessageEnd();
1362
      if (result.isSetSuccess()) {
1363
        return result.success;
1364
      }
578 chandransh 1365
      if (result.scex != null) {
1366
        throw result.scex;
1367
      }
553 chandransh 1368
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1369
    }
1370
 
688 chandransh 1371
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1372
    {
688 chandransh 1373
      send_mergeCart(fromCartId, toCartId);
1374
      recv_mergeCart();
578 chandransh 1375
    }
1376
 
688 chandransh 1377
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1378
    {
688 chandransh 1379
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1380
      mergeCart_args args = new mergeCart_args();
1381
      args.fromCartId = fromCartId;
1382
      args.toCartId = toCartId;
1383
      args.write(oprot_);
1384
      oprot_.writeMessageEnd();
1385
      oprot_.getTransport().flush();
1386
    }
1387
 
1388
    public void recv_mergeCart() throws TException
1389
    {
1390
      TMessage msg = iprot_.readMessageBegin();
1391
      if (msg.type == TMessageType.EXCEPTION) {
1392
        TApplicationException x = TApplicationException.read(iprot_);
1393
        iprot_.readMessageEnd();
1394
        throw x;
1395
      }
1396
      mergeCart_result result = new mergeCart_result();
1397
      result.read(iprot_);
1398
      iprot_.readMessageEnd();
1399
      return;
1400
    }
1401
 
1402
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1403
    {
1404
      send_checkOut(cartId);
1405
      return recv_checkOut();
1406
    }
1407
 
1408
    public void send_checkOut(long cartId) throws TException
1409
    {
1410
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1411
      checkOut_args args = new checkOut_args();
578 chandransh 1412
      args.cartId = cartId;
1413
      args.write(oprot_);
1414
      oprot_.writeMessageEnd();
1415
      oprot_.getTransport().flush();
1416
    }
1417
 
688 chandransh 1418
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1419
    {
1420
      TMessage msg = iprot_.readMessageBegin();
1421
      if (msg.type == TMessageType.EXCEPTION) {
1422
        TApplicationException x = TApplicationException.read(iprot_);
1423
        iprot_.readMessageEnd();
1424
        throw x;
1425
      }
688 chandransh 1426
      checkOut_result result = new checkOut_result();
578 chandransh 1427
      result.read(iprot_);
1428
      iprot_.readMessageEnd();
1429
      if (result.isSetSuccess()) {
1430
        return result.success;
1431
      }
1432
      if (result.scex != null) {
1433
        throw result.scex;
1434
      }
688 chandransh 1435
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1436
    }
1437
 
708 rajveer 1438
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1439
    {
688 chandransh 1440
      send_resetCart(cartId, items);
1441
      return recv_resetCart();
553 chandransh 1442
    }
1443
 
708 rajveer 1444
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1445
    {
688 chandransh 1446
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1447
      resetCart_args args = new resetCart_args();
1448
      args.cartId = cartId;
1449
      args.items = items;
553 chandransh 1450
      args.write(oprot_);
1451
      oprot_.writeMessageEnd();
1452
      oprot_.getTransport().flush();
1453
    }
1454
 
688 chandransh 1455
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1456
    {
1457
      TMessage msg = iprot_.readMessageBegin();
1458
      if (msg.type == TMessageType.EXCEPTION) {
1459
        TApplicationException x = TApplicationException.read(iprot_);
1460
        iprot_.readMessageEnd();
1461
        throw x;
130 ashish 1462
      }
688 chandransh 1463
      resetCart_result result = new resetCart_result();
553 chandransh 1464
      result.read(iprot_);
1465
      iprot_.readMessageEnd();
688 chandransh 1466
      if (result.isSetSuccess()) {
1467
        return result.success;
1468
      }
1469
      if (result.scex != null) {
1470
        throw result.scex;
1471
      }
1472
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1473
    }
1474
 
771 rajveer 1475
    public Widget getMyResearch(long userId) throws WidgetException, TException
553 chandransh 1476
    {
771 rajveer 1477
      send_getMyResearch(userId);
553 chandransh 1478
      return recv_getMyResearch();
1479
    }
1480
 
771 rajveer 1481
    public void send_getMyResearch(long userId) throws TException
553 chandransh 1482
    {
1483
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1484
      getMyResearch_args args = new getMyResearch_args();
771 rajveer 1485
      args.userId = userId;
553 chandransh 1486
      args.write(oprot_);
1487
      oprot_.writeMessageEnd();
1488
      oprot_.getTransport().flush();
1489
    }
1490
 
1491
    public Widget recv_getMyResearch() throws WidgetException, TException
1492
    {
1493
      TMessage msg = iprot_.readMessageBegin();
1494
      if (msg.type == TMessageType.EXCEPTION) {
1495
        TApplicationException x = TApplicationException.read(iprot_);
1496
        iprot_.readMessageEnd();
1497
        throw x;
1498
      }
1499
      getMyResearch_result result = new getMyResearch_result();
1500
      result.read(iprot_);
1501
      iprot_.readMessageEnd();
1502
      if (result.isSetSuccess()) {
1503
        return result.success;
1504
      }
1505
      if (result.scx != null) {
1506
        throw result.scx;
1507
      }
1508
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1509
    }
1510
 
771 rajveer 1511
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1512
    {
771 rajveer 1513
      send_updateMyResearch(userId, itemId);
553 chandransh 1514
      return recv_updateMyResearch();
1515
    }
1516
 
771 rajveer 1517
    public void send_updateMyResearch(long userId, long itemId) throws TException
553 chandransh 1518
    {
1519
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1520
      updateMyResearch_args args = new updateMyResearch_args();
771 rajveer 1521
      args.userId = userId;
1522
      args.itemId = itemId;
553 chandransh 1523
      args.write(oprot_);
1524
      oprot_.writeMessageEnd();
1525
      oprot_.getTransport().flush();
1526
    }
1527
 
1528
    public boolean recv_updateMyResearch() throws WidgetException, TException
1529
    {
1530
      TMessage msg = iprot_.readMessageBegin();
1531
      if (msg.type == TMessageType.EXCEPTION) {
1532
        TApplicationException x = TApplicationException.read(iprot_);
1533
        iprot_.readMessageEnd();
1534
        throw x;
1535
      }
1536
      updateMyResearch_result result = new updateMyResearch_result();
1537
      result.read(iprot_);
1538
      iprot_.readMessageEnd();
1539
      if (result.isSetSuccess()) {
1540
        return result.success;
1541
      }
1542
      if (result.scx != null) {
1543
        throw result.scx;
1544
      }
1545
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1546
    }
1547
 
771 rajveer 1548
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1549
    {
771 rajveer 1550
      send_deleteItemFromMyResearch(userId, itemId);
553 chandransh 1551
      recv_deleteItemFromMyResearch();
1552
    }
1553
 
771 rajveer 1554
    public void send_deleteItemFromMyResearch(long userId, long itemId) throws TException
553 chandransh 1555
    {
1556
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1557
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
771 rajveer 1558
      args.userId = userId;
1559
      args.itemId = itemId;
553 chandransh 1560
      args.write(oprot_);
1561
      oprot_.writeMessageEnd();
1562
      oprot_.getTransport().flush();
1563
    }
1564
 
1565
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1566
    {
1567
      TMessage msg = iprot_.readMessageBegin();
1568
      if (msg.type == TMessageType.EXCEPTION) {
1569
        TApplicationException x = TApplicationException.read(iprot_);
1570
        iprot_.readMessageEnd();
1571
        throw x;
1572
      }
1573
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1574
      result.read(iprot_);
1575
      iprot_.readMessageEnd();
1576
      if (result.scx != null) {
1577
        throw result.scx;
1578
      }
1579
      return;
1580
    }
1581
 
771 rajveer 1582
    public void updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1583
    {
771 rajveer 1584
      send_updateBrowseHistory(userId, itemId);
1585
      recv_updateBrowseHistory();
553 chandransh 1586
    }
1587
 
771 rajveer 1588
    public void send_updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1589
    {
771 rajveer 1590
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1591
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1592
      args.userId = userId;
1593
      args.itemId = itemId;
553 chandransh 1594
      args.write(oprot_);
1595
      oprot_.writeMessageEnd();
1596
      oprot_.getTransport().flush();
1597
    }
1598
 
771 rajveer 1599
    public void recv_updateBrowseHistory() throws TException
553 chandransh 1600
    {
1601
      TMessage msg = iprot_.readMessageBegin();
1602
      if (msg.type == TMessageType.EXCEPTION) {
1603
        TApplicationException x = TApplicationException.read(iprot_);
1604
        iprot_.readMessageEnd();
1605
        throw x;
1606
      }
771 rajveer 1607
      updateBrowseHistory_result result = new updateBrowseHistory_result();
553 chandransh 1608
      result.read(iprot_);
1609
      iprot_.readMessageEnd();
1610
      return;
1611
    }
1612
 
771 rajveer 1613
    public Widget getBrowseHistory(long userId) throws WidgetException, TException
553 chandransh 1614
    {
771 rajveer 1615
      send_getBrowseHistory(userId);
1616
      return recv_getBrowseHistory();
553 chandransh 1617
    }
1618
 
771 rajveer 1619
    public void send_getBrowseHistory(long userId) throws TException
553 chandransh 1620
    {
771 rajveer 1621
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1622
      getBrowseHistory_args args = new getBrowseHistory_args();
1623
      args.userId = userId;
553 chandransh 1624
      args.write(oprot_);
1625
      oprot_.writeMessageEnd();
1626
      oprot_.getTransport().flush();
1627
    }
1628
 
771 rajveer 1629
    public Widget recv_getBrowseHistory() throws WidgetException, TException
553 chandransh 1630
    {
1631
      TMessage msg = iprot_.readMessageBegin();
1632
      if (msg.type == TMessageType.EXCEPTION) {
1633
        TApplicationException x = TApplicationException.read(iprot_);
1634
        iprot_.readMessageEnd();
1635
        throw x;
1636
      }
771 rajveer 1637
      getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 1638
      result.read(iprot_);
1639
      iprot_.readMessageEnd();
1640
      if (result.isSetSuccess()) {
1641
        return result.success;
1642
      }
1643
      if (result.scx != null) {
1644
        throw result.scx;
1645
      }
771 rajveer 1646
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
553 chandransh 1647
    }
1648
 
771 rajveer 1649
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1650
    {
771 rajveer 1651
      send_mergeBrowseHistory(fromUserId, toUserId);
1652
      recv_mergeBrowseHistory();
553 chandransh 1653
    }
1654
 
771 rajveer 1655
    public void send_mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1656
    {
771 rajveer 1657
      oprot_.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.CALL, seqid_));
1658
      mergeBrowseHistory_args args = new mergeBrowseHistory_args();
1659
      args.fromUserId = fromUserId;
1660
      args.toUserId = toUserId;
553 chandransh 1661
      args.write(oprot_);
1662
      oprot_.writeMessageEnd();
1663
      oprot_.getTransport().flush();
1664
    }
1665
 
771 rajveer 1666
    public void recv_mergeBrowseHistory() throws TException
553 chandransh 1667
    {
1668
      TMessage msg = iprot_.readMessageBegin();
1669
      if (msg.type == TMessageType.EXCEPTION) {
1670
        TApplicationException x = TApplicationException.read(iprot_);
1671
        iprot_.readMessageEnd();
1672
        throw x;
1673
      }
771 rajveer 1674
      mergeBrowseHistory_result result = new mergeBrowseHistory_result();
553 chandransh 1675
      result.read(iprot_);
1676
      iprot_.readMessageEnd();
1677
      return;
1678
    }
1679
 
48 ashish 1680
  }
1681
  public static class Processor implements TProcessor {
1682
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1683
    public Processor(Iface iface)
1684
    {
1685
      iface_ = iface;
764 rajveer 1686
      processMap_.put("closeSession", new closeSession());
553 chandransh 1687
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1688
      processMap_.put("getUserById", new getUserById());
1689
      processMap_.put("createUser", new createUser());
1690
      processMap_.put("updateUser", new updateUser());
1691
      processMap_.put("deleteUser", new deleteUser());
1692
      processMap_.put("getUserState", new getUserState());
123 ashish 1693
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1694
      processMap_.put("userExists", new userExists());
1695
      processMap_.put("addAddressForUser", new addAddressForUser());
1696
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1697
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1698
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1699
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1700
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1701
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1702
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1703
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
784 rajveer 1704
      processMap_.put("getDefaultPincode", new getDefaultPincode());
553 chandransh 1705
      processMap_.put("createCart", new createCart());
1706
      processMap_.put("getCurrentCart", new getCurrentCart());
1707
      processMap_.put("getCart", new getCart());
1708
      processMap_.put("getCartsForUser", new getCartsForUser());
1709
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1710
      processMap_.put("getCartsByTime", new getCartsByTime());
1711
      processMap_.put("changeCartStatus", new changeCartStatus());
1712
      processMap_.put("addItemToCart", new addItemToCart());
1713
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1714
      processMap_.put("changeQuantity", new changeQuantity());
1715
      processMap_.put("changeItemStatus", new changeItemStatus());
1716
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1717
      processMap_.put("createOrders", new createOrders());
553 chandransh 1718
      processMap_.put("validateCart", new validateCart());
1719
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1720
      processMap_.put("checkOut", new checkOut());
1721
      processMap_.put("resetCart", new resetCart());
553 chandransh 1722
      processMap_.put("getMyResearch", new getMyResearch());
1723
      processMap_.put("updateMyResearch", new updateMyResearch());
1724
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1725
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1726
      processMap_.put("getBrowseHistory", new getBrowseHistory());
771 rajveer 1727
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
48 ashish 1728
    }
1729
 
1730
    protected static interface ProcessFunction {
1731
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1732
    }
1733
 
1734
    private Iface iface_;
1735
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1736
 
1737
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1738
    {
1739
      TMessage msg = iprot.readMessageBegin();
1740
      ProcessFunction fn = processMap_.get(msg.name);
1741
      if (fn == null) {
1742
        TProtocolUtil.skip(iprot, TType.STRUCT);
1743
        iprot.readMessageEnd();
1744
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1745
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1746
        x.write(oprot);
1747
        oprot.writeMessageEnd();
1748
        oprot.getTransport().flush();
1749
        return true;
1750
      }
1751
      fn.process(msg.seqid, iprot, oprot);
1752
      return true;
1753
    }
1754
 
764 rajveer 1755
    private class closeSession implements ProcessFunction {
1756
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1757
      {
1758
        closeSession_args args = new closeSession_args();
1759
        args.read(iprot);
1760
        iprot.readMessageEnd();
1761
        closeSession_result result = new closeSession_result();
1762
        iface_.closeSession();
1763
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1764
        result.write(oprot);
1765
        oprot.writeMessageEnd();
1766
        oprot.getTransport().flush();
1767
      }
1768
 
1769
    }
1770
 
553 chandransh 1771
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1772
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1773
      {
553 chandransh 1774
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1775
        args.read(iprot);
1776
        iprot.readMessageEnd();
553 chandransh 1777
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1778
        try {
553 chandransh 1779
          result.success = iface_.createAnonymousUser(args.jsessionId);
1780
        } catch (UserContextException ucex) {
1781
          result.ucex = ucex;
48 ashish 1782
        } catch (Throwable th) {
553 chandransh 1783
          LOGGER.error("Internal error processing createAnonymousUser", th);
1784
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1785
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1786
          x.write(oprot);
1787
          oprot.writeMessageEnd();
1788
          oprot.getTransport().flush();
1789
          return;
1790
        }
553 chandransh 1791
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1792
        result.write(oprot);
1793
        oprot.writeMessageEnd();
1794
        oprot.getTransport().flush();
1795
      }
1796
 
1797
    }
1798
 
553 chandransh 1799
    private class getUserById implements ProcessFunction {
48 ashish 1800
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1801
      {
553 chandransh 1802
        getUserById_args args = new getUserById_args();
48 ashish 1803
        args.read(iprot);
1804
        iprot.readMessageEnd();
553 chandransh 1805
        getUserById_result result = new getUserById_result();
48 ashish 1806
        try {
553 chandransh 1807
          result.success = iface_.getUserById(args.userId);
1808
        } catch (UserContextException ucex) {
1809
          result.ucex = ucex;
48 ashish 1810
        } catch (Throwable th) {
553 chandransh 1811
          LOGGER.error("Internal error processing getUserById", th);
1812
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1813
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1814
          x.write(oprot);
1815
          oprot.writeMessageEnd();
1816
          oprot.getTransport().flush();
1817
          return;
1818
        }
553 chandransh 1819
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1820
        result.write(oprot);
1821
        oprot.writeMessageEnd();
1822
        oprot.getTransport().flush();
1823
      }
1824
 
1825
    }
1826
 
553 chandransh 1827
    private class createUser implements ProcessFunction {
48 ashish 1828
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1829
      {
553 chandransh 1830
        createUser_args args = new createUser_args();
48 ashish 1831
        args.read(iprot);
1832
        iprot.readMessageEnd();
553 chandransh 1833
        createUser_result result = new createUser_result();
48 ashish 1834
        try {
553 chandransh 1835
          result.success = iface_.createUser(args.user);
1836
        } catch (UserContextException ucex) {
1837
          result.ucex = ucex;
48 ashish 1838
        } catch (Throwable th) {
553 chandransh 1839
          LOGGER.error("Internal error processing createUser", th);
1840
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1841
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1842
          x.write(oprot);
1843
          oprot.writeMessageEnd();
1844
          oprot.getTransport().flush();
1845
          return;
1846
        }
553 chandransh 1847
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1848
        result.write(oprot);
1849
        oprot.writeMessageEnd();
1850
        oprot.getTransport().flush();
1851
      }
1852
 
1853
    }
1854
 
553 chandransh 1855
    private class updateUser implements ProcessFunction {
48 ashish 1856
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1857
      {
553 chandransh 1858
        updateUser_args args = new updateUser_args();
48 ashish 1859
        args.read(iprot);
1860
        iprot.readMessageEnd();
553 chandransh 1861
        updateUser_result result = new updateUser_result();
48 ashish 1862
        try {
553 chandransh 1863
          result.success = iface_.updateUser(args.user);
1864
        } catch (UserContextException ucex) {
1865
          result.ucex = ucex;
48 ashish 1866
        } catch (Throwable th) {
553 chandransh 1867
          LOGGER.error("Internal error processing updateUser", th);
1868
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1869
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1870
          x.write(oprot);
1871
          oprot.writeMessageEnd();
1872
          oprot.getTransport().flush();
1873
          return;
1874
        }
553 chandransh 1875
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1876
        result.write(oprot);
1877
        oprot.writeMessageEnd();
1878
        oprot.getTransport().flush();
1879
      }
1880
 
1881
    }
1882
 
553 chandransh 1883
    private class deleteUser implements ProcessFunction {
48 ashish 1884
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1885
      {
553 chandransh 1886
        deleteUser_args args = new deleteUser_args();
48 ashish 1887
        args.read(iprot);
1888
        iprot.readMessageEnd();
553 chandransh 1889
        deleteUser_result result = new deleteUser_result();
48 ashish 1890
        try {
553 chandransh 1891
          result.success = iface_.deleteUser(args.userId);
1892
          result.setSuccessIsSet(true);
1893
        } catch (UserContextException ucex) {
1894
          result.ucex = ucex;
48 ashish 1895
        } catch (Throwable th) {
553 chandransh 1896
          LOGGER.error("Internal error processing deleteUser", th);
1897
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1898
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 1899
          x.write(oprot);
1900
          oprot.writeMessageEnd();
1901
          oprot.getTransport().flush();
1902
          return;
1903
        }
553 chandransh 1904
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 1905
        result.write(oprot);
1906
        oprot.writeMessageEnd();
1907
        oprot.getTransport().flush();
1908
      }
1909
 
1910
    }
1911
 
553 chandransh 1912
    private class getUserState implements ProcessFunction {
48 ashish 1913
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1914
      {
553 chandransh 1915
        getUserState_args args = new getUserState_args();
48 ashish 1916
        args.read(iprot);
1917
        iprot.readMessageEnd();
553 chandransh 1918
        getUserState_result result = new getUserState_result();
48 ashish 1919
        try {
553 chandransh 1920
          result.success = iface_.getUserState(args.userId);
1921
        } catch (UserContextException ucex) {
1922
          result.ucex = ucex;
48 ashish 1923
        } catch (Throwable th) {
553 chandransh 1924
          LOGGER.error("Internal error processing getUserState", th);
1925
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
1926
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 1927
          x.write(oprot);
1928
          oprot.writeMessageEnd();
1929
          oprot.getTransport().flush();
1930
          return;
1931
        }
553 chandransh 1932
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 1933
        result.write(oprot);
1934
        oprot.writeMessageEnd();
1935
        oprot.getTransport().flush();
1936
      }
1937
 
1938
    }
1939
 
123 ashish 1940
    private class authenticateUser implements ProcessFunction {
1941
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1942
      {
1943
        authenticateUser_args args = new authenticateUser_args();
1944
        args.read(iprot);
1945
        iprot.readMessageEnd();
1946
        authenticateUser_result result = new authenticateUser_result();
1947
        try {
553 chandransh 1948
          result.success = iface_.authenticateUser(args.email, args.password);
1949
        } catch (AuthenticationException auex) {
1950
          result.auex = auex;
123 ashish 1951
        } catch (Throwable th) {
1952
          LOGGER.error("Internal error processing authenticateUser", th);
1953
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1954
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1955
          x.write(oprot);
1956
          oprot.writeMessageEnd();
1957
          oprot.getTransport().flush();
1958
          return;
1959
        }
1960
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1961
        result.write(oprot);
1962
        oprot.writeMessageEnd();
1963
        oprot.getTransport().flush();
1964
      }
1965
 
1966
    }
1967
 
48 ashish 1968
    private class userExists implements ProcessFunction {
1969
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1970
      {
1971
        userExists_args args = new userExists_args();
1972
        args.read(iprot);
1973
        iprot.readMessageEnd();
1974
        userExists_result result = new userExists_result();
1975
        try {
1976
          result.success = iface_.userExists(args.email);
1977
          result.setSuccessIsSet(true);
1978
        } catch (UserContextException ucx) {
1979
          result.ucx = ucx;
1980
        } catch (Throwable th) {
1981
          LOGGER.error("Internal error processing userExists", th);
1982
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1983
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1984
          x.write(oprot);
1985
          oprot.writeMessageEnd();
1986
          oprot.getTransport().flush();
1987
          return;
1988
        }
1989
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1990
        result.write(oprot);
1991
        oprot.writeMessageEnd();
1992
        oprot.getTransport().flush();
1993
      }
1994
 
1995
    }
1996
 
1997
    private class addAddressForUser implements ProcessFunction {
1998
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1999
      {
2000
        addAddressForUser_args args = new addAddressForUser_args();
2001
        args.read(iprot);
2002
        iprot.readMessageEnd();
2003
        addAddressForUser_result result = new addAddressForUser_result();
2004
        try {
571 rajveer 2005
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2006
          result.setSuccessIsSet(true);
2007
        } catch (UserContextException ucx) {
2008
          result.ucx = ucx;
2009
        } catch (Throwable th) {
2010
          LOGGER.error("Internal error processing addAddressForUser", th);
2011
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2012
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2013
          x.write(oprot);
2014
          oprot.writeMessageEnd();
2015
          oprot.getTransport().flush();
2016
          return;
2017
        }
2018
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2019
        result.write(oprot);
2020
        oprot.writeMessageEnd();
2021
        oprot.getTransport().flush();
2022
      }
2023
 
2024
    }
2025
 
2026
    private class removeAddressForUser implements ProcessFunction {
2027
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2028
      {
2029
        removeAddressForUser_args args = new removeAddressForUser_args();
2030
        args.read(iprot);
2031
        iprot.readMessageEnd();
2032
        removeAddressForUser_result result = new removeAddressForUser_result();
2033
        try {
2034
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2035
          result.setSuccessIsSet(true);
2036
        } catch (UserContextException ucx) {
2037
          result.ucx = ucx;
2038
        } catch (Throwable th) {
2039
          LOGGER.error("Internal error processing removeAddressForUser", th);
2040
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2041
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2042
          x.write(oprot);
2043
          oprot.writeMessageEnd();
2044
          oprot.getTransport().flush();
2045
          return;
2046
        }
2047
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2048
        result.write(oprot);
2049
        oprot.writeMessageEnd();
2050
        oprot.getTransport().flush();
2051
      }
2052
 
2053
    }
2054
 
2055
    private class setUserAsLoggedIn implements ProcessFunction {
2056
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2057
      {
2058
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2059
        args.read(iprot);
2060
        iprot.readMessageEnd();
2061
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2062
        try {
2063
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2064
          result.setSuccessIsSet(true);
2065
        } catch (UserContextException ucx) {
2066
          result.ucx = ucx;
2067
        } catch (Throwable th) {
2068
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2069
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2070
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2071
          x.write(oprot);
2072
          oprot.writeMessageEnd();
2073
          oprot.getTransport().flush();
2074
          return;
2075
        }
2076
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2077
        result.write(oprot);
2078
        oprot.writeMessageEnd();
2079
        oprot.getTransport().flush();
2080
      }
2081
 
2082
    }
2083
 
2084
    private class setUserAsLoggedOut implements ProcessFunction {
2085
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2086
      {
2087
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2088
        args.read(iprot);
2089
        iprot.readMessageEnd();
2090
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2091
        try {
2092
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2093
          result.setSuccessIsSet(true);
2094
        } catch (UserContextException ucx) {
2095
          result.ucx = ucx;
2096
        } catch (Throwable th) {
2097
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2098
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2099
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2100
          x.write(oprot);
2101
          oprot.writeMessageEnd();
2102
          oprot.getTransport().flush();
2103
          return;
2104
        }
2105
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2106
        result.write(oprot);
2107
        oprot.writeMessageEnd();
2108
        oprot.getTransport().flush();
2109
      }
2110
 
2111
    }
2112
 
506 rajveer 2113
    private class setDefaultAddress implements ProcessFunction {
2114
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2115
      {
2116
        setDefaultAddress_args args = new setDefaultAddress_args();
2117
        args.read(iprot);
2118
        iprot.readMessageEnd();
2119
        setDefaultAddress_result result = new setDefaultAddress_result();
2120
        try {
2121
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2122
          result.setSuccessIsSet(true);
2123
        } catch (UserContextException ucx) {
2124
          result.ucx = ucx;
2125
        } catch (Throwable th) {
2126
          LOGGER.error("Internal error processing setDefaultAddress", th);
2127
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2128
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2129
          x.write(oprot);
2130
          oprot.writeMessageEnd();
2131
          oprot.getTransport().flush();
2132
          return;
2133
        }
2134
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2135
        result.write(oprot);
2136
        oprot.writeMessageEnd();
2137
        oprot.getTransport().flush();
2138
      }
2139
 
2140
    }
2141
 
48 ashish 2142
    private class updatePassword implements ProcessFunction {
2143
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2144
      {
2145
        updatePassword_args args = new updatePassword_args();
2146
        args.read(iprot);
2147
        iprot.readMessageEnd();
2148
        updatePassword_result result = new updatePassword_result();
2149
        try {
593 rajveer 2150
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2151
          result.setSuccessIsSet(true);
2152
        } catch (UserContextException ucx) {
2153
          result.ucx = ucx;
2154
        } catch (Throwable th) {
2155
          LOGGER.error("Internal error processing updatePassword", th);
2156
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2157
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2158
          x.write(oprot);
2159
          oprot.writeMessageEnd();
2160
          oprot.getTransport().flush();
2161
          return;
2162
        }
2163
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2164
        result.write(oprot);
2165
        oprot.writeMessageEnd();
2166
        oprot.getTransport().flush();
2167
      }
2168
 
2169
    }
2170
 
582 rajveer 2171
    private class forgotPassword implements ProcessFunction {
2172
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2173
      {
2174
        forgotPassword_args args = new forgotPassword_args();
2175
        args.read(iprot);
2176
        iprot.readMessageEnd();
2177
        forgotPassword_result result = new forgotPassword_result();
2178
        try {
896 rajveer 2179
          result.success = iface_.forgotPassword(args.email, args.newPassword);
582 rajveer 2180
          result.setSuccessIsSet(true);
2181
        } catch (UserContextException ucx) {
2182
          result.ucx = ucx;
2183
        } catch (Throwable th) {
2184
          LOGGER.error("Internal error processing forgotPassword", th);
2185
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2186
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2187
          x.write(oprot);
2188
          oprot.writeMessageEnd();
2189
          oprot.getTransport().flush();
2190
          return;
2191
        }
2192
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2193
        result.write(oprot);
2194
        oprot.writeMessageEnd();
2195
        oprot.getTransport().flush();
2196
      }
2197
 
2198
    }
2199
 
593 rajveer 2200
    private class getAllAddressesForUser implements ProcessFunction {
2201
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2202
      {
2203
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2204
        args.read(iprot);
2205
        iprot.readMessageEnd();
2206
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2207
        try {
2208
          result.success = iface_.getAllAddressesForUser(args.userId);
2209
        } catch (UserContextException ucx) {
2210
          result.ucx = ucx;
2211
        } catch (Throwable th) {
2212
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2213
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2214
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2215
          x.write(oprot);
2216
          oprot.writeMessageEnd();
2217
          oprot.getTransport().flush();
2218
          return;
2219
        }
2220
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2221
        result.write(oprot);
2222
        oprot.writeMessageEnd();
2223
        oprot.getTransport().flush();
2224
      }
2225
 
2226
    }
2227
 
2228
    private class getDefaultAddressId implements ProcessFunction {
2229
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2230
      {
2231
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2232
        args.read(iprot);
2233
        iprot.readMessageEnd();
2234
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2235
        try {
2236
          result.success = iface_.getDefaultAddressId(args.userId);
2237
          result.setSuccessIsSet(true);
2238
        } catch (UserContextException ucx) {
2239
          result.ucx = ucx;
2240
        } catch (Throwable th) {
2241
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2242
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2243
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2244
          x.write(oprot);
2245
          oprot.writeMessageEnd();
2246
          oprot.getTransport().flush();
2247
          return;
2248
        }
2249
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2250
        result.write(oprot);
2251
        oprot.writeMessageEnd();
2252
        oprot.getTransport().flush();
2253
      }
2254
 
2255
    }
2256
 
784 rajveer 2257
    private class getDefaultPincode implements ProcessFunction {
2258
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2259
      {
2260
        getDefaultPincode_args args = new getDefaultPincode_args();
2261
        args.read(iprot);
2262
        iprot.readMessageEnd();
2263
        getDefaultPincode_result result = new getDefaultPincode_result();
2264
        try {
2265
          result.success = iface_.getDefaultPincode(args.userId);
2266
        } catch (UserContextException ucx) {
2267
          result.ucx = ucx;
2268
        } catch (Throwable th) {
2269
          LOGGER.error("Internal error processing getDefaultPincode", th);
2270
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultPincode");
2271
          oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.EXCEPTION, seqid));
2272
          x.write(oprot);
2273
          oprot.writeMessageEnd();
2274
          oprot.getTransport().flush();
2275
          return;
2276
        }
2277
        oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.REPLY, seqid));
2278
        result.write(oprot);
2279
        oprot.writeMessageEnd();
2280
        oprot.getTransport().flush();
2281
      }
2282
 
2283
    }
2284
 
553 chandransh 2285
    private class createCart implements ProcessFunction {
48 ashish 2286
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2287
      {
553 chandransh 2288
        createCart_args args = new createCart_args();
48 ashish 2289
        args.read(iprot);
2290
        iprot.readMessageEnd();
553 chandransh 2291
        createCart_result result = new createCart_result();
48 ashish 2292
        try {
553 chandransh 2293
          result.success = iface_.createCart(args.userId);
48 ashish 2294
          result.setSuccessIsSet(true);
553 chandransh 2295
        } catch (ShoppingCartException scx) {
2296
          result.scx = scx;
48 ashish 2297
        } catch (Throwable th) {
553 chandransh 2298
          LOGGER.error("Internal error processing createCart", th);
2299
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2300
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2301
          x.write(oprot);
2302
          oprot.writeMessageEnd();
2303
          oprot.getTransport().flush();
2304
          return;
2305
        }
553 chandransh 2306
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2307
        result.write(oprot);
2308
        oprot.writeMessageEnd();
2309
        oprot.getTransport().flush();
2310
      }
2311
 
2312
    }
2313
 
553 chandransh 2314
    private class getCurrentCart implements ProcessFunction {
48 ashish 2315
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2316
      {
553 chandransh 2317
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2318
        args.read(iprot);
2319
        iprot.readMessageEnd();
553 chandransh 2320
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2321
        try {
553 chandransh 2322
          result.success = iface_.getCurrentCart(args.userId);
2323
        } catch (ShoppingCartException scx) {
2324
          result.scx = scx;
48 ashish 2325
        } catch (Throwable th) {
553 chandransh 2326
          LOGGER.error("Internal error processing getCurrentCart", th);
2327
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2328
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2329
          x.write(oprot);
2330
          oprot.writeMessageEnd();
2331
          oprot.getTransport().flush();
2332
          return;
2333
        }
553 chandransh 2334
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2335
        result.write(oprot);
2336
        oprot.writeMessageEnd();
2337
        oprot.getTransport().flush();
2338
      }
2339
 
2340
    }
2341
 
553 chandransh 2342
    private class getCart implements ProcessFunction {
48 ashish 2343
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2344
      {
553 chandransh 2345
        getCart_args args = new getCart_args();
48 ashish 2346
        args.read(iprot);
2347
        iprot.readMessageEnd();
553 chandransh 2348
        getCart_result result = new getCart_result();
48 ashish 2349
        try {
553 chandransh 2350
          result.success = iface_.getCart(args.cartId);
2351
        } catch (ShoppingCartException scx) {
2352
          result.scx = scx;
48 ashish 2353
        } catch (Throwable th) {
553 chandransh 2354
          LOGGER.error("Internal error processing getCart", th);
2355
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2356
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2357
          x.write(oprot);
2358
          oprot.writeMessageEnd();
2359
          oprot.getTransport().flush();
2360
          return;
2361
        }
553 chandransh 2362
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2363
        result.write(oprot);
2364
        oprot.writeMessageEnd();
2365
        oprot.getTransport().flush();
2366
      }
2367
 
2368
    }
2369
 
553 chandransh 2370
    private class getCartsForUser implements ProcessFunction {
48 ashish 2371
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2372
      {
553 chandransh 2373
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2374
        args.read(iprot);
2375
        iprot.readMessageEnd();
553 chandransh 2376
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2377
        try {
553 chandransh 2378
          result.success = iface_.getCartsForUser(args.userId, args.status);
2379
        } catch (ShoppingCartException scx) {
2380
          result.scx = scx;
48 ashish 2381
        } catch (Throwable th) {
553 chandransh 2382
          LOGGER.error("Internal error processing getCartsForUser", th);
2383
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2384
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2385
          x.write(oprot);
2386
          oprot.writeMessageEnd();
2387
          oprot.getTransport().flush();
2388
          return;
2389
        }
553 chandransh 2390
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2391
        result.write(oprot);
2392
        oprot.writeMessageEnd();
2393
        oprot.getTransport().flush();
2394
      }
2395
 
2396
    }
2397
 
553 chandransh 2398
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2399
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2400
      {
553 chandransh 2401
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2402
        args.read(iprot);
2403
        iprot.readMessageEnd();
553 chandransh 2404
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2405
        try {
553 chandransh 2406
          result.success = iface_.getCartsByStatus(args.status);
2407
        } catch (ShoppingCartException scx) {
2408
          result.scx = scx;
48 ashish 2409
        } catch (Throwable th) {
553 chandransh 2410
          LOGGER.error("Internal error processing getCartsByStatus", th);
2411
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2412
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2413
          x.write(oprot);
2414
          oprot.writeMessageEnd();
2415
          oprot.getTransport().flush();
2416
          return;
2417
        }
553 chandransh 2418
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2419
        result.write(oprot);
2420
        oprot.writeMessageEnd();
2421
        oprot.getTransport().flush();
2422
      }
2423
 
2424
    }
2425
 
553 chandransh 2426
    private class getCartsByTime implements ProcessFunction {
48 ashish 2427
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2428
      {
553 chandransh 2429
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2430
        args.read(iprot);
2431
        iprot.readMessageEnd();
553 chandransh 2432
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2433
        try {
553 chandransh 2434
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2435
        } catch (ShoppingCartException scx) {
2436
          result.scx = scx;
48 ashish 2437
        } catch (Throwable th) {
553 chandransh 2438
          LOGGER.error("Internal error processing getCartsByTime", th);
2439
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2440
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2441
          x.write(oprot);
2442
          oprot.writeMessageEnd();
2443
          oprot.getTransport().flush();
2444
          return;
2445
        }
553 chandransh 2446
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2447
        result.write(oprot);
2448
        oprot.writeMessageEnd();
2449
        oprot.getTransport().flush();
2450
      }
2451
 
2452
    }
2453
 
553 chandransh 2454
    private class changeCartStatus implements ProcessFunction {
130 ashish 2455
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2456
      {
553 chandransh 2457
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2458
        args.read(iprot);
2459
        iprot.readMessageEnd();
553 chandransh 2460
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2461
        try {
553 chandransh 2462
          iface_.changeCartStatus(args.cartId, args.status);
2463
        } catch (ShoppingCartException scx) {
2464
          result.scx = scx;
2465
        } catch (Throwable th) {
2466
          LOGGER.error("Internal error processing changeCartStatus", th);
2467
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2468
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2469
          x.write(oprot);
2470
          oprot.writeMessageEnd();
2471
          oprot.getTransport().flush();
2472
          return;
2473
        }
2474
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2475
        result.write(oprot);
2476
        oprot.writeMessageEnd();
2477
        oprot.getTransport().flush();
2478
      }
2479
 
2480
    }
2481
 
2482
    private class addItemToCart implements ProcessFunction {
2483
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2484
      {
2485
        addItemToCart_args args = new addItemToCart_args();
2486
        args.read(iprot);
2487
        iprot.readMessageEnd();
2488
        addItemToCart_result result = new addItemToCart_result();
2489
        try {
2490
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2491
        } catch (ShoppingCartException scx) {
2492
          result.scx = scx;
2493
        } catch (Throwable th) {
2494
          LOGGER.error("Internal error processing addItemToCart", th);
2495
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2496
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2497
          x.write(oprot);
2498
          oprot.writeMessageEnd();
2499
          oprot.getTransport().flush();
2500
          return;
2501
        }
2502
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2503
        result.write(oprot);
2504
        oprot.writeMessageEnd();
2505
        oprot.getTransport().flush();
2506
      }
2507
 
2508
    }
2509
 
2510
    private class deleteItemFromCart implements ProcessFunction {
2511
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2512
      {
2513
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2514
        args.read(iprot);
2515
        iprot.readMessageEnd();
2516
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2517
        try {
2518
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2519
        } catch (ShoppingCartException scx) {
2520
          result.scx = scx;
2521
        } catch (Throwable th) {
2522
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2523
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2524
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2525
          x.write(oprot);
2526
          oprot.writeMessageEnd();
2527
          oprot.getTransport().flush();
2528
          return;
2529
        }
2530
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2531
        result.write(oprot);
2532
        oprot.writeMessageEnd();
2533
        oprot.getTransport().flush();
2534
      }
2535
 
2536
    }
2537
 
2538
    private class changeQuantity implements ProcessFunction {
2539
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2540
      {
2541
        changeQuantity_args args = new changeQuantity_args();
2542
        args.read(iprot);
2543
        iprot.readMessageEnd();
2544
        changeQuantity_result result = new changeQuantity_result();
2545
        try {
2546
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2547
        } catch (ShoppingCartException scx) {
2548
          result.scx = scx;
2549
        } catch (Throwable th) {
2550
          LOGGER.error("Internal error processing changeQuantity", th);
2551
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2552
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2553
          x.write(oprot);
2554
          oprot.writeMessageEnd();
2555
          oprot.getTransport().flush();
2556
          return;
2557
        }
2558
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2559
        result.write(oprot);
2560
        oprot.writeMessageEnd();
2561
        oprot.getTransport().flush();
2562
      }
2563
 
2564
    }
2565
 
2566
    private class changeItemStatus implements ProcessFunction {
2567
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2568
      {
2569
        changeItemStatus_args args = new changeItemStatus_args();
2570
        args.read(iprot);
2571
        iprot.readMessageEnd();
2572
        changeItemStatus_result result = new changeItemStatus_result();
2573
        try {
2574
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2575
        } catch (ShoppingCartException scx) {
2576
          result.scx = scx;
2577
        } catch (Throwable th) {
2578
          LOGGER.error("Internal error processing changeItemStatus", th);
2579
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2580
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2581
          x.write(oprot);
2582
          oprot.writeMessageEnd();
2583
          oprot.getTransport().flush();
2584
          return;
2585
        }
2586
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2587
        result.write(oprot);
2588
        oprot.writeMessageEnd();
2589
        oprot.getTransport().flush();
2590
      }
2591
 
2592
    }
2593
 
2594
    private class addAddressToCart implements ProcessFunction {
2595
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2596
      {
2597
        addAddressToCart_args args = new addAddressToCart_args();
2598
        args.read(iprot);
2599
        iprot.readMessageEnd();
2600
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2601
        try {
2602
          iface_.addAddressToCart(args.cartId, args.addressId);
2603
        } catch (ShoppingCartException scx) {
2604
          result.scx = scx;
2605
        } catch (Throwable th) {
2606
          LOGGER.error("Internal error processing addAddressToCart", th);
2607
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2608
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2609
          x.write(oprot);
2610
          oprot.writeMessageEnd();
2611
          oprot.getTransport().flush();
2612
          return;
2613
        }
553 chandransh 2614
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2615
        result.write(oprot);
2616
        oprot.writeMessageEnd();
2617
        oprot.getTransport().flush();
2618
      }
2619
 
2620
    }
2621
 
688 chandransh 2622
    private class createOrders implements ProcessFunction {
553 chandransh 2623
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2624
      {
688 chandransh 2625
        createOrders_args args = new createOrders_args();
553 chandransh 2626
        args.read(iprot);
2627
        iprot.readMessageEnd();
688 chandransh 2628
        createOrders_result result = new createOrders_result();
553 chandransh 2629
        try {
688 chandransh 2630
          result.success = iface_.createOrders(args.cartId);
130 ashish 2631
          result.setSuccessIsSet(true);
553 chandransh 2632
        } catch (ShoppingCartException scx) {
2633
          result.scx = scx;
130 ashish 2634
        } catch (Throwable th) {
688 chandransh 2635
          LOGGER.error("Internal error processing createOrders", th);
2636
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2637
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2638
          x.write(oprot);
2639
          oprot.writeMessageEnd();
2640
          oprot.getTransport().flush();
2641
          return;
2642
        }
688 chandransh 2643
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2644
        result.write(oprot);
2645
        oprot.writeMessageEnd();
2646
        oprot.getTransport().flush();
2647
      }
2648
 
2649
    }
2650
 
553 chandransh 2651
    private class validateCart implements ProcessFunction {
130 ashish 2652
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2653
      {
553 chandransh 2654
        validateCart_args args = new validateCart_args();
130 ashish 2655
        args.read(iprot);
2656
        iprot.readMessageEnd();
553 chandransh 2657
        validateCart_result result = new validateCart_result();
578 chandransh 2658
        try {
2659
          result.success = iface_.validateCart(args.cartId);
2660
          result.setSuccessIsSet(true);
2661
        } catch (ShoppingCartException scex) {
2662
          result.scex = scex;
2663
        } catch (Throwable th) {
2664
          LOGGER.error("Internal error processing validateCart", th);
2665
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2666
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2667
          x.write(oprot);
2668
          oprot.writeMessageEnd();
2669
          oprot.getTransport().flush();
2670
          return;
2671
        }
553 chandransh 2672
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2673
        result.write(oprot);
2674
        oprot.writeMessageEnd();
2675
        oprot.getTransport().flush();
2676
      }
2677
 
2678
    }
2679
 
688 chandransh 2680
    private class mergeCart implements ProcessFunction {
578 chandransh 2681
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2682
      {
688 chandransh 2683
        mergeCart_args args = new mergeCart_args();
578 chandransh 2684
        args.read(iprot);
2685
        iprot.readMessageEnd();
688 chandransh 2686
        mergeCart_result result = new mergeCart_result();
2687
        iface_.mergeCart(args.fromCartId, args.toCartId);
2688
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2689
        result.write(oprot);
2690
        oprot.writeMessageEnd();
2691
        oprot.getTransport().flush();
2692
      }
2693
 
2694
    }
2695
 
2696
    private class checkOut implements ProcessFunction {
2697
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2698
      {
2699
        checkOut_args args = new checkOut_args();
2700
        args.read(iprot);
2701
        iprot.readMessageEnd();
2702
        checkOut_result result = new checkOut_result();
578 chandransh 2703
        try {
688 chandransh 2704
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2705
          result.setSuccessIsSet(true);
2706
        } catch (ShoppingCartException scex) {
2707
          result.scex = scex;
2708
        } catch (Throwable th) {
688 chandransh 2709
          LOGGER.error("Internal error processing checkOut", th);
2710
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2711
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2712
          x.write(oprot);
2713
          oprot.writeMessageEnd();
2714
          oprot.getTransport().flush();
2715
          return;
2716
        }
688 chandransh 2717
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2718
        result.write(oprot);
2719
        oprot.writeMessageEnd();
2720
        oprot.getTransport().flush();
2721
      }
2722
 
2723
    }
2724
 
688 chandransh 2725
    private class resetCart implements ProcessFunction {
553 chandransh 2726
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2727
      {
688 chandransh 2728
        resetCart_args args = new resetCart_args();
553 chandransh 2729
        args.read(iprot);
2730
        iprot.readMessageEnd();
688 chandransh 2731
        resetCart_result result = new resetCart_result();
2732
        try {
2733
          result.success = iface_.resetCart(args.cartId, args.items);
2734
          result.setSuccessIsSet(true);
2735
        } catch (ShoppingCartException scex) {
2736
          result.scex = scex;
2737
        } catch (Throwable th) {
2738
          LOGGER.error("Internal error processing resetCart", th);
2739
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2740
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2741
          x.write(oprot);
2742
          oprot.writeMessageEnd();
2743
          oprot.getTransport().flush();
2744
          return;
2745
        }
2746
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2747
        result.write(oprot);
2748
        oprot.writeMessageEnd();
2749
        oprot.getTransport().flush();
2750
      }
2751
 
2752
    }
2753
 
2754
    private class getMyResearch implements ProcessFunction {
2755
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2756
      {
2757
        getMyResearch_args args = new getMyResearch_args();
2758
        args.read(iprot);
2759
        iprot.readMessageEnd();
2760
        getMyResearch_result result = new getMyResearch_result();
2761
        try {
771 rajveer 2762
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 2763
        } catch (WidgetException scx) {
2764
          result.scx = scx;
2765
        } catch (Throwable th) {
2766
          LOGGER.error("Internal error processing getMyResearch", th);
2767
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2768
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2769
          x.write(oprot);
2770
          oprot.writeMessageEnd();
2771
          oprot.getTransport().flush();
2772
          return;
2773
        }
2774
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2775
        result.write(oprot);
2776
        oprot.writeMessageEnd();
2777
        oprot.getTransport().flush();
2778
      }
2779
 
2780
    }
2781
 
2782
    private class updateMyResearch implements ProcessFunction {
2783
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2784
      {
2785
        updateMyResearch_args args = new updateMyResearch_args();
2786
        args.read(iprot);
2787
        iprot.readMessageEnd();
2788
        updateMyResearch_result result = new updateMyResearch_result();
2789
        try {
771 rajveer 2790
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 2791
          result.setSuccessIsSet(true);
553 chandransh 2792
        } catch (WidgetException scx) {
2793
          result.scx = scx;
130 ashish 2794
        } catch (Throwable th) {
553 chandransh 2795
          LOGGER.error("Internal error processing updateMyResearch", th);
2796
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2797
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2798
          x.write(oprot);
2799
          oprot.writeMessageEnd();
2800
          oprot.getTransport().flush();
2801
          return;
2802
        }
553 chandransh 2803
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2804
        result.write(oprot);
2805
        oprot.writeMessageEnd();
2806
        oprot.getTransport().flush();
2807
      }
2808
 
2809
    }
2810
 
553 chandransh 2811
    private class deleteItemFromMyResearch implements ProcessFunction {
2812
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2813
      {
2814
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2815
        args.read(iprot);
2816
        iprot.readMessageEnd();
2817
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2818
        try {
771 rajveer 2819
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 2820
        } catch (WidgetException scx) {
2821
          result.scx = scx;
2822
        } catch (Throwable th) {
2823
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2824
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2825
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2826
          x.write(oprot);
2827
          oprot.writeMessageEnd();
2828
          oprot.getTransport().flush();
2829
          return;
2830
        }
2831
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2832
        result.write(oprot);
2833
        oprot.writeMessageEnd();
2834
        oprot.getTransport().flush();
2835
      }
2836
 
2837
    }
2838
 
771 rajveer 2839
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 2840
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2841
      {
771 rajveer 2842
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 2843
        args.read(iprot);
2844
        iprot.readMessageEnd();
771 rajveer 2845
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2846
        iface_.updateBrowseHistory(args.userId, args.itemId);
2847
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2848
        result.write(oprot);
2849
        oprot.writeMessageEnd();
2850
        oprot.getTransport().flush();
2851
      }
2852
 
2853
    }
2854
 
771 rajveer 2855
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 2856
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2857
      {
771 rajveer 2858
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 2859
        args.read(iprot);
2860
        iprot.readMessageEnd();
771 rajveer 2861
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 2862
        try {
771 rajveer 2863
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 2864
        } catch (WidgetException scx) {
2865
          result.scx = scx;
2866
        } catch (Throwable th) {
771 rajveer 2867
          LOGGER.error("Internal error processing getBrowseHistory", th);
2868
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2869
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 2870
          x.write(oprot);
2871
          oprot.writeMessageEnd();
2872
          oprot.getTransport().flush();
2873
          return;
2874
        }
771 rajveer 2875
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2876
        result.write(oprot);
2877
        oprot.writeMessageEnd();
2878
        oprot.getTransport().flush();
2879
      }
2880
 
2881
    }
2882
 
771 rajveer 2883
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 2884
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2885
      {
771 rajveer 2886
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 2887
        args.read(iprot);
2888
        iprot.readMessageEnd();
771 rajveer 2889
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
2890
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
2891
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2892
        result.write(oprot);
2893
        oprot.writeMessageEnd();
2894
        oprot.getTransport().flush();
2895
      }
2896
 
2897
    }
2898
 
48 ashish 2899
  }
2900
 
764 rajveer 2901
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2902
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2903
 
2904
 
2905
 
2906
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2907
    public enum _Fields implements TFieldIdEnum {
2908
;
2909
 
2910
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2912
 
2913
      static {
2914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2915
          byId.put((int)field._thriftId, field);
2916
          byName.put(field.getFieldName(), field);
2917
        }
2918
      }
2919
 
2920
      /**
2921
       * Find the _Fields constant that matches fieldId, or null if its not found.
2922
       */
2923
      public static _Fields findByThriftId(int fieldId) {
2924
        return byId.get(fieldId);
2925
      }
2926
 
2927
      /**
2928
       * Find the _Fields constant that matches fieldId, throwing an exception
2929
       * if it is not found.
2930
       */
2931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2932
        _Fields fields = findByThriftId(fieldId);
2933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2934
        return fields;
2935
      }
2936
 
2937
      /**
2938
       * Find the _Fields constant that matches name, or null if its not found.
2939
       */
2940
      public static _Fields findByName(String name) {
2941
        return byName.get(name);
2942
      }
2943
 
2944
      private final short _thriftId;
2945
      private final String _fieldName;
2946
 
2947
      _Fields(short thriftId, String fieldName) {
2948
        _thriftId = thriftId;
2949
        _fieldName = fieldName;
2950
      }
2951
 
2952
      public short getThriftFieldId() {
2953
        return _thriftId;
2954
      }
2955
 
2956
      public String getFieldName() {
2957
        return _fieldName;
2958
      }
2959
    }
2960
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2961
    }});
2962
 
2963
    static {
2964
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2965
    }
2966
 
2967
    public closeSession_args() {
2968
    }
2969
 
2970
    /**
2971
     * Performs a deep copy on <i>other</i>.
2972
     */
2973
    public closeSession_args(closeSession_args other) {
2974
    }
2975
 
2976
    public closeSession_args deepCopy() {
2977
      return new closeSession_args(this);
2978
    }
2979
 
2980
    @Deprecated
2981
    public closeSession_args clone() {
2982
      return new closeSession_args(this);
2983
    }
2984
 
2985
    public void setFieldValue(_Fields field, Object value) {
2986
      switch (field) {
2987
      }
2988
    }
2989
 
2990
    public void setFieldValue(int fieldID, Object value) {
2991
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2992
    }
2993
 
2994
    public Object getFieldValue(_Fields field) {
2995
      switch (field) {
2996
      }
2997
      throw new IllegalStateException();
2998
    }
2999
 
3000
    public Object getFieldValue(int fieldId) {
3001
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3002
    }
3003
 
3004
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3005
    public boolean isSet(_Fields field) {
3006
      switch (field) {
3007
      }
3008
      throw new IllegalStateException();
3009
    }
3010
 
3011
    public boolean isSet(int fieldID) {
3012
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3013
    }
3014
 
3015
    @Override
3016
    public boolean equals(Object that) {
3017
      if (that == null)
3018
        return false;
3019
      if (that instanceof closeSession_args)
3020
        return this.equals((closeSession_args)that);
3021
      return false;
3022
    }
3023
 
3024
    public boolean equals(closeSession_args that) {
3025
      if (that == null)
3026
        return false;
3027
 
3028
      return true;
3029
    }
3030
 
3031
    @Override
3032
    public int hashCode() {
3033
      return 0;
3034
    }
3035
 
3036
    public int compareTo(closeSession_args other) {
3037
      if (!getClass().equals(other.getClass())) {
3038
        return getClass().getName().compareTo(other.getClass().getName());
3039
      }
3040
 
3041
      int lastComparison = 0;
3042
      closeSession_args typedOther = (closeSession_args)other;
3043
 
3044
      return 0;
3045
    }
3046
 
3047
    public void read(TProtocol iprot) throws TException {
3048
      TField field;
3049
      iprot.readStructBegin();
3050
      while (true)
3051
      {
3052
        field = iprot.readFieldBegin();
3053
        if (field.type == TType.STOP) { 
3054
          break;
3055
        }
3056
        _Fields fieldId = _Fields.findByThriftId(field.id);
3057
        if (fieldId == null) {
3058
          TProtocolUtil.skip(iprot, field.type);
3059
        } else {
3060
          switch (fieldId) {
3061
          }
3062
          iprot.readFieldEnd();
3063
        }
3064
      }
3065
      iprot.readStructEnd();
3066
      validate();
3067
    }
3068
 
3069
    public void write(TProtocol oprot) throws TException {
3070
      validate();
3071
 
3072
      oprot.writeStructBegin(STRUCT_DESC);
3073
      oprot.writeFieldStop();
3074
      oprot.writeStructEnd();
3075
    }
3076
 
3077
    @Override
3078
    public String toString() {
3079
      StringBuilder sb = new StringBuilder("closeSession_args(");
3080
      boolean first = true;
3081
 
3082
      sb.append(")");
3083
      return sb.toString();
3084
    }
3085
 
3086
    public void validate() throws TException {
3087
      // check for required fields
3088
    }
3089
 
3090
  }
3091
 
3092
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3093
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3094
 
3095
 
3096
 
3097
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3098
    public enum _Fields implements TFieldIdEnum {
3099
;
3100
 
3101
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3102
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3103
 
3104
      static {
3105
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3106
          byId.put((int)field._thriftId, field);
3107
          byName.put(field.getFieldName(), field);
3108
        }
3109
      }
3110
 
3111
      /**
3112
       * Find the _Fields constant that matches fieldId, or null if its not found.
3113
       */
3114
      public static _Fields findByThriftId(int fieldId) {
3115
        return byId.get(fieldId);
3116
      }
3117
 
3118
      /**
3119
       * Find the _Fields constant that matches fieldId, throwing an exception
3120
       * if it is not found.
3121
       */
3122
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3123
        _Fields fields = findByThriftId(fieldId);
3124
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3125
        return fields;
3126
      }
3127
 
3128
      /**
3129
       * Find the _Fields constant that matches name, or null if its not found.
3130
       */
3131
      public static _Fields findByName(String name) {
3132
        return byName.get(name);
3133
      }
3134
 
3135
      private final short _thriftId;
3136
      private final String _fieldName;
3137
 
3138
      _Fields(short thriftId, String fieldName) {
3139
        _thriftId = thriftId;
3140
        _fieldName = fieldName;
3141
      }
3142
 
3143
      public short getThriftFieldId() {
3144
        return _thriftId;
3145
      }
3146
 
3147
      public String getFieldName() {
3148
        return _fieldName;
3149
      }
3150
    }
3151
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3152
    }});
3153
 
3154
    static {
3155
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3156
    }
3157
 
3158
    public closeSession_result() {
3159
    }
3160
 
3161
    /**
3162
     * Performs a deep copy on <i>other</i>.
3163
     */
3164
    public closeSession_result(closeSession_result other) {
3165
    }
3166
 
3167
    public closeSession_result deepCopy() {
3168
      return new closeSession_result(this);
3169
    }
3170
 
3171
    @Deprecated
3172
    public closeSession_result clone() {
3173
      return new closeSession_result(this);
3174
    }
3175
 
3176
    public void setFieldValue(_Fields field, Object value) {
3177
      switch (field) {
3178
      }
3179
    }
3180
 
3181
    public void setFieldValue(int fieldID, Object value) {
3182
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3183
    }
3184
 
3185
    public Object getFieldValue(_Fields field) {
3186
      switch (field) {
3187
      }
3188
      throw new IllegalStateException();
3189
    }
3190
 
3191
    public Object getFieldValue(int fieldId) {
3192
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3193
    }
3194
 
3195
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3196
    public boolean isSet(_Fields field) {
3197
      switch (field) {
3198
      }
3199
      throw new IllegalStateException();
3200
    }
3201
 
3202
    public boolean isSet(int fieldID) {
3203
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3204
    }
3205
 
3206
    @Override
3207
    public boolean equals(Object that) {
3208
      if (that == null)
3209
        return false;
3210
      if (that instanceof closeSession_result)
3211
        return this.equals((closeSession_result)that);
3212
      return false;
3213
    }
3214
 
3215
    public boolean equals(closeSession_result that) {
3216
      if (that == null)
3217
        return false;
3218
 
3219
      return true;
3220
    }
3221
 
3222
    @Override
3223
    public int hashCode() {
3224
      return 0;
3225
    }
3226
 
3227
    public int compareTo(closeSession_result other) {
3228
      if (!getClass().equals(other.getClass())) {
3229
        return getClass().getName().compareTo(other.getClass().getName());
3230
      }
3231
 
3232
      int lastComparison = 0;
3233
      closeSession_result typedOther = (closeSession_result)other;
3234
 
3235
      return 0;
3236
    }
3237
 
3238
    public void read(TProtocol iprot) throws TException {
3239
      TField field;
3240
      iprot.readStructBegin();
3241
      while (true)
3242
      {
3243
        field = iprot.readFieldBegin();
3244
        if (field.type == TType.STOP) { 
3245
          break;
3246
        }
3247
        _Fields fieldId = _Fields.findByThriftId(field.id);
3248
        if (fieldId == null) {
3249
          TProtocolUtil.skip(iprot, field.type);
3250
        } else {
3251
          switch (fieldId) {
3252
          }
3253
          iprot.readFieldEnd();
3254
        }
3255
      }
3256
      iprot.readStructEnd();
3257
      validate();
3258
    }
3259
 
3260
    public void write(TProtocol oprot) throws TException {
3261
      oprot.writeStructBegin(STRUCT_DESC);
3262
 
3263
      oprot.writeFieldStop();
3264
      oprot.writeStructEnd();
3265
    }
3266
 
3267
    @Override
3268
    public String toString() {
3269
      StringBuilder sb = new StringBuilder("closeSession_result(");
3270
      boolean first = true;
3271
 
3272
      sb.append(")");
3273
      return sb.toString();
3274
    }
3275
 
3276
    public void validate() throws TException {
3277
      // check for required fields
3278
    }
3279
 
3280
  }
3281
 
553 chandransh 3282
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3283
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3284
 
553 chandransh 3285
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3286
 
553 chandransh 3287
    private String jsessionId;
48 ashish 3288
 
3289
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3290
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3291
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3292
 
3293
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3294
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3295
 
3296
      static {
3297
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3298
          byId.put((int)field._thriftId, field);
3299
          byName.put(field.getFieldName(), field);
3300
        }
3301
      }
3302
 
3303
      /**
3304
       * Find the _Fields constant that matches fieldId, or null if its not found.
3305
       */
3306
      public static _Fields findByThriftId(int fieldId) {
3307
        return byId.get(fieldId);
3308
      }
3309
 
3310
      /**
3311
       * Find the _Fields constant that matches fieldId, throwing an exception
3312
       * if it is not found.
3313
       */
3314
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3315
        _Fields fields = findByThriftId(fieldId);
3316
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3317
        return fields;
3318
      }
3319
 
3320
      /**
3321
       * Find the _Fields constant that matches name, or null if its not found.
3322
       */
3323
      public static _Fields findByName(String name) {
3324
        return byName.get(name);
3325
      }
3326
 
3327
      private final short _thriftId;
3328
      private final String _fieldName;
3329
 
3330
      _Fields(short thriftId, String fieldName) {
3331
        _thriftId = thriftId;
3332
        _fieldName = fieldName;
3333
      }
3334
 
3335
      public short getThriftFieldId() {
3336
        return _thriftId;
3337
      }
3338
 
3339
      public String getFieldName() {
3340
        return _fieldName;
3341
      }
3342
    }
3343
 
3344
    // isset id assignments
3345
 
3346
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3347
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3348
          new FieldValueMetaData(TType.STRING)));
48 ashish 3349
    }});
3350
 
3351
    static {
553 chandransh 3352
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3353
    }
3354
 
553 chandransh 3355
    public createAnonymousUser_args() {
48 ashish 3356
    }
3357
 
553 chandransh 3358
    public createAnonymousUser_args(
3359
      String jsessionId)
48 ashish 3360
    {
3361
      this();
553 chandransh 3362
      this.jsessionId = jsessionId;
48 ashish 3363
    }
3364
 
3365
    /**
3366
     * Performs a deep copy on <i>other</i>.
3367
     */
553 chandransh 3368
    public createAnonymousUser_args(createAnonymousUser_args other) {
3369
      if (other.isSetJsessionId()) {
3370
        this.jsessionId = other.jsessionId;
48 ashish 3371
      }
3372
    }
3373
 
553 chandransh 3374
    public createAnonymousUser_args deepCopy() {
3375
      return new createAnonymousUser_args(this);
48 ashish 3376
    }
3377
 
3378
    @Deprecated
553 chandransh 3379
    public createAnonymousUser_args clone() {
3380
      return new createAnonymousUser_args(this);
48 ashish 3381
    }
3382
 
553 chandransh 3383
    public String getJsessionId() {
3384
      return this.jsessionId;
48 ashish 3385
    }
3386
 
553 chandransh 3387
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3388
      this.jsessionId = jsessionId;
48 ashish 3389
      return this;
3390
    }
3391
 
553 chandransh 3392
    public void unsetJsessionId() {
3393
      this.jsessionId = null;
48 ashish 3394
    }
3395
 
553 chandransh 3396
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3397
    public boolean isSetJsessionId() {
3398
      return this.jsessionId != null;
48 ashish 3399
    }
3400
 
553 chandransh 3401
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3402
      if (!value) {
553 chandransh 3403
        this.jsessionId = null;
48 ashish 3404
      }
3405
    }
3406
 
3407
    public void setFieldValue(_Fields field, Object value) {
3408
      switch (field) {
553 chandransh 3409
      case JSESSION_ID:
48 ashish 3410
        if (value == null) {
553 chandransh 3411
          unsetJsessionId();
48 ashish 3412
        } else {
553 chandransh 3413
          setJsessionId((String)value);
48 ashish 3414
        }
3415
        break;
3416
 
3417
      }
3418
    }
3419
 
3420
    public void setFieldValue(int fieldID, Object value) {
3421
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3422
    }
3423
 
3424
    public Object getFieldValue(_Fields field) {
3425
      switch (field) {
553 chandransh 3426
      case JSESSION_ID:
3427
        return getJsessionId();
48 ashish 3428
 
3429
      }
3430
      throw new IllegalStateException();
3431
    }
3432
 
3433
    public Object getFieldValue(int fieldId) {
3434
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3435
    }
3436
 
3437
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3438
    public boolean isSet(_Fields field) {
3439
      switch (field) {
553 chandransh 3440
      case JSESSION_ID:
3441
        return isSetJsessionId();
48 ashish 3442
      }
3443
      throw new IllegalStateException();
3444
    }
3445
 
3446
    public boolean isSet(int fieldID) {
3447
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3448
    }
3449
 
3450
    @Override
3451
    public boolean equals(Object that) {
3452
      if (that == null)
3453
        return false;
553 chandransh 3454
      if (that instanceof createAnonymousUser_args)
3455
        return this.equals((createAnonymousUser_args)that);
48 ashish 3456
      return false;
3457
    }
3458
 
553 chandransh 3459
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3460
      if (that == null)
3461
        return false;
3462
 
553 chandransh 3463
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3464
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3465
      if (this_present_jsessionId || that_present_jsessionId) {
3466
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3467
          return false;
553 chandransh 3468
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3469
          return false;
3470
      }
3471
 
3472
      return true;
3473
    }
3474
 
3475
    @Override
3476
    public int hashCode() {
3477
      return 0;
3478
    }
3479
 
553 chandransh 3480
    public int compareTo(createAnonymousUser_args other) {
3481
      if (!getClass().equals(other.getClass())) {
3482
        return getClass().getName().compareTo(other.getClass().getName());
3483
      }
3484
 
3485
      int lastComparison = 0;
3486
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3487
 
3488
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3489
      if (lastComparison != 0) {
3490
        return lastComparison;
3491
      }
3492
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3493
      if (lastComparison != 0) {
3494
        return lastComparison;
3495
      }
3496
      return 0;
3497
    }
3498
 
48 ashish 3499
    public void read(TProtocol iprot) throws TException {
3500
      TField field;
3501
      iprot.readStructBegin();
3502
      while (true)
3503
      {
3504
        field = iprot.readFieldBegin();
3505
        if (field.type == TType.STOP) { 
3506
          break;
3507
        }
3508
        _Fields fieldId = _Fields.findByThriftId(field.id);
3509
        if (fieldId == null) {
3510
          TProtocolUtil.skip(iprot, field.type);
3511
        } else {
3512
          switch (fieldId) {
553 chandransh 3513
            case JSESSION_ID:
3514
              if (field.type == TType.STRING) {
3515
                this.jsessionId = iprot.readString();
48 ashish 3516
              } else { 
3517
                TProtocolUtil.skip(iprot, field.type);
3518
              }
3519
              break;
3520
          }
3521
          iprot.readFieldEnd();
3522
        }
3523
      }
3524
      iprot.readStructEnd();
3525
      validate();
3526
    }
3527
 
3528
    public void write(TProtocol oprot) throws TException {
3529
      validate();
3530
 
3531
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3532
      if (this.jsessionId != null) {
3533
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3534
        oprot.writeString(this.jsessionId);
48 ashish 3535
        oprot.writeFieldEnd();
3536
      }
3537
      oprot.writeFieldStop();
3538
      oprot.writeStructEnd();
3539
    }
3540
 
3541
    @Override
3542
    public String toString() {
553 chandransh 3543
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3544
      boolean first = true;
3545
 
553 chandransh 3546
      sb.append("jsessionId:");
3547
      if (this.jsessionId == null) {
48 ashish 3548
        sb.append("null");
3549
      } else {
553 chandransh 3550
        sb.append(this.jsessionId);
48 ashish 3551
      }
3552
      first = false;
3553
      sb.append(")");
3554
      return sb.toString();
3555
    }
3556
 
3557
    public void validate() throws TException {
3558
      // check for required fields
3559
    }
3560
 
3561
  }
3562
 
571 rajveer 3563
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3564
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3565
 
3566
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3567
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3568
 
553 chandransh 3569
    private User success;
3570
    private UserContextException ucex;
48 ashish 3571
 
3572
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3573
    public enum _Fields implements TFieldIdEnum {
3574
      SUCCESS((short)0, "success"),
553 chandransh 3575
      UCEX((short)1, "ucex");
48 ashish 3576
 
3577
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3578
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3579
 
3580
      static {
3581
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3582
          byId.put((int)field._thriftId, field);
3583
          byName.put(field.getFieldName(), field);
3584
        }
3585
      }
3586
 
3587
      /**
3588
       * Find the _Fields constant that matches fieldId, or null if its not found.
3589
       */
3590
      public static _Fields findByThriftId(int fieldId) {
3591
        return byId.get(fieldId);
3592
      }
3593
 
3594
      /**
3595
       * Find the _Fields constant that matches fieldId, throwing an exception
3596
       * if it is not found.
3597
       */
3598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3599
        _Fields fields = findByThriftId(fieldId);
3600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3601
        return fields;
3602
      }
3603
 
3604
      /**
3605
       * Find the _Fields constant that matches name, or null if its not found.
3606
       */
3607
      public static _Fields findByName(String name) {
3608
        return byName.get(name);
3609
      }
3610
 
3611
      private final short _thriftId;
3612
      private final String _fieldName;
3613
 
3614
      _Fields(short thriftId, String fieldName) {
3615
        _thriftId = thriftId;
3616
        _fieldName = fieldName;
3617
      }
3618
 
3619
      public short getThriftFieldId() {
3620
        return _thriftId;
3621
      }
3622
 
3623
      public String getFieldName() {
3624
        return _fieldName;
3625
      }
3626
    }
3627
 
3628
    // isset id assignments
3629
 
3630
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3631
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3632
          new StructMetaData(TType.STRUCT, User.class)));
3633
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3634
          new FieldValueMetaData(TType.STRUCT)));
3635
    }});
3636
 
3637
    static {
553 chandransh 3638
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3639
    }
3640
 
553 chandransh 3641
    public createAnonymousUser_result() {
48 ashish 3642
    }
3643
 
553 chandransh 3644
    public createAnonymousUser_result(
3645
      User success,
3646
      UserContextException ucex)
48 ashish 3647
    {
3648
      this();
3649
      this.success = success;
553 chandransh 3650
      this.ucex = ucex;
48 ashish 3651
    }
3652
 
3653
    /**
3654
     * Performs a deep copy on <i>other</i>.
3655
     */
553 chandransh 3656
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3657
      if (other.isSetSuccess()) {
553 chandransh 3658
        this.success = new User(other.success);
48 ashish 3659
      }
553 chandransh 3660
      if (other.isSetUcex()) {
3661
        this.ucex = new UserContextException(other.ucex);
48 ashish 3662
      }
3663
    }
3664
 
553 chandransh 3665
    public createAnonymousUser_result deepCopy() {
3666
      return new createAnonymousUser_result(this);
48 ashish 3667
    }
3668
 
3669
    @Deprecated
553 chandransh 3670
    public createAnonymousUser_result clone() {
3671
      return new createAnonymousUser_result(this);
48 ashish 3672
    }
3673
 
553 chandransh 3674
    public User getSuccess() {
48 ashish 3675
      return this.success;
3676
    }
3677
 
553 chandransh 3678
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3679
      this.success = success;
3680
      return this;
3681
    }
3682
 
3683
    public void unsetSuccess() {
3684
      this.success = null;
3685
    }
3686
 
3687
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3688
    public boolean isSetSuccess() {
3689
      return this.success != null;
3690
    }
3691
 
3692
    public void setSuccessIsSet(boolean value) {
3693
      if (!value) {
3694
        this.success = null;
3695
      }
3696
    }
3697
 
553 chandransh 3698
    public UserContextException getUcex() {
3699
      return this.ucex;
48 ashish 3700
    }
3701
 
553 chandransh 3702
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3703
      this.ucex = ucex;
48 ashish 3704
      return this;
3705
    }
3706
 
553 chandransh 3707
    public void unsetUcex() {
3708
      this.ucex = null;
48 ashish 3709
    }
3710
 
553 chandransh 3711
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3712
    public boolean isSetUcex() {
3713
      return this.ucex != null;
48 ashish 3714
    }
3715
 
553 chandransh 3716
    public void setUcexIsSet(boolean value) {
48 ashish 3717
      if (!value) {
553 chandransh 3718
        this.ucex = null;
48 ashish 3719
      }
3720
    }
3721
 
3722
    public void setFieldValue(_Fields field, Object value) {
3723
      switch (field) {
3724
      case SUCCESS:
3725
        if (value == null) {
3726
          unsetSuccess();
3727
        } else {
553 chandransh 3728
          setSuccess((User)value);
48 ashish 3729
        }
3730
        break;
3731
 
553 chandransh 3732
      case UCEX:
48 ashish 3733
        if (value == null) {
553 chandransh 3734
          unsetUcex();
48 ashish 3735
        } else {
553 chandransh 3736
          setUcex((UserContextException)value);
48 ashish 3737
        }
3738
        break;
3739
 
3740
      }
3741
    }
3742
 
3743
    public void setFieldValue(int fieldID, Object value) {
3744
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3745
    }
3746
 
3747
    public Object getFieldValue(_Fields field) {
3748
      switch (field) {
3749
      case SUCCESS:
3750
        return getSuccess();
3751
 
553 chandransh 3752
      case UCEX:
3753
        return getUcex();
48 ashish 3754
 
3755
      }
3756
      throw new IllegalStateException();
3757
    }
3758
 
3759
    public Object getFieldValue(int fieldId) {
3760
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3761
    }
3762
 
3763
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3764
    public boolean isSet(_Fields field) {
3765
      switch (field) {
3766
      case SUCCESS:
3767
        return isSetSuccess();
553 chandransh 3768
      case UCEX:
3769
        return isSetUcex();
48 ashish 3770
      }
3771
      throw new IllegalStateException();
3772
    }
3773
 
3774
    public boolean isSet(int fieldID) {
3775
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3776
    }
3777
 
3778
    @Override
3779
    public boolean equals(Object that) {
3780
      if (that == null)
3781
        return false;
553 chandransh 3782
      if (that instanceof createAnonymousUser_result)
3783
        return this.equals((createAnonymousUser_result)that);
48 ashish 3784
      return false;
3785
    }
3786
 
553 chandransh 3787
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3788
      if (that == null)
3789
        return false;
3790
 
3791
      boolean this_present_success = true && this.isSetSuccess();
3792
      boolean that_present_success = true && that.isSetSuccess();
3793
      if (this_present_success || that_present_success) {
3794
        if (!(this_present_success && that_present_success))
3795
          return false;
3796
        if (!this.success.equals(that.success))
3797
          return false;
3798
      }
3799
 
553 chandransh 3800
      boolean this_present_ucex = true && this.isSetUcex();
3801
      boolean that_present_ucex = true && that.isSetUcex();
3802
      if (this_present_ucex || that_present_ucex) {
3803
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3804
          return false;
553 chandransh 3805
        if (!this.ucex.equals(that.ucex))
48 ashish 3806
          return false;
3807
      }
3808
 
3809
      return true;
3810
    }
3811
 
3812
    @Override
3813
    public int hashCode() {
3814
      return 0;
3815
    }
3816
 
571 rajveer 3817
    public int compareTo(createAnonymousUser_result other) {
3818
      if (!getClass().equals(other.getClass())) {
3819
        return getClass().getName().compareTo(other.getClass().getName());
3820
      }
3821
 
3822
      int lastComparison = 0;
3823
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3824
 
3825
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3826
      if (lastComparison != 0) {
3827
        return lastComparison;
3828
      }
3829
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3830
      if (lastComparison != 0) {
3831
        return lastComparison;
3832
      }
3833
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3834
      if (lastComparison != 0) {
3835
        return lastComparison;
3836
      }
3837
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3838
      if (lastComparison != 0) {
3839
        return lastComparison;
3840
      }
3841
      return 0;
3842
    }
3843
 
48 ashish 3844
    public void read(TProtocol iprot) throws TException {
3845
      TField field;
3846
      iprot.readStructBegin();
3847
      while (true)
3848
      {
3849
        field = iprot.readFieldBegin();
3850
        if (field.type == TType.STOP) { 
3851
          break;
3852
        }
3853
        _Fields fieldId = _Fields.findByThriftId(field.id);
3854
        if (fieldId == null) {
3855
          TProtocolUtil.skip(iprot, field.type);
3856
        } else {
3857
          switch (fieldId) {
3858
            case SUCCESS:
3859
              if (field.type == TType.STRUCT) {
553 chandransh 3860
                this.success = new User();
48 ashish 3861
                this.success.read(iprot);
3862
              } else { 
3863
                TProtocolUtil.skip(iprot, field.type);
3864
              }
3865
              break;
553 chandransh 3866
            case UCEX:
48 ashish 3867
              if (field.type == TType.STRUCT) {
553 chandransh 3868
                this.ucex = new UserContextException();
3869
                this.ucex.read(iprot);
48 ashish 3870
              } else { 
3871
                TProtocolUtil.skip(iprot, field.type);
3872
              }
3873
              break;
3874
          }
3875
          iprot.readFieldEnd();
3876
        }
3877
      }
3878
      iprot.readStructEnd();
3879
      validate();
3880
    }
3881
 
3882
    public void write(TProtocol oprot) throws TException {
3883
      oprot.writeStructBegin(STRUCT_DESC);
3884
 
3885
      if (this.isSetSuccess()) {
3886
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3887
        this.success.write(oprot);
3888
        oprot.writeFieldEnd();
553 chandransh 3889
      } else if (this.isSetUcex()) {
3890
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3891
        this.ucex.write(oprot);
48 ashish 3892
        oprot.writeFieldEnd();
3893
      }
3894
      oprot.writeFieldStop();
3895
      oprot.writeStructEnd();
3896
    }
3897
 
3898
    @Override
3899
    public String toString() {
553 chandransh 3900
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3901
      boolean first = true;
3902
 
3903
      sb.append("success:");
3904
      if (this.success == null) {
3905
        sb.append("null");
3906
      } else {
3907
        sb.append(this.success);
3908
      }
3909
      first = false;
3910
      if (!first) sb.append(", ");
553 chandransh 3911
      sb.append("ucex:");
3912
      if (this.ucex == null) {
48 ashish 3913
        sb.append("null");
3914
      } else {
553 chandransh 3915
        sb.append(this.ucex);
48 ashish 3916
      }
3917
      first = false;
3918
      sb.append(")");
3919
      return sb.toString();
3920
    }
3921
 
3922
    public void validate() throws TException {
3923
      // check for required fields
3924
    }
3925
 
3926
  }
3927
 
553 chandransh 3928
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3929
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3930
 
3931
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3932
 
3933
    private long userId;
3934
 
3935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3936
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3937
      USER_ID((short)1, "userId");
48 ashish 3938
 
3939
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3940
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3941
 
3942
      static {
3943
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3944
          byId.put((int)field._thriftId, field);
3945
          byName.put(field.getFieldName(), field);
3946
        }
3947
      }
3948
 
3949
      /**
3950
       * Find the _Fields constant that matches fieldId, or null if its not found.
3951
       */
3952
      public static _Fields findByThriftId(int fieldId) {
3953
        return byId.get(fieldId);
3954
      }
3955
 
3956
      /**
3957
       * Find the _Fields constant that matches fieldId, throwing an exception
3958
       * if it is not found.
3959
       */
3960
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3961
        _Fields fields = findByThriftId(fieldId);
3962
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3963
        return fields;
3964
      }
3965
 
3966
      /**
3967
       * Find the _Fields constant that matches name, or null if its not found.
3968
       */
3969
      public static _Fields findByName(String name) {
3970
        return byName.get(name);
3971
      }
3972
 
3973
      private final short _thriftId;
3974
      private final String _fieldName;
3975
 
3976
      _Fields(short thriftId, String fieldName) {
3977
        _thriftId = thriftId;
3978
        _fieldName = fieldName;
3979
      }
3980
 
3981
      public short getThriftFieldId() {
3982
        return _thriftId;
3983
      }
3984
 
3985
      public String getFieldName() {
3986
        return _fieldName;
3987
      }
3988
    }
3989
 
3990
    // isset id assignments
3991
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3992
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3993
 
3994
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3995
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3996
          new FieldValueMetaData(TType.I64)));
3997
    }});
3998
 
3999
    static {
553 chandransh 4000
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4001
    }
4002
 
553 chandransh 4003
    public getUserById_args() {
48 ashish 4004
    }
4005
 
553 chandransh 4006
    public getUserById_args(
4007
      long userId)
48 ashish 4008
    {
4009
      this();
4010
      this.userId = userId;
4011
      setUserIdIsSet(true);
4012
    }
4013
 
4014
    /**
4015
     * Performs a deep copy on <i>other</i>.
4016
     */
553 chandransh 4017
    public getUserById_args(getUserById_args other) {
48 ashish 4018
      __isset_bit_vector.clear();
4019
      __isset_bit_vector.or(other.__isset_bit_vector);
4020
      this.userId = other.userId;
4021
    }
4022
 
553 chandransh 4023
    public getUserById_args deepCopy() {
4024
      return new getUserById_args(this);
48 ashish 4025
    }
4026
 
4027
    @Deprecated
553 chandransh 4028
    public getUserById_args clone() {
4029
      return new getUserById_args(this);
48 ashish 4030
    }
4031
 
4032
    public long getUserId() {
4033
      return this.userId;
4034
    }
4035
 
553 chandransh 4036
    public getUserById_args setUserId(long userId) {
48 ashish 4037
      this.userId = userId;
4038
      setUserIdIsSet(true);
4039
      return this;
4040
    }
4041
 
4042
    public void unsetUserId() {
4043
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4044
    }
4045
 
4046
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4047
    public boolean isSetUserId() {
4048
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4049
    }
4050
 
4051
    public void setUserIdIsSet(boolean value) {
4052
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4053
    }
4054
 
4055
    public void setFieldValue(_Fields field, Object value) {
4056
      switch (field) {
4057
      case USER_ID:
4058
        if (value == null) {
4059
          unsetUserId();
4060
        } else {
4061
          setUserId((Long)value);
4062
        }
4063
        break;
4064
 
4065
      }
4066
    }
4067
 
4068
    public void setFieldValue(int fieldID, Object value) {
4069
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4070
    }
4071
 
4072
    public Object getFieldValue(_Fields field) {
4073
      switch (field) {
4074
      case USER_ID:
4075
        return new Long(getUserId());
4076
 
4077
      }
4078
      throw new IllegalStateException();
4079
    }
4080
 
4081
    public Object getFieldValue(int fieldId) {
4082
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4083
    }
4084
 
4085
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4086
    public boolean isSet(_Fields field) {
4087
      switch (field) {
4088
      case USER_ID:
4089
        return isSetUserId();
4090
      }
4091
      throw new IllegalStateException();
4092
    }
4093
 
4094
    public boolean isSet(int fieldID) {
4095
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4096
    }
4097
 
4098
    @Override
4099
    public boolean equals(Object that) {
4100
      if (that == null)
4101
        return false;
553 chandransh 4102
      if (that instanceof getUserById_args)
4103
        return this.equals((getUserById_args)that);
48 ashish 4104
      return false;
4105
    }
4106
 
553 chandransh 4107
    public boolean equals(getUserById_args that) {
48 ashish 4108
      if (that == null)
4109
        return false;
4110
 
4111
      boolean this_present_userId = true;
4112
      boolean that_present_userId = true;
4113
      if (this_present_userId || that_present_userId) {
4114
        if (!(this_present_userId && that_present_userId))
4115
          return false;
4116
        if (this.userId != that.userId)
4117
          return false;
4118
      }
4119
 
4120
      return true;
4121
    }
4122
 
4123
    @Override
4124
    public int hashCode() {
4125
      return 0;
4126
    }
4127
 
553 chandransh 4128
    public int compareTo(getUserById_args other) {
48 ashish 4129
      if (!getClass().equals(other.getClass())) {
4130
        return getClass().getName().compareTo(other.getClass().getName());
4131
      }
4132
 
4133
      int lastComparison = 0;
553 chandransh 4134
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4135
 
4136
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4137
      if (lastComparison != 0) {
4138
        return lastComparison;
4139
      }
4140
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4141
      if (lastComparison != 0) {
4142
        return lastComparison;
4143
      }
4144
      return 0;
4145
    }
4146
 
4147
    public void read(TProtocol iprot) throws TException {
4148
      TField field;
4149
      iprot.readStructBegin();
4150
      while (true)
4151
      {
4152
        field = iprot.readFieldBegin();
4153
        if (field.type == TType.STOP) { 
4154
          break;
4155
        }
4156
        _Fields fieldId = _Fields.findByThriftId(field.id);
4157
        if (fieldId == null) {
4158
          TProtocolUtil.skip(iprot, field.type);
4159
        } else {
4160
          switch (fieldId) {
4161
            case USER_ID:
4162
              if (field.type == TType.I64) {
4163
                this.userId = iprot.readI64();
4164
                setUserIdIsSet(true);
4165
              } else { 
4166
                TProtocolUtil.skip(iprot, field.type);
4167
              }
4168
              break;
4169
          }
4170
          iprot.readFieldEnd();
4171
        }
4172
      }
4173
      iprot.readStructEnd();
4174
      validate();
4175
    }
4176
 
4177
    public void write(TProtocol oprot) throws TException {
4178
      validate();
4179
 
4180
      oprot.writeStructBegin(STRUCT_DESC);
4181
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4182
      oprot.writeI64(this.userId);
4183
      oprot.writeFieldEnd();
4184
      oprot.writeFieldStop();
4185
      oprot.writeStructEnd();
4186
    }
4187
 
4188
    @Override
4189
    public String toString() {
553 chandransh 4190
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4191
      boolean first = true;
4192
 
4193
      sb.append("userId:");
4194
      sb.append(this.userId);
4195
      first = false;
4196
      sb.append(")");
4197
      return sb.toString();
4198
    }
4199
 
4200
    public void validate() throws TException {
4201
      // check for required fields
4202
    }
4203
 
4204
  }
4205
 
571 rajveer 4206
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4207
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4208
 
4209
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4210
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4211
 
553 chandransh 4212
    private User success;
4213
    private UserContextException ucex;
48 ashish 4214
 
4215
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4216
    public enum _Fields implements TFieldIdEnum {
4217
      SUCCESS((short)0, "success"),
553 chandransh 4218
      UCEX((short)1, "ucex");
48 ashish 4219
 
4220
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4221
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4222
 
4223
      static {
4224
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4225
          byId.put((int)field._thriftId, field);
4226
          byName.put(field.getFieldName(), field);
4227
        }
4228
      }
4229
 
4230
      /**
4231
       * Find the _Fields constant that matches fieldId, or null if its not found.
4232
       */
4233
      public static _Fields findByThriftId(int fieldId) {
4234
        return byId.get(fieldId);
4235
      }
4236
 
4237
      /**
4238
       * Find the _Fields constant that matches fieldId, throwing an exception
4239
       * if it is not found.
4240
       */
4241
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4242
        _Fields fields = findByThriftId(fieldId);
4243
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4244
        return fields;
4245
      }
4246
 
4247
      /**
4248
       * Find the _Fields constant that matches name, or null if its not found.
4249
       */
4250
      public static _Fields findByName(String name) {
4251
        return byName.get(name);
4252
      }
4253
 
4254
      private final short _thriftId;
4255
      private final String _fieldName;
4256
 
4257
      _Fields(short thriftId, String fieldName) {
4258
        _thriftId = thriftId;
4259
        _fieldName = fieldName;
4260
      }
4261
 
4262
      public short getThriftFieldId() {
4263
        return _thriftId;
4264
      }
4265
 
4266
      public String getFieldName() {
4267
        return _fieldName;
4268
      }
4269
    }
4270
 
4271
    // isset id assignments
4272
 
4273
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4274
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4275
          new StructMetaData(TType.STRUCT, User.class)));
4276
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4277
          new FieldValueMetaData(TType.STRUCT)));
4278
    }});
4279
 
4280
    static {
553 chandransh 4281
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4282
    }
4283
 
553 chandransh 4284
    public getUserById_result() {
48 ashish 4285
    }
4286
 
553 chandransh 4287
    public getUserById_result(
4288
      User success,
4289
      UserContextException ucex)
48 ashish 4290
    {
4291
      this();
4292
      this.success = success;
553 chandransh 4293
      this.ucex = ucex;
48 ashish 4294
    }
4295
 
4296
    /**
4297
     * Performs a deep copy on <i>other</i>.
4298
     */
553 chandransh 4299
    public getUserById_result(getUserById_result other) {
48 ashish 4300
      if (other.isSetSuccess()) {
553 chandransh 4301
        this.success = new User(other.success);
48 ashish 4302
      }
553 chandransh 4303
      if (other.isSetUcex()) {
4304
        this.ucex = new UserContextException(other.ucex);
48 ashish 4305
      }
4306
    }
4307
 
553 chandransh 4308
    public getUserById_result deepCopy() {
4309
      return new getUserById_result(this);
48 ashish 4310
    }
4311
 
4312
    @Deprecated
553 chandransh 4313
    public getUserById_result clone() {
4314
      return new getUserById_result(this);
48 ashish 4315
    }
4316
 
553 chandransh 4317
    public User getSuccess() {
48 ashish 4318
      return this.success;
4319
    }
4320
 
553 chandransh 4321
    public getUserById_result setSuccess(User success) {
48 ashish 4322
      this.success = success;
4323
      return this;
4324
    }
4325
 
4326
    public void unsetSuccess() {
4327
      this.success = null;
4328
    }
4329
 
4330
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4331
    public boolean isSetSuccess() {
4332
      return this.success != null;
4333
    }
4334
 
4335
    public void setSuccessIsSet(boolean value) {
4336
      if (!value) {
4337
        this.success = null;
4338
      }
4339
    }
4340
 
553 chandransh 4341
    public UserContextException getUcex() {
4342
      return this.ucex;
48 ashish 4343
    }
4344
 
553 chandransh 4345
    public getUserById_result setUcex(UserContextException ucex) {
4346
      this.ucex = ucex;
48 ashish 4347
      return this;
4348
    }
4349
 
553 chandransh 4350
    public void unsetUcex() {
4351
      this.ucex = null;
48 ashish 4352
    }
4353
 
553 chandransh 4354
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4355
    public boolean isSetUcex() {
4356
      return this.ucex != null;
48 ashish 4357
    }
4358
 
553 chandransh 4359
    public void setUcexIsSet(boolean value) {
48 ashish 4360
      if (!value) {
553 chandransh 4361
        this.ucex = null;
48 ashish 4362
      }
4363
    }
4364
 
4365
    public void setFieldValue(_Fields field, Object value) {
4366
      switch (field) {
4367
      case SUCCESS:
4368
        if (value == null) {
4369
          unsetSuccess();
4370
        } else {
553 chandransh 4371
          setSuccess((User)value);
48 ashish 4372
        }
4373
        break;
4374
 
553 chandransh 4375
      case UCEX:
48 ashish 4376
        if (value == null) {
553 chandransh 4377
          unsetUcex();
48 ashish 4378
        } else {
553 chandransh 4379
          setUcex((UserContextException)value);
48 ashish 4380
        }
4381
        break;
4382
 
4383
      }
4384
    }
4385
 
4386
    public void setFieldValue(int fieldID, Object value) {
4387
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4388
    }
4389
 
4390
    public Object getFieldValue(_Fields field) {
4391
      switch (field) {
4392
      case SUCCESS:
4393
        return getSuccess();
4394
 
553 chandransh 4395
      case UCEX:
4396
        return getUcex();
48 ashish 4397
 
4398
      }
4399
      throw new IllegalStateException();
4400
    }
4401
 
4402
    public Object getFieldValue(int fieldId) {
4403
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4404
    }
4405
 
4406
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4407
    public boolean isSet(_Fields field) {
4408
      switch (field) {
4409
      case SUCCESS:
4410
        return isSetSuccess();
553 chandransh 4411
      case UCEX:
4412
        return isSetUcex();
48 ashish 4413
      }
4414
      throw new IllegalStateException();
4415
    }
4416
 
4417
    public boolean isSet(int fieldID) {
4418
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4419
    }
4420
 
4421
    @Override
4422
    public boolean equals(Object that) {
4423
      if (that == null)
4424
        return false;
553 chandransh 4425
      if (that instanceof getUserById_result)
4426
        return this.equals((getUserById_result)that);
48 ashish 4427
      return false;
4428
    }
4429
 
553 chandransh 4430
    public boolean equals(getUserById_result that) {
48 ashish 4431
      if (that == null)
4432
        return false;
4433
 
4434
      boolean this_present_success = true && this.isSetSuccess();
4435
      boolean that_present_success = true && that.isSetSuccess();
4436
      if (this_present_success || that_present_success) {
4437
        if (!(this_present_success && that_present_success))
4438
          return false;
4439
        if (!this.success.equals(that.success))
4440
          return false;
4441
      }
4442
 
553 chandransh 4443
      boolean this_present_ucex = true && this.isSetUcex();
4444
      boolean that_present_ucex = true && that.isSetUcex();
4445
      if (this_present_ucex || that_present_ucex) {
4446
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4447
          return false;
553 chandransh 4448
        if (!this.ucex.equals(that.ucex))
48 ashish 4449
          return false;
4450
      }
4451
 
4452
      return true;
4453
    }
4454
 
4455
    @Override
4456
    public int hashCode() {
4457
      return 0;
4458
    }
4459
 
571 rajveer 4460
    public int compareTo(getUserById_result other) {
4461
      if (!getClass().equals(other.getClass())) {
4462
        return getClass().getName().compareTo(other.getClass().getName());
4463
      }
4464
 
4465
      int lastComparison = 0;
4466
      getUserById_result typedOther = (getUserById_result)other;
4467
 
4468
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4469
      if (lastComparison != 0) {
4470
        return lastComparison;
4471
      }
4472
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4473
      if (lastComparison != 0) {
4474
        return lastComparison;
4475
      }
4476
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4477
      if (lastComparison != 0) {
4478
        return lastComparison;
4479
      }
4480
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4481
      if (lastComparison != 0) {
4482
        return lastComparison;
4483
      }
4484
      return 0;
4485
    }
4486
 
48 ashish 4487
    public void read(TProtocol iprot) throws TException {
4488
      TField field;
4489
      iprot.readStructBegin();
4490
      while (true)
4491
      {
4492
        field = iprot.readFieldBegin();
4493
        if (field.type == TType.STOP) { 
4494
          break;
4495
        }
4496
        _Fields fieldId = _Fields.findByThriftId(field.id);
4497
        if (fieldId == null) {
4498
          TProtocolUtil.skip(iprot, field.type);
4499
        } else {
4500
          switch (fieldId) {
4501
            case SUCCESS:
4502
              if (field.type == TType.STRUCT) {
553 chandransh 4503
                this.success = new User();
48 ashish 4504
                this.success.read(iprot);
4505
              } else { 
4506
                TProtocolUtil.skip(iprot, field.type);
4507
              }
4508
              break;
553 chandransh 4509
            case UCEX:
48 ashish 4510
              if (field.type == TType.STRUCT) {
553 chandransh 4511
                this.ucex = new UserContextException();
4512
                this.ucex.read(iprot);
48 ashish 4513
              } else { 
4514
                TProtocolUtil.skip(iprot, field.type);
4515
              }
4516
              break;
4517
          }
4518
          iprot.readFieldEnd();
4519
        }
4520
      }
4521
      iprot.readStructEnd();
4522
      validate();
4523
    }
4524
 
4525
    public void write(TProtocol oprot) throws TException {
4526
      oprot.writeStructBegin(STRUCT_DESC);
4527
 
4528
      if (this.isSetSuccess()) {
4529
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4530
        this.success.write(oprot);
4531
        oprot.writeFieldEnd();
553 chandransh 4532
      } else if (this.isSetUcex()) {
4533
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4534
        this.ucex.write(oprot);
48 ashish 4535
        oprot.writeFieldEnd();
4536
      }
4537
      oprot.writeFieldStop();
4538
      oprot.writeStructEnd();
4539
    }
4540
 
4541
    @Override
4542
    public String toString() {
553 chandransh 4543
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4544
      boolean first = true;
4545
 
4546
      sb.append("success:");
4547
      if (this.success == null) {
4548
        sb.append("null");
4549
      } else {
4550
        sb.append(this.success);
4551
      }
4552
      first = false;
4553
      if (!first) sb.append(", ");
553 chandransh 4554
      sb.append("ucex:");
4555
      if (this.ucex == null) {
48 ashish 4556
        sb.append("null");
4557
      } else {
553 chandransh 4558
        sb.append(this.ucex);
48 ashish 4559
      }
4560
      first = false;
4561
      sb.append(")");
4562
      return sb.toString();
4563
    }
4564
 
4565
    public void validate() throws TException {
4566
      // check for required fields
4567
    }
4568
 
4569
  }
4570
 
571 rajveer 4571
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4572
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4573
 
553 chandransh 4574
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4575
 
553 chandransh 4576
    private User user;
48 ashish 4577
 
4578
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4579
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4580
      USER((short)1, "user");
48 ashish 4581
 
4582
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4583
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4584
 
4585
      static {
4586
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4587
          byId.put((int)field._thriftId, field);
4588
          byName.put(field.getFieldName(), field);
4589
        }
4590
      }
4591
 
4592
      /**
4593
       * Find the _Fields constant that matches fieldId, or null if its not found.
4594
       */
4595
      public static _Fields findByThriftId(int fieldId) {
4596
        return byId.get(fieldId);
4597
      }
4598
 
4599
      /**
4600
       * Find the _Fields constant that matches fieldId, throwing an exception
4601
       * if it is not found.
4602
       */
4603
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4604
        _Fields fields = findByThriftId(fieldId);
4605
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4606
        return fields;
4607
      }
4608
 
4609
      /**
4610
       * Find the _Fields constant that matches name, or null if its not found.
4611
       */
4612
      public static _Fields findByName(String name) {
4613
        return byName.get(name);
4614
      }
4615
 
4616
      private final short _thriftId;
4617
      private final String _fieldName;
4618
 
4619
      _Fields(short thriftId, String fieldName) {
4620
        _thriftId = thriftId;
4621
        _fieldName = fieldName;
4622
      }
4623
 
4624
      public short getThriftFieldId() {
4625
        return _thriftId;
4626
      }
4627
 
4628
      public String getFieldName() {
4629
        return _fieldName;
4630
      }
4631
    }
4632
 
4633
    // isset id assignments
4634
 
4635
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4636
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4637
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4638
    }});
4639
 
4640
    static {
553 chandransh 4641
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4642
    }
4643
 
553 chandransh 4644
    public createUser_args() {
48 ashish 4645
    }
4646
 
553 chandransh 4647
    public createUser_args(
4648
      User user)
48 ashish 4649
    {
4650
      this();
553 chandransh 4651
      this.user = user;
48 ashish 4652
    }
4653
 
4654
    /**
4655
     * Performs a deep copy on <i>other</i>.
4656
     */
553 chandransh 4657
    public createUser_args(createUser_args other) {
4658
      if (other.isSetUser()) {
4659
        this.user = new User(other.user);
48 ashish 4660
      }
4661
    }
4662
 
553 chandransh 4663
    public createUser_args deepCopy() {
4664
      return new createUser_args(this);
48 ashish 4665
    }
4666
 
4667
    @Deprecated
553 chandransh 4668
    public createUser_args clone() {
4669
      return new createUser_args(this);
48 ashish 4670
    }
4671
 
553 chandransh 4672
    public User getUser() {
4673
      return this.user;
48 ashish 4674
    }
4675
 
553 chandransh 4676
    public createUser_args setUser(User user) {
4677
      this.user = user;
48 ashish 4678
      return this;
4679
    }
4680
 
553 chandransh 4681
    public void unsetUser() {
4682
      this.user = null;
48 ashish 4683
    }
4684
 
553 chandransh 4685
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4686
    public boolean isSetUser() {
4687
      return this.user != null;
48 ashish 4688
    }
4689
 
553 chandransh 4690
    public void setUserIsSet(boolean value) {
48 ashish 4691
      if (!value) {
553 chandransh 4692
        this.user = null;
48 ashish 4693
      }
4694
    }
4695
 
4696
    public void setFieldValue(_Fields field, Object value) {
4697
      switch (field) {
553 chandransh 4698
      case USER:
48 ashish 4699
        if (value == null) {
553 chandransh 4700
          unsetUser();
48 ashish 4701
        } else {
553 chandransh 4702
          setUser((User)value);
48 ashish 4703
        }
4704
        break;
4705
 
4706
      }
4707
    }
4708
 
4709
    public void setFieldValue(int fieldID, Object value) {
4710
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4711
    }
4712
 
4713
    public Object getFieldValue(_Fields field) {
4714
      switch (field) {
553 chandransh 4715
      case USER:
4716
        return getUser();
48 ashish 4717
 
4718
      }
4719
      throw new IllegalStateException();
4720
    }
4721
 
4722
    public Object getFieldValue(int fieldId) {
4723
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4724
    }
4725
 
4726
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4727
    public boolean isSet(_Fields field) {
4728
      switch (field) {
553 chandransh 4729
      case USER:
4730
        return isSetUser();
48 ashish 4731
      }
4732
      throw new IllegalStateException();
4733
    }
4734
 
4735
    public boolean isSet(int fieldID) {
4736
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4737
    }
4738
 
4739
    @Override
4740
    public boolean equals(Object that) {
4741
      if (that == null)
4742
        return false;
553 chandransh 4743
      if (that instanceof createUser_args)
4744
        return this.equals((createUser_args)that);
48 ashish 4745
      return false;
4746
    }
4747
 
553 chandransh 4748
    public boolean equals(createUser_args that) {
48 ashish 4749
      if (that == null)
4750
        return false;
4751
 
553 chandransh 4752
      boolean this_present_user = true && this.isSetUser();
4753
      boolean that_present_user = true && that.isSetUser();
4754
      if (this_present_user || that_present_user) {
4755
        if (!(this_present_user && that_present_user))
48 ashish 4756
          return false;
553 chandransh 4757
        if (!this.user.equals(that.user))
48 ashish 4758
          return false;
4759
      }
4760
 
4761
      return true;
4762
    }
4763
 
4764
    @Override
4765
    public int hashCode() {
4766
      return 0;
4767
    }
4768
 
571 rajveer 4769
    public int compareTo(createUser_args other) {
4770
      if (!getClass().equals(other.getClass())) {
4771
        return getClass().getName().compareTo(other.getClass().getName());
4772
      }
4773
 
4774
      int lastComparison = 0;
4775
      createUser_args typedOther = (createUser_args)other;
4776
 
4777
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4778
      if (lastComparison != 0) {
4779
        return lastComparison;
4780
      }
4781
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4782
      if (lastComparison != 0) {
4783
        return lastComparison;
4784
      }
4785
      return 0;
4786
    }
4787
 
48 ashish 4788
    public void read(TProtocol iprot) throws TException {
4789
      TField field;
4790
      iprot.readStructBegin();
4791
      while (true)
4792
      {
4793
        field = iprot.readFieldBegin();
4794
        if (field.type == TType.STOP) { 
4795
          break;
4796
        }
4797
        _Fields fieldId = _Fields.findByThriftId(field.id);
4798
        if (fieldId == null) {
4799
          TProtocolUtil.skip(iprot, field.type);
4800
        } else {
4801
          switch (fieldId) {
553 chandransh 4802
            case USER:
4803
              if (field.type == TType.STRUCT) {
4804
                this.user = new User();
4805
                this.user.read(iprot);
48 ashish 4806
              } else { 
4807
                TProtocolUtil.skip(iprot, field.type);
4808
              }
4809
              break;
4810
          }
4811
          iprot.readFieldEnd();
4812
        }
4813
      }
4814
      iprot.readStructEnd();
4815
      validate();
4816
    }
4817
 
4818
    public void write(TProtocol oprot) throws TException {
4819
      validate();
4820
 
4821
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4822
      if (this.user != null) {
4823
        oprot.writeFieldBegin(USER_FIELD_DESC);
4824
        this.user.write(oprot);
48 ashish 4825
        oprot.writeFieldEnd();
4826
      }
4827
      oprot.writeFieldStop();
4828
      oprot.writeStructEnd();
4829
    }
4830
 
4831
    @Override
4832
    public String toString() {
553 chandransh 4833
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4834
      boolean first = true;
4835
 
553 chandransh 4836
      sb.append("user:");
4837
      if (this.user == null) {
48 ashish 4838
        sb.append("null");
4839
      } else {
553 chandransh 4840
        sb.append(this.user);
48 ashish 4841
      }
4842
      first = false;
4843
      sb.append(")");
4844
      return sb.toString();
4845
    }
4846
 
4847
    public void validate() throws TException {
4848
      // check for required fields
4849
    }
4850
 
4851
  }
4852
 
571 rajveer 4853
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4854
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4855
 
4856
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4857
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4858
 
553 chandransh 4859
    private User success;
4860
    private UserContextException ucex;
48 ashish 4861
 
4862
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4863
    public enum _Fields implements TFieldIdEnum {
4864
      SUCCESS((short)0, "success"),
553 chandransh 4865
      UCEX((short)1, "ucex");
48 ashish 4866
 
4867
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4868
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4869
 
4870
      static {
4871
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4872
          byId.put((int)field._thriftId, field);
4873
          byName.put(field.getFieldName(), field);
4874
        }
4875
      }
4876
 
4877
      /**
4878
       * Find the _Fields constant that matches fieldId, or null if its not found.
4879
       */
4880
      public static _Fields findByThriftId(int fieldId) {
4881
        return byId.get(fieldId);
4882
      }
4883
 
4884
      /**
4885
       * Find the _Fields constant that matches fieldId, throwing an exception
4886
       * if it is not found.
4887
       */
4888
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4889
        _Fields fields = findByThriftId(fieldId);
4890
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4891
        return fields;
4892
      }
4893
 
4894
      /**
4895
       * Find the _Fields constant that matches name, or null if its not found.
4896
       */
4897
      public static _Fields findByName(String name) {
4898
        return byName.get(name);
4899
      }
4900
 
4901
      private final short _thriftId;
4902
      private final String _fieldName;
4903
 
4904
      _Fields(short thriftId, String fieldName) {
4905
        _thriftId = thriftId;
4906
        _fieldName = fieldName;
4907
      }
4908
 
4909
      public short getThriftFieldId() {
4910
        return _thriftId;
4911
      }
4912
 
4913
      public String getFieldName() {
4914
        return _fieldName;
4915
      }
4916
    }
4917
 
4918
    // isset id assignments
4919
 
4920
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4921
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4922
          new StructMetaData(TType.STRUCT, User.class)));
4923
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4924
          new FieldValueMetaData(TType.STRUCT)));
4925
    }});
4926
 
4927
    static {
553 chandransh 4928
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4929
    }
4930
 
553 chandransh 4931
    public createUser_result() {
48 ashish 4932
    }
4933
 
553 chandransh 4934
    public createUser_result(
4935
      User success,
4936
      UserContextException ucex)
48 ashish 4937
    {
4938
      this();
4939
      this.success = success;
553 chandransh 4940
      this.ucex = ucex;
48 ashish 4941
    }
4942
 
4943
    /**
4944
     * Performs a deep copy on <i>other</i>.
4945
     */
553 chandransh 4946
    public createUser_result(createUser_result other) {
48 ashish 4947
      if (other.isSetSuccess()) {
553 chandransh 4948
        this.success = new User(other.success);
48 ashish 4949
      }
553 chandransh 4950
      if (other.isSetUcex()) {
4951
        this.ucex = new UserContextException(other.ucex);
48 ashish 4952
      }
4953
    }
4954
 
553 chandransh 4955
    public createUser_result deepCopy() {
4956
      return new createUser_result(this);
48 ashish 4957
    }
4958
 
4959
    @Deprecated
553 chandransh 4960
    public createUser_result clone() {
4961
      return new createUser_result(this);
48 ashish 4962
    }
4963
 
553 chandransh 4964
    public User getSuccess() {
48 ashish 4965
      return this.success;
4966
    }
4967
 
553 chandransh 4968
    public createUser_result setSuccess(User success) {
48 ashish 4969
      this.success = success;
4970
      return this;
4971
    }
4972
 
4973
    public void unsetSuccess() {
4974
      this.success = null;
4975
    }
4976
 
4977
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4978
    public boolean isSetSuccess() {
4979
      return this.success != null;
4980
    }
4981
 
4982
    public void setSuccessIsSet(boolean value) {
4983
      if (!value) {
4984
        this.success = null;
4985
      }
4986
    }
4987
 
553 chandransh 4988
    public UserContextException getUcex() {
4989
      return this.ucex;
48 ashish 4990
    }
4991
 
553 chandransh 4992
    public createUser_result setUcex(UserContextException ucex) {
4993
      this.ucex = ucex;
48 ashish 4994
      return this;
4995
    }
4996
 
553 chandransh 4997
    public void unsetUcex() {
4998
      this.ucex = null;
48 ashish 4999
    }
5000
 
553 chandransh 5001
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5002
    public boolean isSetUcex() {
5003
      return this.ucex != null;
48 ashish 5004
    }
5005
 
553 chandransh 5006
    public void setUcexIsSet(boolean value) {
48 ashish 5007
      if (!value) {
553 chandransh 5008
        this.ucex = null;
48 ashish 5009
      }
5010
    }
5011
 
5012
    public void setFieldValue(_Fields field, Object value) {
5013
      switch (field) {
5014
      case SUCCESS:
5015
        if (value == null) {
5016
          unsetSuccess();
5017
        } else {
553 chandransh 5018
          setSuccess((User)value);
48 ashish 5019
        }
5020
        break;
5021
 
553 chandransh 5022
      case UCEX:
48 ashish 5023
        if (value == null) {
553 chandransh 5024
          unsetUcex();
48 ashish 5025
        } else {
553 chandransh 5026
          setUcex((UserContextException)value);
48 ashish 5027
        }
5028
        break;
5029
 
5030
      }
5031
    }
5032
 
5033
    public void setFieldValue(int fieldID, Object value) {
5034
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5035
    }
5036
 
5037
    public Object getFieldValue(_Fields field) {
5038
      switch (field) {
5039
      case SUCCESS:
5040
        return getSuccess();
5041
 
553 chandransh 5042
      case UCEX:
5043
        return getUcex();
48 ashish 5044
 
5045
      }
5046
      throw new IllegalStateException();
5047
    }
5048
 
5049
    public Object getFieldValue(int fieldId) {
5050
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5051
    }
5052
 
5053
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5054
    public boolean isSet(_Fields field) {
5055
      switch (field) {
5056
      case SUCCESS:
5057
        return isSetSuccess();
553 chandransh 5058
      case UCEX:
5059
        return isSetUcex();
48 ashish 5060
      }
5061
      throw new IllegalStateException();
5062
    }
5063
 
5064
    public boolean isSet(int fieldID) {
5065
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5066
    }
5067
 
5068
    @Override
5069
    public boolean equals(Object that) {
5070
      if (that == null)
5071
        return false;
553 chandransh 5072
      if (that instanceof createUser_result)
5073
        return this.equals((createUser_result)that);
48 ashish 5074
      return false;
5075
    }
5076
 
553 chandransh 5077
    public boolean equals(createUser_result that) {
48 ashish 5078
      if (that == null)
5079
        return false;
5080
 
5081
      boolean this_present_success = true && this.isSetSuccess();
5082
      boolean that_present_success = true && that.isSetSuccess();
5083
      if (this_present_success || that_present_success) {
5084
        if (!(this_present_success && that_present_success))
5085
          return false;
5086
        if (!this.success.equals(that.success))
5087
          return false;
5088
      }
5089
 
553 chandransh 5090
      boolean this_present_ucex = true && this.isSetUcex();
5091
      boolean that_present_ucex = true && that.isSetUcex();
5092
      if (this_present_ucex || that_present_ucex) {
5093
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5094
          return false;
553 chandransh 5095
        if (!this.ucex.equals(that.ucex))
48 ashish 5096
          return false;
5097
      }
5098
 
5099
      return true;
5100
    }
5101
 
5102
    @Override
5103
    public int hashCode() {
5104
      return 0;
5105
    }
5106
 
571 rajveer 5107
    public int compareTo(createUser_result other) {
5108
      if (!getClass().equals(other.getClass())) {
5109
        return getClass().getName().compareTo(other.getClass().getName());
5110
      }
5111
 
5112
      int lastComparison = 0;
5113
      createUser_result typedOther = (createUser_result)other;
5114
 
5115
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5116
      if (lastComparison != 0) {
5117
        return lastComparison;
5118
      }
5119
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5120
      if (lastComparison != 0) {
5121
        return lastComparison;
5122
      }
5123
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5124
      if (lastComparison != 0) {
5125
        return lastComparison;
5126
      }
5127
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5128
      if (lastComparison != 0) {
5129
        return lastComparison;
5130
      }
5131
      return 0;
5132
    }
5133
 
48 ashish 5134
    public void read(TProtocol iprot) throws TException {
5135
      TField field;
5136
      iprot.readStructBegin();
5137
      while (true)
5138
      {
5139
        field = iprot.readFieldBegin();
5140
        if (field.type == TType.STOP) { 
5141
          break;
5142
        }
5143
        _Fields fieldId = _Fields.findByThriftId(field.id);
5144
        if (fieldId == null) {
5145
          TProtocolUtil.skip(iprot, field.type);
5146
        } else {
5147
          switch (fieldId) {
5148
            case SUCCESS:
5149
              if (field.type == TType.STRUCT) {
553 chandransh 5150
                this.success = new User();
48 ashish 5151
                this.success.read(iprot);
5152
              } else { 
5153
                TProtocolUtil.skip(iprot, field.type);
5154
              }
5155
              break;
553 chandransh 5156
            case UCEX:
48 ashish 5157
              if (field.type == TType.STRUCT) {
553 chandransh 5158
                this.ucex = new UserContextException();
5159
                this.ucex.read(iprot);
48 ashish 5160
              } else { 
5161
                TProtocolUtil.skip(iprot, field.type);
5162
              }
5163
              break;
5164
          }
5165
          iprot.readFieldEnd();
5166
        }
5167
      }
5168
      iprot.readStructEnd();
5169
      validate();
5170
    }
5171
 
5172
    public void write(TProtocol oprot) throws TException {
5173
      oprot.writeStructBegin(STRUCT_DESC);
5174
 
5175
      if (this.isSetSuccess()) {
5176
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5177
        this.success.write(oprot);
5178
        oprot.writeFieldEnd();
553 chandransh 5179
      } else if (this.isSetUcex()) {
5180
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5181
        this.ucex.write(oprot);
48 ashish 5182
        oprot.writeFieldEnd();
5183
      }
5184
      oprot.writeFieldStop();
5185
      oprot.writeStructEnd();
5186
    }
5187
 
5188
    @Override
5189
    public String toString() {
553 chandransh 5190
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5191
      boolean first = true;
5192
 
5193
      sb.append("success:");
5194
      if (this.success == null) {
5195
        sb.append("null");
5196
      } else {
5197
        sb.append(this.success);
5198
      }
5199
      first = false;
5200
      if (!first) sb.append(", ");
553 chandransh 5201
      sb.append("ucex:");
5202
      if (this.ucex == null) {
48 ashish 5203
        sb.append("null");
5204
      } else {
553 chandransh 5205
        sb.append(this.ucex);
48 ashish 5206
      }
5207
      first = false;
5208
      sb.append(")");
5209
      return sb.toString();
5210
    }
5211
 
5212
    public void validate() throws TException {
5213
      // check for required fields
5214
    }
5215
 
5216
  }
5217
 
571 rajveer 5218
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5219
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5220
 
553 chandransh 5221
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5222
 
553 chandransh 5223
    private User user;
48 ashish 5224
 
5225
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5226
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5227
      USER((short)1, "user");
48 ashish 5228
 
5229
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5230
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5231
 
5232
      static {
5233
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5234
          byId.put((int)field._thriftId, field);
5235
          byName.put(field.getFieldName(), field);
5236
        }
5237
      }
5238
 
5239
      /**
5240
       * Find the _Fields constant that matches fieldId, or null if its not found.
5241
       */
5242
      public static _Fields findByThriftId(int fieldId) {
5243
        return byId.get(fieldId);
5244
      }
5245
 
5246
      /**
5247
       * Find the _Fields constant that matches fieldId, throwing an exception
5248
       * if it is not found.
5249
       */
5250
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5251
        _Fields fields = findByThriftId(fieldId);
5252
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5253
        return fields;
5254
      }
5255
 
5256
      /**
5257
       * Find the _Fields constant that matches name, or null if its not found.
5258
       */
5259
      public static _Fields findByName(String name) {
5260
        return byName.get(name);
5261
      }
5262
 
5263
      private final short _thriftId;
5264
      private final String _fieldName;
5265
 
5266
      _Fields(short thriftId, String fieldName) {
5267
        _thriftId = thriftId;
5268
        _fieldName = fieldName;
5269
      }
5270
 
5271
      public short getThriftFieldId() {
5272
        return _thriftId;
5273
      }
5274
 
5275
      public String getFieldName() {
5276
        return _fieldName;
5277
      }
5278
    }
5279
 
5280
    // isset id assignments
5281
 
5282
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5283
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5284
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5285
    }});
5286
 
5287
    static {
553 chandransh 5288
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5289
    }
5290
 
553 chandransh 5291
    public updateUser_args() {
48 ashish 5292
    }
5293
 
553 chandransh 5294
    public updateUser_args(
5295
      User user)
48 ashish 5296
    {
5297
      this();
553 chandransh 5298
      this.user = user;
48 ashish 5299
    }
5300
 
5301
    /**
5302
     * Performs a deep copy on <i>other</i>.
5303
     */
553 chandransh 5304
    public updateUser_args(updateUser_args other) {
5305
      if (other.isSetUser()) {
5306
        this.user = new User(other.user);
5307
      }
48 ashish 5308
    }
5309
 
553 chandransh 5310
    public updateUser_args deepCopy() {
5311
      return new updateUser_args(this);
48 ashish 5312
    }
5313
 
5314
    @Deprecated
553 chandransh 5315
    public updateUser_args clone() {
5316
      return new updateUser_args(this);
48 ashish 5317
    }
5318
 
553 chandransh 5319
    public User getUser() {
5320
      return this.user;
48 ashish 5321
    }
5322
 
553 chandransh 5323
    public updateUser_args setUser(User user) {
5324
      this.user = user;
48 ashish 5325
      return this;
5326
    }
5327
 
553 chandransh 5328
    public void unsetUser() {
5329
      this.user = null;
48 ashish 5330
    }
5331
 
553 chandransh 5332
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5333
    public boolean isSetUser() {
5334
      return this.user != null;
48 ashish 5335
    }
5336
 
553 chandransh 5337
    public void setUserIsSet(boolean value) {
5338
      if (!value) {
5339
        this.user = null;
5340
      }
48 ashish 5341
    }
5342
 
5343
    public void setFieldValue(_Fields field, Object value) {
5344
      switch (field) {
553 chandransh 5345
      case USER:
48 ashish 5346
        if (value == null) {
553 chandransh 5347
          unsetUser();
48 ashish 5348
        } else {
553 chandransh 5349
          setUser((User)value);
48 ashish 5350
        }
5351
        break;
5352
 
5353
      }
5354
    }
5355
 
5356
    public void setFieldValue(int fieldID, Object value) {
5357
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5358
    }
5359
 
5360
    public Object getFieldValue(_Fields field) {
5361
      switch (field) {
553 chandransh 5362
      case USER:
5363
        return getUser();
48 ashish 5364
 
5365
      }
5366
      throw new IllegalStateException();
5367
    }
5368
 
5369
    public Object getFieldValue(int fieldId) {
5370
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5371
    }
5372
 
5373
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5374
    public boolean isSet(_Fields field) {
5375
      switch (field) {
553 chandransh 5376
      case USER:
5377
        return isSetUser();
48 ashish 5378
      }
5379
      throw new IllegalStateException();
5380
    }
5381
 
5382
    public boolean isSet(int fieldID) {
5383
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5384
    }
5385
 
5386
    @Override
5387
    public boolean equals(Object that) {
5388
      if (that == null)
5389
        return false;
553 chandransh 5390
      if (that instanceof updateUser_args)
5391
        return this.equals((updateUser_args)that);
48 ashish 5392
      return false;
5393
    }
5394
 
553 chandransh 5395
    public boolean equals(updateUser_args that) {
48 ashish 5396
      if (that == null)
5397
        return false;
5398
 
553 chandransh 5399
      boolean this_present_user = true && this.isSetUser();
5400
      boolean that_present_user = true && that.isSetUser();
5401
      if (this_present_user || that_present_user) {
5402
        if (!(this_present_user && that_present_user))
48 ashish 5403
          return false;
553 chandransh 5404
        if (!this.user.equals(that.user))
48 ashish 5405
          return false;
5406
      }
5407
 
5408
      return true;
5409
    }
5410
 
5411
    @Override
5412
    public int hashCode() {
5413
      return 0;
5414
    }
5415
 
571 rajveer 5416
    public int compareTo(updateUser_args other) {
5417
      if (!getClass().equals(other.getClass())) {
5418
        return getClass().getName().compareTo(other.getClass().getName());
5419
      }
5420
 
5421
      int lastComparison = 0;
5422
      updateUser_args typedOther = (updateUser_args)other;
5423
 
5424
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5425
      if (lastComparison != 0) {
5426
        return lastComparison;
5427
      }
5428
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5429
      if (lastComparison != 0) {
5430
        return lastComparison;
5431
      }
5432
      return 0;
5433
    }
5434
 
48 ashish 5435
    public void read(TProtocol iprot) throws TException {
5436
      TField field;
5437
      iprot.readStructBegin();
5438
      while (true)
5439
      {
5440
        field = iprot.readFieldBegin();
5441
        if (field.type == TType.STOP) { 
5442
          break;
5443
        }
5444
        _Fields fieldId = _Fields.findByThriftId(field.id);
5445
        if (fieldId == null) {
5446
          TProtocolUtil.skip(iprot, field.type);
5447
        } else {
5448
          switch (fieldId) {
553 chandransh 5449
            case USER:
5450
              if (field.type == TType.STRUCT) {
5451
                this.user = new User();
5452
                this.user.read(iprot);
48 ashish 5453
              } else { 
5454
                TProtocolUtil.skip(iprot, field.type);
5455
              }
5456
              break;
5457
          }
5458
          iprot.readFieldEnd();
5459
        }
5460
      }
5461
      iprot.readStructEnd();
5462
      validate();
5463
    }
5464
 
5465
    public void write(TProtocol oprot) throws TException {
5466
      validate();
5467
 
5468
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5469
      if (this.user != null) {
5470
        oprot.writeFieldBegin(USER_FIELD_DESC);
5471
        this.user.write(oprot);
5472
        oprot.writeFieldEnd();
5473
      }
48 ashish 5474
      oprot.writeFieldStop();
5475
      oprot.writeStructEnd();
5476
    }
5477
 
5478
    @Override
5479
    public String toString() {
553 chandransh 5480
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5481
      boolean first = true;
5482
 
553 chandransh 5483
      sb.append("user:");
5484
      if (this.user == null) {
5485
        sb.append("null");
5486
      } else {
5487
        sb.append(this.user);
5488
      }
48 ashish 5489
      first = false;
5490
      sb.append(")");
5491
      return sb.toString();
5492
    }
5493
 
5494
    public void validate() throws TException {
5495
      // check for required fields
5496
    }
5497
 
5498
  }
5499
 
571 rajveer 5500
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5501
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5502
 
5503
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5504
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5505
 
553 chandransh 5506
    private User success;
5507
    private UserContextException ucex;
48 ashish 5508
 
5509
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5510
    public enum _Fields implements TFieldIdEnum {
5511
      SUCCESS((short)0, "success"),
553 chandransh 5512
      UCEX((short)1, "ucex");
48 ashish 5513
 
5514
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5515
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5516
 
5517
      static {
5518
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5519
          byId.put((int)field._thriftId, field);
5520
          byName.put(field.getFieldName(), field);
5521
        }
5522
      }
5523
 
5524
      /**
5525
       * Find the _Fields constant that matches fieldId, or null if its not found.
5526
       */
5527
      public static _Fields findByThriftId(int fieldId) {
5528
        return byId.get(fieldId);
5529
      }
5530
 
5531
      /**
5532
       * Find the _Fields constant that matches fieldId, throwing an exception
5533
       * if it is not found.
5534
       */
5535
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5536
        _Fields fields = findByThriftId(fieldId);
5537
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5538
        return fields;
5539
      }
5540
 
5541
      /**
5542
       * Find the _Fields constant that matches name, or null if its not found.
5543
       */
5544
      public static _Fields findByName(String name) {
5545
        return byName.get(name);
5546
      }
5547
 
5548
      private final short _thriftId;
5549
      private final String _fieldName;
5550
 
5551
      _Fields(short thriftId, String fieldName) {
5552
        _thriftId = thriftId;
5553
        _fieldName = fieldName;
5554
      }
5555
 
5556
      public short getThriftFieldId() {
5557
        return _thriftId;
5558
      }
5559
 
5560
      public String getFieldName() {
5561
        return _fieldName;
5562
      }
5563
    }
5564
 
5565
    // isset id assignments
5566
 
5567
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5568
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5569
          new StructMetaData(TType.STRUCT, User.class)));
5570
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5571
          new FieldValueMetaData(TType.STRUCT)));
5572
    }});
5573
 
5574
    static {
553 chandransh 5575
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5576
    }
5577
 
553 chandransh 5578
    public updateUser_result() {
48 ashish 5579
    }
5580
 
553 chandransh 5581
    public updateUser_result(
5582
      User success,
5583
      UserContextException ucex)
48 ashish 5584
    {
5585
      this();
5586
      this.success = success;
553 chandransh 5587
      this.ucex = ucex;
48 ashish 5588
    }
5589
 
5590
    /**
5591
     * Performs a deep copy on <i>other</i>.
5592
     */
553 chandransh 5593
    public updateUser_result(updateUser_result other) {
48 ashish 5594
      if (other.isSetSuccess()) {
553 chandransh 5595
        this.success = new User(other.success);
48 ashish 5596
      }
553 chandransh 5597
      if (other.isSetUcex()) {
5598
        this.ucex = new UserContextException(other.ucex);
48 ashish 5599
      }
5600
    }
5601
 
553 chandransh 5602
    public updateUser_result deepCopy() {
5603
      return new updateUser_result(this);
48 ashish 5604
    }
5605
 
5606
    @Deprecated
553 chandransh 5607
    public updateUser_result clone() {
5608
      return new updateUser_result(this);
48 ashish 5609
    }
5610
 
553 chandransh 5611
    public User getSuccess() {
48 ashish 5612
      return this.success;
5613
    }
5614
 
553 chandransh 5615
    public updateUser_result setSuccess(User success) {
48 ashish 5616
      this.success = success;
5617
      return this;
5618
    }
5619
 
5620
    public void unsetSuccess() {
5621
      this.success = null;
5622
    }
5623
 
5624
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5625
    public boolean isSetSuccess() {
5626
      return this.success != null;
5627
    }
5628
 
5629
    public void setSuccessIsSet(boolean value) {
5630
      if (!value) {
5631
        this.success = null;
5632
      }
5633
    }
5634
 
553 chandransh 5635
    public UserContextException getUcex() {
5636
      return this.ucex;
48 ashish 5637
    }
5638
 
553 chandransh 5639
    public updateUser_result setUcex(UserContextException ucex) {
5640
      this.ucex = ucex;
48 ashish 5641
      return this;
5642
    }
5643
 
553 chandransh 5644
    public void unsetUcex() {
5645
      this.ucex = null;
48 ashish 5646
    }
5647
 
553 chandransh 5648
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5649
    public boolean isSetUcex() {
5650
      return this.ucex != null;
48 ashish 5651
    }
5652
 
553 chandransh 5653
    public void setUcexIsSet(boolean value) {
48 ashish 5654
      if (!value) {
553 chandransh 5655
        this.ucex = null;
48 ashish 5656
      }
5657
    }
5658
 
5659
    public void setFieldValue(_Fields field, Object value) {
5660
      switch (field) {
5661
      case SUCCESS:
5662
        if (value == null) {
5663
          unsetSuccess();
5664
        } else {
553 chandransh 5665
          setSuccess((User)value);
48 ashish 5666
        }
5667
        break;
5668
 
553 chandransh 5669
      case UCEX:
48 ashish 5670
        if (value == null) {
553 chandransh 5671
          unsetUcex();
48 ashish 5672
        } else {
553 chandransh 5673
          setUcex((UserContextException)value);
48 ashish 5674
        }
5675
        break;
5676
 
5677
      }
5678
    }
5679
 
5680
    public void setFieldValue(int fieldID, Object value) {
5681
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5682
    }
5683
 
5684
    public Object getFieldValue(_Fields field) {
5685
      switch (field) {
5686
      case SUCCESS:
5687
        return getSuccess();
5688
 
553 chandransh 5689
      case UCEX:
5690
        return getUcex();
48 ashish 5691
 
5692
      }
5693
      throw new IllegalStateException();
5694
    }
5695
 
5696
    public Object getFieldValue(int fieldId) {
5697
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5698
    }
5699
 
5700
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5701
    public boolean isSet(_Fields field) {
5702
      switch (field) {
5703
      case SUCCESS:
5704
        return isSetSuccess();
553 chandransh 5705
      case UCEX:
5706
        return isSetUcex();
48 ashish 5707
      }
5708
      throw new IllegalStateException();
5709
    }
5710
 
5711
    public boolean isSet(int fieldID) {
5712
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5713
    }
5714
 
5715
    @Override
5716
    public boolean equals(Object that) {
5717
      if (that == null)
5718
        return false;
553 chandransh 5719
      if (that instanceof updateUser_result)
5720
        return this.equals((updateUser_result)that);
48 ashish 5721
      return false;
5722
    }
5723
 
553 chandransh 5724
    public boolean equals(updateUser_result that) {
48 ashish 5725
      if (that == null)
5726
        return false;
5727
 
5728
      boolean this_present_success = true && this.isSetSuccess();
5729
      boolean that_present_success = true && that.isSetSuccess();
5730
      if (this_present_success || that_present_success) {
5731
        if (!(this_present_success && that_present_success))
5732
          return false;
5733
        if (!this.success.equals(that.success))
5734
          return false;
5735
      }
5736
 
553 chandransh 5737
      boolean this_present_ucex = true && this.isSetUcex();
5738
      boolean that_present_ucex = true && that.isSetUcex();
5739
      if (this_present_ucex || that_present_ucex) {
5740
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5741
          return false;
553 chandransh 5742
        if (!this.ucex.equals(that.ucex))
48 ashish 5743
          return false;
5744
      }
5745
 
5746
      return true;
5747
    }
5748
 
5749
    @Override
5750
    public int hashCode() {
5751
      return 0;
5752
    }
5753
 
571 rajveer 5754
    public int compareTo(updateUser_result other) {
5755
      if (!getClass().equals(other.getClass())) {
5756
        return getClass().getName().compareTo(other.getClass().getName());
5757
      }
5758
 
5759
      int lastComparison = 0;
5760
      updateUser_result typedOther = (updateUser_result)other;
5761
 
5762
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5763
      if (lastComparison != 0) {
5764
        return lastComparison;
5765
      }
5766
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5767
      if (lastComparison != 0) {
5768
        return lastComparison;
5769
      }
5770
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5771
      if (lastComparison != 0) {
5772
        return lastComparison;
5773
      }
5774
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5775
      if (lastComparison != 0) {
5776
        return lastComparison;
5777
      }
5778
      return 0;
5779
    }
5780
 
48 ashish 5781
    public void read(TProtocol iprot) throws TException {
5782
      TField field;
5783
      iprot.readStructBegin();
5784
      while (true)
5785
      {
5786
        field = iprot.readFieldBegin();
5787
        if (field.type == TType.STOP) { 
5788
          break;
5789
        }
5790
        _Fields fieldId = _Fields.findByThriftId(field.id);
5791
        if (fieldId == null) {
5792
          TProtocolUtil.skip(iprot, field.type);
5793
        } else {
5794
          switch (fieldId) {
5795
            case SUCCESS:
5796
              if (field.type == TType.STRUCT) {
553 chandransh 5797
                this.success = new User();
48 ashish 5798
                this.success.read(iprot);
5799
              } else { 
5800
                TProtocolUtil.skip(iprot, field.type);
5801
              }
5802
              break;
553 chandransh 5803
            case UCEX:
48 ashish 5804
              if (field.type == TType.STRUCT) {
553 chandransh 5805
                this.ucex = new UserContextException();
5806
                this.ucex.read(iprot);
48 ashish 5807
              } else { 
5808
                TProtocolUtil.skip(iprot, field.type);
5809
              }
5810
              break;
5811
          }
5812
          iprot.readFieldEnd();
5813
        }
5814
      }
5815
      iprot.readStructEnd();
5816
      validate();
5817
    }
5818
 
5819
    public void write(TProtocol oprot) throws TException {
5820
      oprot.writeStructBegin(STRUCT_DESC);
5821
 
5822
      if (this.isSetSuccess()) {
5823
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5824
        this.success.write(oprot);
5825
        oprot.writeFieldEnd();
553 chandransh 5826
      } else if (this.isSetUcex()) {
5827
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5828
        this.ucex.write(oprot);
48 ashish 5829
        oprot.writeFieldEnd();
5830
      }
5831
      oprot.writeFieldStop();
5832
      oprot.writeStructEnd();
5833
    }
5834
 
5835
    @Override
5836
    public String toString() {
553 chandransh 5837
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5838
      boolean first = true;
5839
 
5840
      sb.append("success:");
5841
      if (this.success == null) {
5842
        sb.append("null");
5843
      } else {
5844
        sb.append(this.success);
5845
      }
5846
      first = false;
5847
      if (!first) sb.append(", ");
553 chandransh 5848
      sb.append("ucex:");
5849
      if (this.ucex == null) {
48 ashish 5850
        sb.append("null");
5851
      } else {
553 chandransh 5852
        sb.append(this.ucex);
48 ashish 5853
      }
5854
      first = false;
5855
      sb.append(")");
5856
      return sb.toString();
5857
    }
5858
 
5859
    public void validate() throws TException {
5860
      // check for required fields
5861
    }
5862
 
5863
  }
5864
 
553 chandransh 5865
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5866
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5867
 
5868
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5869
 
5870
    private long userId;
5871
 
5872
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5873
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5874
      USER_ID((short)1, "userId");
48 ashish 5875
 
5876
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5877
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5878
 
5879
      static {
5880
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5881
          byId.put((int)field._thriftId, field);
5882
          byName.put(field.getFieldName(), field);
5883
        }
5884
      }
5885
 
5886
      /**
5887
       * Find the _Fields constant that matches fieldId, or null if its not found.
5888
       */
5889
      public static _Fields findByThriftId(int fieldId) {
5890
        return byId.get(fieldId);
5891
      }
5892
 
5893
      /**
5894
       * Find the _Fields constant that matches fieldId, throwing an exception
5895
       * if it is not found.
5896
       */
5897
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5898
        _Fields fields = findByThriftId(fieldId);
5899
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5900
        return fields;
5901
      }
5902
 
5903
      /**
5904
       * Find the _Fields constant that matches name, or null if its not found.
5905
       */
5906
      public static _Fields findByName(String name) {
5907
        return byName.get(name);
5908
      }
5909
 
5910
      private final short _thriftId;
5911
      private final String _fieldName;
5912
 
5913
      _Fields(short thriftId, String fieldName) {
5914
        _thriftId = thriftId;
5915
        _fieldName = fieldName;
5916
      }
5917
 
5918
      public short getThriftFieldId() {
5919
        return _thriftId;
5920
      }
5921
 
5922
      public String getFieldName() {
5923
        return _fieldName;
5924
      }
5925
    }
5926
 
5927
    // isset id assignments
5928
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5929
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5930
 
5931
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5932
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5933
          new FieldValueMetaData(TType.I64)));
5934
    }});
5935
 
5936
    static {
553 chandransh 5937
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5938
    }
5939
 
553 chandransh 5940
    public deleteUser_args() {
48 ashish 5941
    }
5942
 
553 chandransh 5943
    public deleteUser_args(
5944
      long userId)
48 ashish 5945
    {
5946
      this();
5947
      this.userId = userId;
5948
      setUserIdIsSet(true);
5949
    }
5950
 
5951
    /**
5952
     * Performs a deep copy on <i>other</i>.
5953
     */
553 chandransh 5954
    public deleteUser_args(deleteUser_args other) {
48 ashish 5955
      __isset_bit_vector.clear();
5956
      __isset_bit_vector.or(other.__isset_bit_vector);
5957
      this.userId = other.userId;
5958
    }
5959
 
553 chandransh 5960
    public deleteUser_args deepCopy() {
5961
      return new deleteUser_args(this);
48 ashish 5962
    }
5963
 
5964
    @Deprecated
553 chandransh 5965
    public deleteUser_args clone() {
5966
      return new deleteUser_args(this);
48 ashish 5967
    }
5968
 
5969
    public long getUserId() {
5970
      return this.userId;
5971
    }
5972
 
553 chandransh 5973
    public deleteUser_args setUserId(long userId) {
48 ashish 5974
      this.userId = userId;
5975
      setUserIdIsSet(true);
5976
      return this;
5977
    }
5978
 
5979
    public void unsetUserId() {
5980
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5981
    }
5982
 
5983
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5984
    public boolean isSetUserId() {
5985
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5986
    }
5987
 
5988
    public void setUserIdIsSet(boolean value) {
5989
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5990
    }
5991
 
5992
    public void setFieldValue(_Fields field, Object value) {
5993
      switch (field) {
5994
      case USER_ID:
5995
        if (value == null) {
5996
          unsetUserId();
5997
        } else {
5998
          setUserId((Long)value);
5999
        }
6000
        break;
6001
 
6002
      }
6003
    }
6004
 
6005
    public void setFieldValue(int fieldID, Object value) {
6006
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6007
    }
6008
 
6009
    public Object getFieldValue(_Fields field) {
6010
      switch (field) {
6011
      case USER_ID:
6012
        return new Long(getUserId());
6013
 
6014
      }
6015
      throw new IllegalStateException();
6016
    }
6017
 
6018
    public Object getFieldValue(int fieldId) {
6019
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6020
    }
6021
 
6022
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6023
    public boolean isSet(_Fields field) {
6024
      switch (field) {
6025
      case USER_ID:
6026
        return isSetUserId();
6027
      }
6028
      throw new IllegalStateException();
6029
    }
6030
 
6031
    public boolean isSet(int fieldID) {
6032
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6033
    }
6034
 
6035
    @Override
6036
    public boolean equals(Object that) {
6037
      if (that == null)
6038
        return false;
553 chandransh 6039
      if (that instanceof deleteUser_args)
6040
        return this.equals((deleteUser_args)that);
48 ashish 6041
      return false;
6042
    }
6043
 
553 chandransh 6044
    public boolean equals(deleteUser_args that) {
48 ashish 6045
      if (that == null)
6046
        return false;
6047
 
6048
      boolean this_present_userId = true;
6049
      boolean that_present_userId = true;
6050
      if (this_present_userId || that_present_userId) {
6051
        if (!(this_present_userId && that_present_userId))
6052
          return false;
6053
        if (this.userId != that.userId)
6054
          return false;
6055
      }
6056
 
6057
      return true;
6058
    }
6059
 
6060
    @Override
6061
    public int hashCode() {
6062
      return 0;
6063
    }
6064
 
553 chandransh 6065
    public int compareTo(deleteUser_args other) {
48 ashish 6066
      if (!getClass().equals(other.getClass())) {
6067
        return getClass().getName().compareTo(other.getClass().getName());
6068
      }
6069
 
6070
      int lastComparison = 0;
553 chandransh 6071
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6072
 
6073
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6074
      if (lastComparison != 0) {
6075
        return lastComparison;
6076
      }
6077
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6078
      if (lastComparison != 0) {
6079
        return lastComparison;
6080
      }
6081
      return 0;
6082
    }
6083
 
6084
    public void read(TProtocol iprot) throws TException {
6085
      TField field;
6086
      iprot.readStructBegin();
6087
      while (true)
6088
      {
6089
        field = iprot.readFieldBegin();
6090
        if (field.type == TType.STOP) { 
6091
          break;
6092
        }
6093
        _Fields fieldId = _Fields.findByThriftId(field.id);
6094
        if (fieldId == null) {
6095
          TProtocolUtil.skip(iprot, field.type);
6096
        } else {
6097
          switch (fieldId) {
6098
            case USER_ID:
6099
              if (field.type == TType.I64) {
6100
                this.userId = iprot.readI64();
6101
                setUserIdIsSet(true);
6102
              } else { 
6103
                TProtocolUtil.skip(iprot, field.type);
6104
              }
6105
              break;
6106
          }
6107
          iprot.readFieldEnd();
6108
        }
6109
      }
6110
      iprot.readStructEnd();
6111
      validate();
6112
    }
6113
 
6114
    public void write(TProtocol oprot) throws TException {
6115
      validate();
6116
 
6117
      oprot.writeStructBegin(STRUCT_DESC);
6118
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6119
      oprot.writeI64(this.userId);
6120
      oprot.writeFieldEnd();
6121
      oprot.writeFieldStop();
6122
      oprot.writeStructEnd();
6123
    }
6124
 
6125
    @Override
6126
    public String toString() {
553 chandransh 6127
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6128
      boolean first = true;
6129
 
6130
      sb.append("userId:");
6131
      sb.append(this.userId);
6132
      first = false;
6133
      sb.append(")");
6134
      return sb.toString();
6135
    }
6136
 
6137
    public void validate() throws TException {
6138
      // check for required fields
6139
    }
6140
 
6141
  }
6142
 
553 chandransh 6143
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6144
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6145
 
553 chandransh 6146
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6147
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6148
 
553 chandransh 6149
    private boolean success;
6150
    private UserContextException ucex;
48 ashish 6151
 
6152
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6153
    public enum _Fields implements TFieldIdEnum {
6154
      SUCCESS((short)0, "success"),
553 chandransh 6155
      UCEX((short)1, "ucex");
48 ashish 6156
 
6157
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6158
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6159
 
6160
      static {
6161
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6162
          byId.put((int)field._thriftId, field);
6163
          byName.put(field.getFieldName(), field);
6164
        }
6165
      }
6166
 
6167
      /**
6168
       * Find the _Fields constant that matches fieldId, or null if its not found.
6169
       */
6170
      public static _Fields findByThriftId(int fieldId) {
6171
        return byId.get(fieldId);
6172
      }
6173
 
6174
      /**
6175
       * Find the _Fields constant that matches fieldId, throwing an exception
6176
       * if it is not found.
6177
       */
6178
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6179
        _Fields fields = findByThriftId(fieldId);
6180
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6181
        return fields;
6182
      }
6183
 
6184
      /**
6185
       * Find the _Fields constant that matches name, or null if its not found.
6186
       */
6187
      public static _Fields findByName(String name) {
6188
        return byName.get(name);
6189
      }
6190
 
6191
      private final short _thriftId;
6192
      private final String _fieldName;
6193
 
6194
      _Fields(short thriftId, String fieldName) {
6195
        _thriftId = thriftId;
6196
        _fieldName = fieldName;
6197
      }
6198
 
6199
      public short getThriftFieldId() {
6200
        return _thriftId;
6201
      }
6202
 
6203
      public String getFieldName() {
6204
        return _fieldName;
6205
      }
6206
    }
6207
 
6208
    // isset id assignments
553 chandransh 6209
    private static final int __SUCCESS_ISSET_ID = 0;
6210
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6211
 
6212
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6213
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6214
          new FieldValueMetaData(TType.BOOL)));
6215
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6216
          new FieldValueMetaData(TType.STRUCT)));
6217
    }});
6218
 
6219
    static {
553 chandransh 6220
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6221
    }
6222
 
553 chandransh 6223
    public deleteUser_result() {
48 ashish 6224
    }
6225
 
553 chandransh 6226
    public deleteUser_result(
6227
      boolean success,
6228
      UserContextException ucex)
48 ashish 6229
    {
6230
      this();
6231
      this.success = success;
553 chandransh 6232
      setSuccessIsSet(true);
6233
      this.ucex = ucex;
48 ashish 6234
    }
6235
 
6236
    /**
6237
     * Performs a deep copy on <i>other</i>.
6238
     */
553 chandransh 6239
    public deleteUser_result(deleteUser_result other) {
6240
      __isset_bit_vector.clear();
6241
      __isset_bit_vector.or(other.__isset_bit_vector);
6242
      this.success = other.success;
6243
      if (other.isSetUcex()) {
6244
        this.ucex = new UserContextException(other.ucex);
48 ashish 6245
      }
6246
    }
6247
 
553 chandransh 6248
    public deleteUser_result deepCopy() {
6249
      return new deleteUser_result(this);
48 ashish 6250
    }
6251
 
6252
    @Deprecated
553 chandransh 6253
    public deleteUser_result clone() {
6254
      return new deleteUser_result(this);
48 ashish 6255
    }
6256
 
553 chandransh 6257
    public boolean isSuccess() {
48 ashish 6258
      return this.success;
6259
    }
6260
 
553 chandransh 6261
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6262
      this.success = success;
553 chandransh 6263
      setSuccessIsSet(true);
48 ashish 6264
      return this;
6265
    }
6266
 
6267
    public void unsetSuccess() {
553 chandransh 6268
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6269
    }
6270
 
6271
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6272
    public boolean isSetSuccess() {
553 chandransh 6273
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6274
    }
6275
 
6276
    public void setSuccessIsSet(boolean value) {
553 chandransh 6277
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6278
    }
6279
 
553 chandransh 6280
    public UserContextException getUcex() {
6281
      return this.ucex;
48 ashish 6282
    }
6283
 
553 chandransh 6284
    public deleteUser_result setUcex(UserContextException ucex) {
6285
      this.ucex = ucex;
48 ashish 6286
      return this;
6287
    }
6288
 
553 chandransh 6289
    public void unsetUcex() {
6290
      this.ucex = null;
48 ashish 6291
    }
6292
 
553 chandransh 6293
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6294
    public boolean isSetUcex() {
6295
      return this.ucex != null;
48 ashish 6296
    }
6297
 
553 chandransh 6298
    public void setUcexIsSet(boolean value) {
48 ashish 6299
      if (!value) {
553 chandransh 6300
        this.ucex = null;
48 ashish 6301
      }
6302
    }
6303
 
6304
    public void setFieldValue(_Fields field, Object value) {
6305
      switch (field) {
6306
      case SUCCESS:
6307
        if (value == null) {
6308
          unsetSuccess();
6309
        } else {
553 chandransh 6310
          setSuccess((Boolean)value);
48 ashish 6311
        }
6312
        break;
6313
 
553 chandransh 6314
      case UCEX:
48 ashish 6315
        if (value == null) {
553 chandransh 6316
          unsetUcex();
48 ashish 6317
        } else {
553 chandransh 6318
          setUcex((UserContextException)value);
48 ashish 6319
        }
6320
        break;
6321
 
6322
      }
6323
    }
6324
 
6325
    public void setFieldValue(int fieldID, Object value) {
6326
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6327
    }
6328
 
6329
    public Object getFieldValue(_Fields field) {
6330
      switch (field) {
6331
      case SUCCESS:
553 chandransh 6332
        return new Boolean(isSuccess());
48 ashish 6333
 
553 chandransh 6334
      case UCEX:
6335
        return getUcex();
48 ashish 6336
 
6337
      }
6338
      throw new IllegalStateException();
6339
    }
6340
 
6341
    public Object getFieldValue(int fieldId) {
6342
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6343
    }
6344
 
6345
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6346
    public boolean isSet(_Fields field) {
6347
      switch (field) {
6348
      case SUCCESS:
6349
        return isSetSuccess();
553 chandransh 6350
      case UCEX:
6351
        return isSetUcex();
48 ashish 6352
      }
6353
      throw new IllegalStateException();
6354
    }
6355
 
6356
    public boolean isSet(int fieldID) {
6357
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6358
    }
6359
 
6360
    @Override
6361
    public boolean equals(Object that) {
6362
      if (that == null)
6363
        return false;
553 chandransh 6364
      if (that instanceof deleteUser_result)
6365
        return this.equals((deleteUser_result)that);
48 ashish 6366
      return false;
6367
    }
6368
 
553 chandransh 6369
    public boolean equals(deleteUser_result that) {
48 ashish 6370
      if (that == null)
6371
        return false;
6372
 
553 chandransh 6373
      boolean this_present_success = true;
6374
      boolean that_present_success = true;
48 ashish 6375
      if (this_present_success || that_present_success) {
6376
        if (!(this_present_success && that_present_success))
6377
          return false;
553 chandransh 6378
        if (this.success != that.success)
48 ashish 6379
          return false;
6380
      }
6381
 
553 chandransh 6382
      boolean this_present_ucex = true && this.isSetUcex();
6383
      boolean that_present_ucex = true && that.isSetUcex();
6384
      if (this_present_ucex || that_present_ucex) {
6385
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6386
          return false;
553 chandransh 6387
        if (!this.ucex.equals(that.ucex))
48 ashish 6388
          return false;
6389
      }
6390
 
6391
      return true;
6392
    }
6393
 
6394
    @Override
6395
    public int hashCode() {
6396
      return 0;
6397
    }
6398
 
553 chandransh 6399
    public int compareTo(deleteUser_result other) {
6400
      if (!getClass().equals(other.getClass())) {
6401
        return getClass().getName().compareTo(other.getClass().getName());
6402
      }
6403
 
6404
      int lastComparison = 0;
6405
      deleteUser_result typedOther = (deleteUser_result)other;
6406
 
6407
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6408
      if (lastComparison != 0) {
6409
        return lastComparison;
6410
      }
6411
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6412
      if (lastComparison != 0) {
6413
        return lastComparison;
6414
      }
6415
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6416
      if (lastComparison != 0) {
6417
        return lastComparison;
6418
      }
6419
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6420
      if (lastComparison != 0) {
6421
        return lastComparison;
6422
      }
6423
      return 0;
6424
    }
6425
 
48 ashish 6426
    public void read(TProtocol iprot) throws TException {
6427
      TField field;
6428
      iprot.readStructBegin();
6429
      while (true)
6430
      {
6431
        field = iprot.readFieldBegin();
6432
        if (field.type == TType.STOP) { 
6433
          break;
6434
        }
6435
        _Fields fieldId = _Fields.findByThriftId(field.id);
6436
        if (fieldId == null) {
6437
          TProtocolUtil.skip(iprot, field.type);
6438
        } else {
6439
          switch (fieldId) {
6440
            case SUCCESS:
553 chandransh 6441
              if (field.type == TType.BOOL) {
6442
                this.success = iprot.readBool();
6443
                setSuccessIsSet(true);
48 ashish 6444
              } else { 
6445
                TProtocolUtil.skip(iprot, field.type);
6446
              }
6447
              break;
553 chandransh 6448
            case UCEX:
48 ashish 6449
              if (field.type == TType.STRUCT) {
553 chandransh 6450
                this.ucex = new UserContextException();
6451
                this.ucex.read(iprot);
48 ashish 6452
              } else { 
6453
                TProtocolUtil.skip(iprot, field.type);
6454
              }
6455
              break;
6456
          }
6457
          iprot.readFieldEnd();
6458
        }
6459
      }
6460
      iprot.readStructEnd();
6461
      validate();
6462
    }
6463
 
6464
    public void write(TProtocol oprot) throws TException {
6465
      oprot.writeStructBegin(STRUCT_DESC);
6466
 
6467
      if (this.isSetSuccess()) {
6468
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6469
        oprot.writeBool(this.success);
48 ashish 6470
        oprot.writeFieldEnd();
553 chandransh 6471
      } else if (this.isSetUcex()) {
6472
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6473
        this.ucex.write(oprot);
48 ashish 6474
        oprot.writeFieldEnd();
6475
      }
6476
      oprot.writeFieldStop();
6477
      oprot.writeStructEnd();
6478
    }
6479
 
6480
    @Override
6481
    public String toString() {
553 chandransh 6482
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6483
      boolean first = true;
6484
 
6485
      sb.append("success:");
553 chandransh 6486
      sb.append(this.success);
48 ashish 6487
      first = false;
6488
      if (!first) sb.append(", ");
553 chandransh 6489
      sb.append("ucex:");
6490
      if (this.ucex == null) {
48 ashish 6491
        sb.append("null");
6492
      } else {
553 chandransh 6493
        sb.append(this.ucex);
48 ashish 6494
      }
6495
      first = false;
6496
      sb.append(")");
6497
      return sb.toString();
6498
    }
6499
 
6500
    public void validate() throws TException {
6501
      // check for required fields
6502
    }
6503
 
6504
  }
6505
 
553 chandransh 6506
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6507
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6508
 
6509
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6510
 
6511
    private long userId;
6512
 
6513
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6514
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6515
      USER_ID((short)1, "userId");
48 ashish 6516
 
6517
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6518
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6519
 
6520
      static {
6521
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6522
          byId.put((int)field._thriftId, field);
6523
          byName.put(field.getFieldName(), field);
6524
        }
6525
      }
6526
 
6527
      /**
6528
       * Find the _Fields constant that matches fieldId, or null if its not found.
6529
       */
6530
      public static _Fields findByThriftId(int fieldId) {
6531
        return byId.get(fieldId);
6532
      }
6533
 
6534
      /**
6535
       * Find the _Fields constant that matches fieldId, throwing an exception
6536
       * if it is not found.
6537
       */
6538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6539
        _Fields fields = findByThriftId(fieldId);
6540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6541
        return fields;
6542
      }
6543
 
6544
      /**
6545
       * Find the _Fields constant that matches name, or null if its not found.
6546
       */
6547
      public static _Fields findByName(String name) {
6548
        return byName.get(name);
6549
      }
6550
 
6551
      private final short _thriftId;
6552
      private final String _fieldName;
6553
 
6554
      _Fields(short thriftId, String fieldName) {
6555
        _thriftId = thriftId;
6556
        _fieldName = fieldName;
6557
      }
6558
 
6559
      public short getThriftFieldId() {
6560
        return _thriftId;
6561
      }
6562
 
6563
      public String getFieldName() {
6564
        return _fieldName;
6565
      }
6566
    }
6567
 
6568
    // isset id assignments
6569
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6570
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6571
 
6572
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6573
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6574
          new FieldValueMetaData(TType.I64)));
6575
    }});
6576
 
6577
    static {
553 chandransh 6578
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6579
    }
6580
 
553 chandransh 6581
    public getUserState_args() {
48 ashish 6582
    }
6583
 
553 chandransh 6584
    public getUserState_args(
6585
      long userId)
48 ashish 6586
    {
6587
      this();
6588
      this.userId = userId;
6589
      setUserIdIsSet(true);
6590
    }
6591
 
6592
    /**
6593
     * Performs a deep copy on <i>other</i>.
6594
     */
553 chandransh 6595
    public getUserState_args(getUserState_args other) {
48 ashish 6596
      __isset_bit_vector.clear();
6597
      __isset_bit_vector.or(other.__isset_bit_vector);
6598
      this.userId = other.userId;
6599
    }
6600
 
553 chandransh 6601
    public getUserState_args deepCopy() {
6602
      return new getUserState_args(this);
48 ashish 6603
    }
6604
 
6605
    @Deprecated
553 chandransh 6606
    public getUserState_args clone() {
6607
      return new getUserState_args(this);
48 ashish 6608
    }
6609
 
6610
    public long getUserId() {
6611
      return this.userId;
6612
    }
6613
 
553 chandransh 6614
    public getUserState_args setUserId(long userId) {
48 ashish 6615
      this.userId = userId;
6616
      setUserIdIsSet(true);
6617
      return this;
6618
    }
6619
 
6620
    public void unsetUserId() {
6621
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6622
    }
6623
 
6624
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6625
    public boolean isSetUserId() {
6626
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6627
    }
6628
 
6629
    public void setUserIdIsSet(boolean value) {
6630
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6631
    }
6632
 
6633
    public void setFieldValue(_Fields field, Object value) {
6634
      switch (field) {
6635
      case USER_ID:
6636
        if (value == null) {
6637
          unsetUserId();
6638
        } else {
6639
          setUserId((Long)value);
6640
        }
6641
        break;
6642
 
6643
      }
6644
    }
6645
 
6646
    public void setFieldValue(int fieldID, Object value) {
6647
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6648
    }
6649
 
6650
    public Object getFieldValue(_Fields field) {
6651
      switch (field) {
6652
      case USER_ID:
6653
        return new Long(getUserId());
6654
 
6655
      }
6656
      throw new IllegalStateException();
6657
    }
6658
 
6659
    public Object getFieldValue(int fieldId) {
6660
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6661
    }
6662
 
6663
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6664
    public boolean isSet(_Fields field) {
6665
      switch (field) {
6666
      case USER_ID:
6667
        return isSetUserId();
6668
      }
6669
      throw new IllegalStateException();
6670
    }
6671
 
6672
    public boolean isSet(int fieldID) {
6673
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6674
    }
6675
 
6676
    @Override
6677
    public boolean equals(Object that) {
6678
      if (that == null)
6679
        return false;
553 chandransh 6680
      if (that instanceof getUserState_args)
6681
        return this.equals((getUserState_args)that);
48 ashish 6682
      return false;
6683
    }
6684
 
553 chandransh 6685
    public boolean equals(getUserState_args that) {
48 ashish 6686
      if (that == null)
6687
        return false;
6688
 
6689
      boolean this_present_userId = true;
6690
      boolean that_present_userId = true;
6691
      if (this_present_userId || that_present_userId) {
6692
        if (!(this_present_userId && that_present_userId))
6693
          return false;
6694
        if (this.userId != that.userId)
6695
          return false;
6696
      }
6697
 
6698
      return true;
6699
    }
6700
 
6701
    @Override
6702
    public int hashCode() {
6703
      return 0;
6704
    }
6705
 
553 chandransh 6706
    public int compareTo(getUserState_args other) {
48 ashish 6707
      if (!getClass().equals(other.getClass())) {
6708
        return getClass().getName().compareTo(other.getClass().getName());
6709
      }
6710
 
6711
      int lastComparison = 0;
553 chandransh 6712
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6713
 
6714
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6715
      if (lastComparison != 0) {
6716
        return lastComparison;
6717
      }
6718
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6719
      if (lastComparison != 0) {
6720
        return lastComparison;
6721
      }
6722
      return 0;
6723
    }
6724
 
6725
    public void read(TProtocol iprot) throws TException {
6726
      TField field;
6727
      iprot.readStructBegin();
6728
      while (true)
6729
      {
6730
        field = iprot.readFieldBegin();
6731
        if (field.type == TType.STOP) { 
6732
          break;
6733
        }
6734
        _Fields fieldId = _Fields.findByThriftId(field.id);
6735
        if (fieldId == null) {
6736
          TProtocolUtil.skip(iprot, field.type);
6737
        } else {
6738
          switch (fieldId) {
6739
            case USER_ID:
6740
              if (field.type == TType.I64) {
6741
                this.userId = iprot.readI64();
6742
                setUserIdIsSet(true);
6743
              } else { 
6744
                TProtocolUtil.skip(iprot, field.type);
6745
              }
6746
              break;
6747
          }
6748
          iprot.readFieldEnd();
6749
        }
6750
      }
6751
      iprot.readStructEnd();
6752
      validate();
6753
    }
6754
 
6755
    public void write(TProtocol oprot) throws TException {
6756
      validate();
6757
 
6758
      oprot.writeStructBegin(STRUCT_DESC);
6759
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6760
      oprot.writeI64(this.userId);
6761
      oprot.writeFieldEnd();
6762
      oprot.writeFieldStop();
6763
      oprot.writeStructEnd();
6764
    }
6765
 
6766
    @Override
6767
    public String toString() {
553 chandransh 6768
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6769
      boolean first = true;
6770
 
6771
      sb.append("userId:");
6772
      sb.append(this.userId);
6773
      first = false;
6774
      sb.append(")");
6775
      return sb.toString();
6776
    }
6777
 
6778
    public void validate() throws TException {
6779
      // check for required fields
6780
    }
6781
 
6782
  }
6783
 
553 chandransh 6784
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6785
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6786
 
6787
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6788
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6789
 
553 chandransh 6790
    private UserState success;
6791
    private UserContextException ucex;
48 ashish 6792
 
6793
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6794
    public enum _Fields implements TFieldIdEnum {
6795
      SUCCESS((short)0, "success"),
553 chandransh 6796
      UCEX((short)1, "ucex");
48 ashish 6797
 
6798
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6799
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6800
 
6801
      static {
6802
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6803
          byId.put((int)field._thriftId, field);
6804
          byName.put(field.getFieldName(), field);
6805
        }
6806
      }
6807
 
6808
      /**
6809
       * Find the _Fields constant that matches fieldId, or null if its not found.
6810
       */
6811
      public static _Fields findByThriftId(int fieldId) {
6812
        return byId.get(fieldId);
6813
      }
6814
 
6815
      /**
6816
       * Find the _Fields constant that matches fieldId, throwing an exception
6817
       * if it is not found.
6818
       */
6819
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6820
        _Fields fields = findByThriftId(fieldId);
6821
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6822
        return fields;
6823
      }
6824
 
6825
      /**
6826
       * Find the _Fields constant that matches name, or null if its not found.
6827
       */
6828
      public static _Fields findByName(String name) {
6829
        return byName.get(name);
6830
      }
6831
 
6832
      private final short _thriftId;
6833
      private final String _fieldName;
6834
 
6835
      _Fields(short thriftId, String fieldName) {
6836
        _thriftId = thriftId;
6837
        _fieldName = fieldName;
6838
      }
6839
 
6840
      public short getThriftFieldId() {
6841
        return _thriftId;
6842
      }
6843
 
6844
      public String getFieldName() {
6845
        return _fieldName;
6846
      }
6847
    }
6848
 
6849
    // isset id assignments
6850
 
6851
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6852
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6853
          new StructMetaData(TType.STRUCT, UserState.class)));
6854
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6855
          new FieldValueMetaData(TType.STRUCT)));
6856
    }});
6857
 
6858
    static {
553 chandransh 6859
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6860
    }
6861
 
553 chandransh 6862
    public getUserState_result() {
48 ashish 6863
    }
6864
 
553 chandransh 6865
    public getUserState_result(
6866
      UserState success,
6867
      UserContextException ucex)
48 ashish 6868
    {
6869
      this();
6870
      this.success = success;
553 chandransh 6871
      this.ucex = ucex;
48 ashish 6872
    }
6873
 
6874
    /**
6875
     * Performs a deep copy on <i>other</i>.
6876
     */
553 chandransh 6877
    public getUserState_result(getUserState_result other) {
48 ashish 6878
      if (other.isSetSuccess()) {
553 chandransh 6879
        this.success = new UserState(other.success);
48 ashish 6880
      }
553 chandransh 6881
      if (other.isSetUcex()) {
6882
        this.ucex = new UserContextException(other.ucex);
48 ashish 6883
      }
6884
    }
6885
 
553 chandransh 6886
    public getUserState_result deepCopy() {
6887
      return new getUserState_result(this);
48 ashish 6888
    }
6889
 
6890
    @Deprecated
553 chandransh 6891
    public getUserState_result clone() {
6892
      return new getUserState_result(this);
48 ashish 6893
    }
6894
 
553 chandransh 6895
    public UserState getSuccess() {
48 ashish 6896
      return this.success;
6897
    }
6898
 
553 chandransh 6899
    public getUserState_result setSuccess(UserState success) {
48 ashish 6900
      this.success = success;
6901
      return this;
6902
    }
6903
 
6904
    public void unsetSuccess() {
6905
      this.success = null;
6906
    }
6907
 
6908
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6909
    public boolean isSetSuccess() {
6910
      return this.success != null;
6911
    }
6912
 
6913
    public void setSuccessIsSet(boolean value) {
6914
      if (!value) {
6915
        this.success = null;
6916
      }
6917
    }
6918
 
553 chandransh 6919
    public UserContextException getUcex() {
6920
      return this.ucex;
48 ashish 6921
    }
6922
 
553 chandransh 6923
    public getUserState_result setUcex(UserContextException ucex) {
6924
      this.ucex = ucex;
48 ashish 6925
      return this;
6926
    }
6927
 
553 chandransh 6928
    public void unsetUcex() {
6929
      this.ucex = null;
48 ashish 6930
    }
6931
 
553 chandransh 6932
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6933
    public boolean isSetUcex() {
6934
      return this.ucex != null;
48 ashish 6935
    }
6936
 
553 chandransh 6937
    public void setUcexIsSet(boolean value) {
48 ashish 6938
      if (!value) {
553 chandransh 6939
        this.ucex = null;
48 ashish 6940
      }
6941
    }
6942
 
6943
    public void setFieldValue(_Fields field, Object value) {
6944
      switch (field) {
6945
      case SUCCESS:
6946
        if (value == null) {
6947
          unsetSuccess();
6948
        } else {
553 chandransh 6949
          setSuccess((UserState)value);
48 ashish 6950
        }
6951
        break;
6952
 
553 chandransh 6953
      case UCEX:
48 ashish 6954
        if (value == null) {
553 chandransh 6955
          unsetUcex();
48 ashish 6956
        } else {
553 chandransh 6957
          setUcex((UserContextException)value);
48 ashish 6958
        }
6959
        break;
6960
 
6961
      }
6962
    }
6963
 
6964
    public void setFieldValue(int fieldID, Object value) {
6965
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6966
    }
6967
 
6968
    public Object getFieldValue(_Fields field) {
6969
      switch (field) {
6970
      case SUCCESS:
6971
        return getSuccess();
6972
 
553 chandransh 6973
      case UCEX:
6974
        return getUcex();
48 ashish 6975
 
6976
      }
6977
      throw new IllegalStateException();
6978
    }
6979
 
6980
    public Object getFieldValue(int fieldId) {
6981
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6982
    }
6983
 
6984
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6985
    public boolean isSet(_Fields field) {
6986
      switch (field) {
6987
      case SUCCESS:
6988
        return isSetSuccess();
553 chandransh 6989
      case UCEX:
6990
        return isSetUcex();
48 ashish 6991
      }
6992
      throw new IllegalStateException();
6993
    }
6994
 
6995
    public boolean isSet(int fieldID) {
6996
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6997
    }
6998
 
6999
    @Override
7000
    public boolean equals(Object that) {
7001
      if (that == null)
7002
        return false;
553 chandransh 7003
      if (that instanceof getUserState_result)
7004
        return this.equals((getUserState_result)that);
48 ashish 7005
      return false;
7006
    }
7007
 
553 chandransh 7008
    public boolean equals(getUserState_result that) {
48 ashish 7009
      if (that == null)
7010
        return false;
7011
 
7012
      boolean this_present_success = true && this.isSetSuccess();
7013
      boolean that_present_success = true && that.isSetSuccess();
7014
      if (this_present_success || that_present_success) {
7015
        if (!(this_present_success && that_present_success))
7016
          return false;
7017
        if (!this.success.equals(that.success))
7018
          return false;
7019
      }
7020
 
553 chandransh 7021
      boolean this_present_ucex = true && this.isSetUcex();
7022
      boolean that_present_ucex = true && that.isSetUcex();
7023
      if (this_present_ucex || that_present_ucex) {
7024
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7025
          return false;
553 chandransh 7026
        if (!this.ucex.equals(that.ucex))
48 ashish 7027
          return false;
7028
      }
7029
 
7030
      return true;
7031
    }
7032
 
7033
    @Override
7034
    public int hashCode() {
7035
      return 0;
7036
    }
7037
 
553 chandransh 7038
    public int compareTo(getUserState_result other) {
48 ashish 7039
      if (!getClass().equals(other.getClass())) {
7040
        return getClass().getName().compareTo(other.getClass().getName());
7041
      }
7042
 
7043
      int lastComparison = 0;
553 chandransh 7044
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 7045
 
7046
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7047
      if (lastComparison != 0) {
7048
        return lastComparison;
7049
      }
7050
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7051
      if (lastComparison != 0) {
7052
        return lastComparison;
7053
      }
553 chandransh 7054
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 7055
      if (lastComparison != 0) {
7056
        return lastComparison;
7057
      }
553 chandransh 7058
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 7059
      if (lastComparison != 0) {
7060
        return lastComparison;
7061
      }
7062
      return 0;
7063
    }
7064
 
7065
    public void read(TProtocol iprot) throws TException {
7066
      TField field;
7067
      iprot.readStructBegin();
7068
      while (true)
7069
      {
7070
        field = iprot.readFieldBegin();
7071
        if (field.type == TType.STOP) { 
7072
          break;
7073
        }
7074
        _Fields fieldId = _Fields.findByThriftId(field.id);
7075
        if (fieldId == null) {
7076
          TProtocolUtil.skip(iprot, field.type);
7077
        } else {
7078
          switch (fieldId) {
7079
            case SUCCESS:
7080
              if (field.type == TType.STRUCT) {
553 chandransh 7081
                this.success = new UserState();
48 ashish 7082
                this.success.read(iprot);
7083
              } else { 
7084
                TProtocolUtil.skip(iprot, field.type);
7085
              }
7086
              break;
553 chandransh 7087
            case UCEX:
48 ashish 7088
              if (field.type == TType.STRUCT) {
553 chandransh 7089
                this.ucex = new UserContextException();
7090
                this.ucex.read(iprot);
48 ashish 7091
              } else { 
7092
                TProtocolUtil.skip(iprot, field.type);
7093
              }
7094
              break;
7095
          }
7096
          iprot.readFieldEnd();
7097
        }
7098
      }
7099
      iprot.readStructEnd();
7100
      validate();
7101
    }
7102
 
7103
    public void write(TProtocol oprot) throws TException {
7104
      oprot.writeStructBegin(STRUCT_DESC);
7105
 
7106
      if (this.isSetSuccess()) {
7107
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7108
        this.success.write(oprot);
7109
        oprot.writeFieldEnd();
553 chandransh 7110
      } else if (this.isSetUcex()) {
7111
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7112
        this.ucex.write(oprot);
48 ashish 7113
        oprot.writeFieldEnd();
7114
      }
7115
      oprot.writeFieldStop();
7116
      oprot.writeStructEnd();
7117
    }
7118
 
7119
    @Override
7120
    public String toString() {
553 chandransh 7121
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7122
      boolean first = true;
7123
 
7124
      sb.append("success:");
7125
      if (this.success == null) {
7126
        sb.append("null");
7127
      } else {
7128
        sb.append(this.success);
7129
      }
7130
      first = false;
7131
      if (!first) sb.append(", ");
553 chandransh 7132
      sb.append("ucex:");
7133
      if (this.ucex == null) {
48 ashish 7134
        sb.append("null");
7135
      } else {
553 chandransh 7136
        sb.append(this.ucex);
48 ashish 7137
      }
7138
      first = false;
7139
      sb.append(")");
7140
      return sb.toString();
7141
    }
7142
 
7143
    public void validate() throws TException {
7144
      // check for required fields
7145
    }
7146
 
7147
  }
7148
 
553 chandransh 7149
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7150
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7151
 
7152
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7153
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7154
 
7155
    private String email;
7156
    private String password;
7157
 
7158
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7159
    public enum _Fields implements TFieldIdEnum {
7160
      EMAIL((short)1, "email"),
7161
      PASSWORD((short)2, "password");
7162
 
7163
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7164
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7165
 
7166
      static {
7167
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7168
          byId.put((int)field._thriftId, field);
7169
          byName.put(field.getFieldName(), field);
7170
        }
7171
      }
7172
 
7173
      /**
7174
       * Find the _Fields constant that matches fieldId, or null if its not found.
7175
       */
7176
      public static _Fields findByThriftId(int fieldId) {
7177
        return byId.get(fieldId);
7178
      }
7179
 
7180
      /**
7181
       * Find the _Fields constant that matches fieldId, throwing an exception
7182
       * if it is not found.
7183
       */
7184
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7185
        _Fields fields = findByThriftId(fieldId);
7186
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7187
        return fields;
7188
      }
7189
 
7190
      /**
7191
       * Find the _Fields constant that matches name, or null if its not found.
7192
       */
7193
      public static _Fields findByName(String name) {
7194
        return byName.get(name);
7195
      }
7196
 
7197
      private final short _thriftId;
7198
      private final String _fieldName;
7199
 
7200
      _Fields(short thriftId, String fieldName) {
7201
        _thriftId = thriftId;
7202
        _fieldName = fieldName;
7203
      }
7204
 
7205
      public short getThriftFieldId() {
7206
        return _thriftId;
7207
      }
7208
 
7209
      public String getFieldName() {
7210
        return _fieldName;
7211
      }
7212
    }
7213
 
7214
    // isset id assignments
7215
 
7216
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7217
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7218
          new FieldValueMetaData(TType.STRING)));
7219
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7220
          new FieldValueMetaData(TType.STRING)));
7221
    }});
7222
 
7223
    static {
553 chandransh 7224
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7225
    }
7226
 
553 chandransh 7227
    public authenticateUser_args() {
48 ashish 7228
    }
7229
 
553 chandransh 7230
    public authenticateUser_args(
48 ashish 7231
      String email,
7232
      String password)
7233
    {
7234
      this();
7235
      this.email = email;
7236
      this.password = password;
7237
    }
7238
 
7239
    /**
7240
     * Performs a deep copy on <i>other</i>.
7241
     */
553 chandransh 7242
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7243
      if (other.isSetEmail()) {
7244
        this.email = other.email;
7245
      }
7246
      if (other.isSetPassword()) {
7247
        this.password = other.password;
7248
      }
7249
    }
7250
 
553 chandransh 7251
    public authenticateUser_args deepCopy() {
7252
      return new authenticateUser_args(this);
48 ashish 7253
    }
7254
 
7255
    @Deprecated
553 chandransh 7256
    public authenticateUser_args clone() {
7257
      return new authenticateUser_args(this);
48 ashish 7258
    }
7259
 
7260
    public String getEmail() {
7261
      return this.email;
7262
    }
7263
 
553 chandransh 7264
    public authenticateUser_args setEmail(String email) {
48 ashish 7265
      this.email = email;
7266
      return this;
7267
    }
7268
 
7269
    public void unsetEmail() {
7270
      this.email = null;
7271
    }
7272
 
7273
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7274
    public boolean isSetEmail() {
7275
      return this.email != null;
7276
    }
7277
 
7278
    public void setEmailIsSet(boolean value) {
7279
      if (!value) {
7280
        this.email = null;
7281
      }
7282
    }
7283
 
7284
    public String getPassword() {
7285
      return this.password;
7286
    }
7287
 
553 chandransh 7288
    public authenticateUser_args setPassword(String password) {
48 ashish 7289
      this.password = password;
7290
      return this;
7291
    }
7292
 
7293
    public void unsetPassword() {
7294
      this.password = null;
7295
    }
7296
 
7297
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7298
    public boolean isSetPassword() {
7299
      return this.password != null;
7300
    }
7301
 
7302
    public void setPasswordIsSet(boolean value) {
7303
      if (!value) {
7304
        this.password = null;
7305
      }
7306
    }
7307
 
7308
    public void setFieldValue(_Fields field, Object value) {
7309
      switch (field) {
7310
      case EMAIL:
7311
        if (value == null) {
7312
          unsetEmail();
7313
        } else {
7314
          setEmail((String)value);
7315
        }
7316
        break;
7317
 
7318
      case PASSWORD:
7319
        if (value == null) {
7320
          unsetPassword();
7321
        } else {
7322
          setPassword((String)value);
7323
        }
7324
        break;
7325
 
7326
      }
7327
    }
7328
 
7329
    public void setFieldValue(int fieldID, Object value) {
7330
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7331
    }
7332
 
7333
    public Object getFieldValue(_Fields field) {
7334
      switch (field) {
7335
      case EMAIL:
7336
        return getEmail();
7337
 
7338
      case PASSWORD:
7339
        return getPassword();
7340
 
7341
      }
7342
      throw new IllegalStateException();
7343
    }
7344
 
7345
    public Object getFieldValue(int fieldId) {
7346
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7347
    }
7348
 
7349
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7350
    public boolean isSet(_Fields field) {
7351
      switch (field) {
7352
      case EMAIL:
7353
        return isSetEmail();
7354
      case PASSWORD:
7355
        return isSetPassword();
7356
      }
7357
      throw new IllegalStateException();
7358
    }
7359
 
7360
    public boolean isSet(int fieldID) {
7361
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7362
    }
7363
 
7364
    @Override
7365
    public boolean equals(Object that) {
7366
      if (that == null)
7367
        return false;
553 chandransh 7368
      if (that instanceof authenticateUser_args)
7369
        return this.equals((authenticateUser_args)that);
48 ashish 7370
      return false;
7371
    }
7372
 
553 chandransh 7373
    public boolean equals(authenticateUser_args that) {
48 ashish 7374
      if (that == null)
7375
        return false;
7376
 
7377
      boolean this_present_email = true && this.isSetEmail();
7378
      boolean that_present_email = true && that.isSetEmail();
7379
      if (this_present_email || that_present_email) {
7380
        if (!(this_present_email && that_present_email))
7381
          return false;
7382
        if (!this.email.equals(that.email))
7383
          return false;
7384
      }
7385
 
7386
      boolean this_present_password = true && this.isSetPassword();
7387
      boolean that_present_password = true && that.isSetPassword();
7388
      if (this_present_password || that_present_password) {
7389
        if (!(this_present_password && that_present_password))
7390
          return false;
7391
        if (!this.password.equals(that.password))
7392
          return false;
7393
      }
7394
 
7395
      return true;
7396
    }
7397
 
7398
    @Override
7399
    public int hashCode() {
7400
      return 0;
7401
    }
7402
 
553 chandransh 7403
    public int compareTo(authenticateUser_args other) {
48 ashish 7404
      if (!getClass().equals(other.getClass())) {
7405
        return getClass().getName().compareTo(other.getClass().getName());
7406
      }
7407
 
7408
      int lastComparison = 0;
553 chandransh 7409
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7410
 
7411
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7412
      if (lastComparison != 0) {
7413
        return lastComparison;
7414
      }
7415
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7416
      if (lastComparison != 0) {
7417
        return lastComparison;
7418
      }
7419
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7420
      if (lastComparison != 0) {
7421
        return lastComparison;
7422
      }
7423
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7424
      if (lastComparison != 0) {
7425
        return lastComparison;
7426
      }
7427
      return 0;
7428
    }
7429
 
7430
    public void read(TProtocol iprot) throws TException {
7431
      TField field;
7432
      iprot.readStructBegin();
7433
      while (true)
7434
      {
7435
        field = iprot.readFieldBegin();
7436
        if (field.type == TType.STOP) { 
7437
          break;
7438
        }
7439
        _Fields fieldId = _Fields.findByThriftId(field.id);
7440
        if (fieldId == null) {
7441
          TProtocolUtil.skip(iprot, field.type);
7442
        } else {
7443
          switch (fieldId) {
7444
            case EMAIL:
7445
              if (field.type == TType.STRING) {
7446
                this.email = iprot.readString();
7447
              } else { 
7448
                TProtocolUtil.skip(iprot, field.type);
7449
              }
7450
              break;
7451
            case PASSWORD:
7452
              if (field.type == TType.STRING) {
7453
                this.password = iprot.readString();
7454
              } else { 
7455
                TProtocolUtil.skip(iprot, field.type);
7456
              }
7457
              break;
7458
          }
7459
          iprot.readFieldEnd();
7460
        }
7461
      }
7462
      iprot.readStructEnd();
7463
      validate();
7464
    }
7465
 
7466
    public void write(TProtocol oprot) throws TException {
7467
      validate();
7468
 
7469
      oprot.writeStructBegin(STRUCT_DESC);
7470
      if (this.email != null) {
7471
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7472
        oprot.writeString(this.email);
7473
        oprot.writeFieldEnd();
7474
      }
7475
      if (this.password != null) {
7476
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7477
        oprot.writeString(this.password);
7478
        oprot.writeFieldEnd();
7479
      }
7480
      oprot.writeFieldStop();
7481
      oprot.writeStructEnd();
7482
    }
7483
 
7484
    @Override
7485
    public String toString() {
553 chandransh 7486
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7487
      boolean first = true;
7488
 
7489
      sb.append("email:");
7490
      if (this.email == null) {
7491
        sb.append("null");
7492
      } else {
7493
        sb.append(this.email);
7494
      }
7495
      first = false;
7496
      if (!first) sb.append(", ");
7497
      sb.append("password:");
7498
      if (this.password == null) {
7499
        sb.append("null");
7500
      } else {
7501
        sb.append(this.password);
7502
      }
7503
      first = false;
7504
      sb.append(")");
7505
      return sb.toString();
7506
    }
7507
 
7508
    public void validate() throws TException {
7509
      // check for required fields
7510
    }
7511
 
7512
  }
7513
 
571 rajveer 7514
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7515
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7516
 
7517
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7518
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7519
 
553 chandransh 7520
    private User success;
7521
    private AuthenticationException auex;
48 ashish 7522
 
7523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7524
    public enum _Fields implements TFieldIdEnum {
7525
      SUCCESS((short)0, "success"),
553 chandransh 7526
      AUEX((short)1, "auex");
48 ashish 7527
 
7528
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7529
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7530
 
7531
      static {
7532
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7533
          byId.put((int)field._thriftId, field);
7534
          byName.put(field.getFieldName(), field);
7535
        }
7536
      }
7537
 
7538
      /**
7539
       * Find the _Fields constant that matches fieldId, or null if its not found.
7540
       */
7541
      public static _Fields findByThriftId(int fieldId) {
7542
        return byId.get(fieldId);
7543
      }
7544
 
7545
      /**
7546
       * Find the _Fields constant that matches fieldId, throwing an exception
7547
       * if it is not found.
7548
       */
7549
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7550
        _Fields fields = findByThriftId(fieldId);
7551
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7552
        return fields;
7553
      }
7554
 
7555
      /**
7556
       * Find the _Fields constant that matches name, or null if its not found.
7557
       */
7558
      public static _Fields findByName(String name) {
7559
        return byName.get(name);
7560
      }
7561
 
7562
      private final short _thriftId;
7563
      private final String _fieldName;
7564
 
7565
      _Fields(short thriftId, String fieldName) {
7566
        _thriftId = thriftId;
7567
        _fieldName = fieldName;
7568
      }
7569
 
7570
      public short getThriftFieldId() {
7571
        return _thriftId;
7572
      }
7573
 
7574
      public String getFieldName() {
7575
        return _fieldName;
7576
      }
7577
    }
7578
 
7579
    // isset id assignments
7580
 
7581
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7582
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7583
          new StructMetaData(TType.STRUCT, User.class)));
7584
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7585
          new FieldValueMetaData(TType.STRUCT)));
7586
    }});
7587
 
7588
    static {
553 chandransh 7589
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7590
    }
7591
 
553 chandransh 7592
    public authenticateUser_result() {
48 ashish 7593
    }
7594
 
553 chandransh 7595
    public authenticateUser_result(
7596
      User success,
7597
      AuthenticationException auex)
48 ashish 7598
    {
7599
      this();
7600
      this.success = success;
553 chandransh 7601
      this.auex = auex;
48 ashish 7602
    }
7603
 
7604
    /**
7605
     * Performs a deep copy on <i>other</i>.
7606
     */
553 chandransh 7607
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7608
      if (other.isSetSuccess()) {
553 chandransh 7609
        this.success = new User(other.success);
48 ashish 7610
      }
553 chandransh 7611
      if (other.isSetAuex()) {
7612
        this.auex = new AuthenticationException(other.auex);
48 ashish 7613
      }
7614
    }
7615
 
553 chandransh 7616
    public authenticateUser_result deepCopy() {
7617
      return new authenticateUser_result(this);
48 ashish 7618
    }
7619
 
7620
    @Deprecated
553 chandransh 7621
    public authenticateUser_result clone() {
7622
      return new authenticateUser_result(this);
48 ashish 7623
    }
7624
 
553 chandransh 7625
    public User getSuccess() {
48 ashish 7626
      return this.success;
7627
    }
7628
 
553 chandransh 7629
    public authenticateUser_result setSuccess(User success) {
48 ashish 7630
      this.success = success;
7631
      return this;
7632
    }
7633
 
7634
    public void unsetSuccess() {
7635
      this.success = null;
7636
    }
7637
 
7638
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7639
    public boolean isSetSuccess() {
7640
      return this.success != null;
7641
    }
7642
 
7643
    public void setSuccessIsSet(boolean value) {
7644
      if (!value) {
7645
        this.success = null;
7646
      }
7647
    }
7648
 
553 chandransh 7649
    public AuthenticationException getAuex() {
7650
      return this.auex;
48 ashish 7651
    }
7652
 
553 chandransh 7653
    public authenticateUser_result setAuex(AuthenticationException auex) {
7654
      this.auex = auex;
48 ashish 7655
      return this;
7656
    }
7657
 
553 chandransh 7658
    public void unsetAuex() {
7659
      this.auex = null;
48 ashish 7660
    }
7661
 
553 chandransh 7662
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7663
    public boolean isSetAuex() {
7664
      return this.auex != null;
48 ashish 7665
    }
7666
 
553 chandransh 7667
    public void setAuexIsSet(boolean value) {
48 ashish 7668
      if (!value) {
553 chandransh 7669
        this.auex = null;
48 ashish 7670
      }
7671
    }
7672
 
7673
    public void setFieldValue(_Fields field, Object value) {
7674
      switch (field) {
7675
      case SUCCESS:
7676
        if (value == null) {
7677
          unsetSuccess();
7678
        } else {
553 chandransh 7679
          setSuccess((User)value);
48 ashish 7680
        }
7681
        break;
7682
 
553 chandransh 7683
      case AUEX:
48 ashish 7684
        if (value == null) {
553 chandransh 7685
          unsetAuex();
48 ashish 7686
        } else {
553 chandransh 7687
          setAuex((AuthenticationException)value);
48 ashish 7688
        }
7689
        break;
7690
 
7691
      }
7692
    }
7693
 
7694
    public void setFieldValue(int fieldID, Object value) {
7695
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7696
    }
7697
 
7698
    public Object getFieldValue(_Fields field) {
7699
      switch (field) {
7700
      case SUCCESS:
7701
        return getSuccess();
7702
 
553 chandransh 7703
      case AUEX:
7704
        return getAuex();
48 ashish 7705
 
7706
      }
7707
      throw new IllegalStateException();
7708
    }
7709
 
7710
    public Object getFieldValue(int fieldId) {
7711
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7712
    }
7713
 
7714
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7715
    public boolean isSet(_Fields field) {
7716
      switch (field) {
7717
      case SUCCESS:
7718
        return isSetSuccess();
553 chandransh 7719
      case AUEX:
7720
        return isSetAuex();
48 ashish 7721
      }
7722
      throw new IllegalStateException();
7723
    }
7724
 
7725
    public boolean isSet(int fieldID) {
7726
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7727
    }
7728
 
7729
    @Override
7730
    public boolean equals(Object that) {
7731
      if (that == null)
7732
        return false;
553 chandransh 7733
      if (that instanceof authenticateUser_result)
7734
        return this.equals((authenticateUser_result)that);
48 ashish 7735
      return false;
7736
    }
7737
 
553 chandransh 7738
    public boolean equals(authenticateUser_result that) {
48 ashish 7739
      if (that == null)
7740
        return false;
7741
 
7742
      boolean this_present_success = true && this.isSetSuccess();
7743
      boolean that_present_success = true && that.isSetSuccess();
7744
      if (this_present_success || that_present_success) {
7745
        if (!(this_present_success && that_present_success))
7746
          return false;
7747
        if (!this.success.equals(that.success))
7748
          return false;
7749
      }
7750
 
553 chandransh 7751
      boolean this_present_auex = true && this.isSetAuex();
7752
      boolean that_present_auex = true && that.isSetAuex();
7753
      if (this_present_auex || that_present_auex) {
7754
        if (!(this_present_auex && that_present_auex))
48 ashish 7755
          return false;
553 chandransh 7756
        if (!this.auex.equals(that.auex))
48 ashish 7757
          return false;
7758
      }
7759
 
7760
      return true;
7761
    }
7762
 
7763
    @Override
7764
    public int hashCode() {
7765
      return 0;
7766
    }
7767
 
571 rajveer 7768
    public int compareTo(authenticateUser_result other) {
7769
      if (!getClass().equals(other.getClass())) {
7770
        return getClass().getName().compareTo(other.getClass().getName());
7771
      }
7772
 
7773
      int lastComparison = 0;
7774
      authenticateUser_result typedOther = (authenticateUser_result)other;
7775
 
7776
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7777
      if (lastComparison != 0) {
7778
        return lastComparison;
7779
      }
7780
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7781
      if (lastComparison != 0) {
7782
        return lastComparison;
7783
      }
7784
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7785
      if (lastComparison != 0) {
7786
        return lastComparison;
7787
      }
7788
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7789
      if (lastComparison != 0) {
7790
        return lastComparison;
7791
      }
7792
      return 0;
7793
    }
7794
 
48 ashish 7795
    public void read(TProtocol iprot) throws TException {
7796
      TField field;
7797
      iprot.readStructBegin();
7798
      while (true)
7799
      {
7800
        field = iprot.readFieldBegin();
7801
        if (field.type == TType.STOP) { 
7802
          break;
7803
        }
7804
        _Fields fieldId = _Fields.findByThriftId(field.id);
7805
        if (fieldId == null) {
7806
          TProtocolUtil.skip(iprot, field.type);
7807
        } else {
7808
          switch (fieldId) {
7809
            case SUCCESS:
7810
              if (field.type == TType.STRUCT) {
553 chandransh 7811
                this.success = new User();
48 ashish 7812
                this.success.read(iprot);
7813
              } else { 
7814
                TProtocolUtil.skip(iprot, field.type);
7815
              }
7816
              break;
553 chandransh 7817
            case AUEX:
48 ashish 7818
              if (field.type == TType.STRUCT) {
553 chandransh 7819
                this.auex = new AuthenticationException();
7820
                this.auex.read(iprot);
48 ashish 7821
              } else { 
7822
                TProtocolUtil.skip(iprot, field.type);
7823
              }
7824
              break;
7825
          }
7826
          iprot.readFieldEnd();
7827
        }
7828
      }
7829
      iprot.readStructEnd();
7830
      validate();
7831
    }
7832
 
7833
    public void write(TProtocol oprot) throws TException {
7834
      oprot.writeStructBegin(STRUCT_DESC);
7835
 
7836
      if (this.isSetSuccess()) {
7837
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7838
        this.success.write(oprot);
7839
        oprot.writeFieldEnd();
553 chandransh 7840
      } else if (this.isSetAuex()) {
7841
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7842
        this.auex.write(oprot);
48 ashish 7843
        oprot.writeFieldEnd();
7844
      }
7845
      oprot.writeFieldStop();
7846
      oprot.writeStructEnd();
7847
    }
7848
 
7849
    @Override
7850
    public String toString() {
553 chandransh 7851
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7852
      boolean first = true;
7853
 
7854
      sb.append("success:");
7855
      if (this.success == null) {
7856
        sb.append("null");
7857
      } else {
7858
        sb.append(this.success);
7859
      }
7860
      first = false;
7861
      if (!first) sb.append(", ");
553 chandransh 7862
      sb.append("auex:");
7863
      if (this.auex == null) {
48 ashish 7864
        sb.append("null");
7865
      } else {
553 chandransh 7866
        sb.append(this.auex);
48 ashish 7867
      }
7868
      first = false;
7869
      sb.append(")");
7870
      return sb.toString();
7871
    }
7872
 
7873
    public void validate() throws TException {
7874
      // check for required fields
7875
    }
7876
 
7877
  }
7878
 
553 chandransh 7879
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7880
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7881
 
553 chandransh 7882
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7883
 
553 chandransh 7884
    private String email;
123 ashish 7885
 
7886
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7887
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7888
      EMAIL((short)1, "email");
123 ashish 7889
 
7890
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7891
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7892
 
7893
      static {
7894
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7895
          byId.put((int)field._thriftId, field);
7896
          byName.put(field.getFieldName(), field);
7897
        }
7898
      }
7899
 
7900
      /**
7901
       * Find the _Fields constant that matches fieldId, or null if its not found.
7902
       */
7903
      public static _Fields findByThriftId(int fieldId) {
7904
        return byId.get(fieldId);
7905
      }
7906
 
7907
      /**
7908
       * Find the _Fields constant that matches fieldId, throwing an exception
7909
       * if it is not found.
7910
       */
7911
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7912
        _Fields fields = findByThriftId(fieldId);
7913
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7914
        return fields;
7915
      }
7916
 
7917
      /**
7918
       * Find the _Fields constant that matches name, or null if its not found.
7919
       */
7920
      public static _Fields findByName(String name) {
7921
        return byName.get(name);
7922
      }
7923
 
7924
      private final short _thriftId;
7925
      private final String _fieldName;
7926
 
7927
      _Fields(short thriftId, String fieldName) {
7928
        _thriftId = thriftId;
7929
        _fieldName = fieldName;
7930
      }
7931
 
7932
      public short getThriftFieldId() {
7933
        return _thriftId;
7934
      }
7935
 
7936
      public String getFieldName() {
7937
        return _fieldName;
7938
      }
7939
    }
7940
 
7941
    // isset id assignments
553 chandransh 7942
 
7943
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7944
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7945
          new FieldValueMetaData(TType.STRING)));
7946
    }});
7947
 
7948
    static {
7949
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7950
    }
7951
 
7952
    public userExists_args() {
7953
    }
7954
 
7955
    public userExists_args(
7956
      String email)
7957
    {
7958
      this();
7959
      this.email = email;
7960
    }
7961
 
7962
    /**
7963
     * Performs a deep copy on <i>other</i>.
7964
     */
7965
    public userExists_args(userExists_args other) {
7966
      if (other.isSetEmail()) {
7967
        this.email = other.email;
7968
      }
7969
    }
7970
 
7971
    public userExists_args deepCopy() {
7972
      return new userExists_args(this);
7973
    }
7974
 
7975
    @Deprecated
7976
    public userExists_args clone() {
7977
      return new userExists_args(this);
7978
    }
7979
 
7980
    public String getEmail() {
7981
      return this.email;
7982
    }
7983
 
7984
    public userExists_args setEmail(String email) {
7985
      this.email = email;
7986
      return this;
7987
    }
7988
 
7989
    public void unsetEmail() {
7990
      this.email = null;
7991
    }
7992
 
7993
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7994
    public boolean isSetEmail() {
7995
      return this.email != null;
7996
    }
7997
 
7998
    public void setEmailIsSet(boolean value) {
7999
      if (!value) {
8000
        this.email = null;
8001
      }
8002
    }
8003
 
8004
    public void setFieldValue(_Fields field, Object value) {
8005
      switch (field) {
8006
      case EMAIL:
8007
        if (value == null) {
8008
          unsetEmail();
8009
        } else {
8010
          setEmail((String)value);
8011
        }
8012
        break;
8013
 
8014
      }
8015
    }
8016
 
8017
    public void setFieldValue(int fieldID, Object value) {
8018
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8019
    }
8020
 
8021
    public Object getFieldValue(_Fields field) {
8022
      switch (field) {
8023
      case EMAIL:
8024
        return getEmail();
8025
 
8026
      }
8027
      throw new IllegalStateException();
8028
    }
8029
 
8030
    public Object getFieldValue(int fieldId) {
8031
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8032
    }
8033
 
8034
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8035
    public boolean isSet(_Fields field) {
8036
      switch (field) {
8037
      case EMAIL:
8038
        return isSetEmail();
8039
      }
8040
      throw new IllegalStateException();
8041
    }
8042
 
8043
    public boolean isSet(int fieldID) {
8044
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8045
    }
8046
 
8047
    @Override
8048
    public boolean equals(Object that) {
8049
      if (that == null)
8050
        return false;
8051
      if (that instanceof userExists_args)
8052
        return this.equals((userExists_args)that);
8053
      return false;
8054
    }
8055
 
8056
    public boolean equals(userExists_args that) {
8057
      if (that == null)
8058
        return false;
8059
 
8060
      boolean this_present_email = true && this.isSetEmail();
8061
      boolean that_present_email = true && that.isSetEmail();
8062
      if (this_present_email || that_present_email) {
8063
        if (!(this_present_email && that_present_email))
8064
          return false;
8065
        if (!this.email.equals(that.email))
8066
          return false;
8067
      }
8068
 
8069
      return true;
8070
    }
8071
 
8072
    @Override
8073
    public int hashCode() {
8074
      return 0;
8075
    }
8076
 
8077
    public int compareTo(userExists_args other) {
8078
      if (!getClass().equals(other.getClass())) {
8079
        return getClass().getName().compareTo(other.getClass().getName());
8080
      }
8081
 
8082
      int lastComparison = 0;
8083
      userExists_args typedOther = (userExists_args)other;
8084
 
8085
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8086
      if (lastComparison != 0) {
8087
        return lastComparison;
8088
      }
8089
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8090
      if (lastComparison != 0) {
8091
        return lastComparison;
8092
      }
8093
      return 0;
8094
    }
8095
 
8096
    public void read(TProtocol iprot) throws TException {
8097
      TField field;
8098
      iprot.readStructBegin();
8099
      while (true)
8100
      {
8101
        field = iprot.readFieldBegin();
8102
        if (field.type == TType.STOP) { 
8103
          break;
8104
        }
8105
        _Fields fieldId = _Fields.findByThriftId(field.id);
8106
        if (fieldId == null) {
8107
          TProtocolUtil.skip(iprot, field.type);
8108
        } else {
8109
          switch (fieldId) {
8110
            case EMAIL:
8111
              if (field.type == TType.STRING) {
8112
                this.email = iprot.readString();
8113
              } else { 
8114
                TProtocolUtil.skip(iprot, field.type);
8115
              }
8116
              break;
8117
          }
8118
          iprot.readFieldEnd();
8119
        }
8120
      }
8121
      iprot.readStructEnd();
8122
      validate();
8123
    }
8124
 
8125
    public void write(TProtocol oprot) throws TException {
8126
      validate();
8127
 
8128
      oprot.writeStructBegin(STRUCT_DESC);
8129
      if (this.email != null) {
8130
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8131
        oprot.writeString(this.email);
8132
        oprot.writeFieldEnd();
8133
      }
8134
      oprot.writeFieldStop();
8135
      oprot.writeStructEnd();
8136
    }
8137
 
8138
    @Override
8139
    public String toString() {
8140
      StringBuilder sb = new StringBuilder("userExists_args(");
8141
      boolean first = true;
8142
 
8143
      sb.append("email:");
8144
      if (this.email == null) {
8145
        sb.append("null");
8146
      } else {
8147
        sb.append(this.email);
8148
      }
8149
      first = false;
8150
      sb.append(")");
8151
      return sb.toString();
8152
    }
8153
 
8154
    public void validate() throws TException {
8155
      // check for required fields
8156
    }
8157
 
8158
  }
8159
 
8160
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8161
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8162
 
8163
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8164
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8165
 
8166
    private boolean success;
8167
    private UserContextException ucx;
8168
 
8169
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8170
    public enum _Fields implements TFieldIdEnum {
8171
      SUCCESS((short)0, "success"),
8172
      UCX((short)1, "ucx");
8173
 
8174
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8175
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8176
 
8177
      static {
8178
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8179
          byId.put((int)field._thriftId, field);
8180
          byName.put(field.getFieldName(), field);
8181
        }
8182
      }
8183
 
8184
      /**
8185
       * Find the _Fields constant that matches fieldId, or null if its not found.
8186
       */
8187
      public static _Fields findByThriftId(int fieldId) {
8188
        return byId.get(fieldId);
8189
      }
8190
 
8191
      /**
8192
       * Find the _Fields constant that matches fieldId, throwing an exception
8193
       * if it is not found.
8194
       */
8195
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8196
        _Fields fields = findByThriftId(fieldId);
8197
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8198
        return fields;
8199
      }
8200
 
8201
      /**
8202
       * Find the _Fields constant that matches name, or null if its not found.
8203
       */
8204
      public static _Fields findByName(String name) {
8205
        return byName.get(name);
8206
      }
8207
 
8208
      private final short _thriftId;
8209
      private final String _fieldName;
8210
 
8211
      _Fields(short thriftId, String fieldName) {
8212
        _thriftId = thriftId;
8213
        _fieldName = fieldName;
8214
      }
8215
 
8216
      public short getThriftFieldId() {
8217
        return _thriftId;
8218
      }
8219
 
8220
      public String getFieldName() {
8221
        return _fieldName;
8222
      }
8223
    }
8224
 
8225
    // isset id assignments
8226
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8227
    private BitSet __isset_bit_vector = new BitSet(1);
8228
 
8229
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8230
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8231
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8232
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8233
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8234
    }});
8235
 
8236
    static {
553 chandransh 8237
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8238
    }
8239
 
553 chandransh 8240
    public userExists_result() {
123 ashish 8241
    }
8242
 
553 chandransh 8243
    public userExists_result(
8244
      boolean success,
8245
      UserContextException ucx)
123 ashish 8246
    {
8247
      this();
553 chandransh 8248
      this.success = success;
8249
      setSuccessIsSet(true);
8250
      this.ucx = ucx;
123 ashish 8251
    }
8252
 
8253
    /**
8254
     * Performs a deep copy on <i>other</i>.
8255
     */
553 chandransh 8256
    public userExists_result(userExists_result other) {
123 ashish 8257
      __isset_bit_vector.clear();
8258
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8259
      this.success = other.success;
8260
      if (other.isSetUcx()) {
8261
        this.ucx = new UserContextException(other.ucx);
123 ashish 8262
      }
8263
    }
8264
 
553 chandransh 8265
    public userExists_result deepCopy() {
8266
      return new userExists_result(this);
123 ashish 8267
    }
8268
 
8269
    @Deprecated
553 chandransh 8270
    public userExists_result clone() {
8271
      return new userExists_result(this);
123 ashish 8272
    }
8273
 
553 chandransh 8274
    public boolean isSuccess() {
8275
      return this.success;
123 ashish 8276
    }
8277
 
553 chandransh 8278
    public userExists_result setSuccess(boolean success) {
8279
      this.success = success;
8280
      setSuccessIsSet(true);
123 ashish 8281
      return this;
8282
    }
8283
 
553 chandransh 8284
    public void unsetSuccess() {
8285
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8286
    }
8287
 
553 chandransh 8288
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8289
    public boolean isSetSuccess() {
8290
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8291
    }
8292
 
553 chandransh 8293
    public void setSuccessIsSet(boolean value) {
8294
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8295
    }
8296
 
8297
    public UserContextException getUcx() {
8298
      return this.ucx;
8299
    }
8300
 
8301
    public userExists_result setUcx(UserContextException ucx) {
8302
      this.ucx = ucx;
8303
      return this;
8304
    }
8305
 
8306
    public void unsetUcx() {
8307
      this.ucx = null;
8308
    }
8309
 
8310
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8311
    public boolean isSetUcx() {
8312
      return this.ucx != null;
8313
    }
8314
 
8315
    public void setUcxIsSet(boolean value) {
123 ashish 8316
      if (!value) {
553 chandransh 8317
        this.ucx = null;
123 ashish 8318
      }
8319
    }
8320
 
553 chandransh 8321
    public void setFieldValue(_Fields field, Object value) {
8322
      switch (field) {
8323
      case SUCCESS:
8324
        if (value == null) {
8325
          unsetSuccess();
8326
        } else {
8327
          setSuccess((Boolean)value);
8328
        }
8329
        break;
8330
 
8331
      case UCX:
8332
        if (value == null) {
8333
          unsetUcx();
8334
        } else {
8335
          setUcx((UserContextException)value);
8336
        }
8337
        break;
8338
 
8339
      }
123 ashish 8340
    }
8341
 
553 chandransh 8342
    public void setFieldValue(int fieldID, Object value) {
8343
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8344
    }
8345
 
8346
    public Object getFieldValue(_Fields field) {
8347
      switch (field) {
8348
      case SUCCESS:
8349
        return new Boolean(isSuccess());
8350
 
8351
      case UCX:
8352
        return getUcx();
8353
 
8354
      }
8355
      throw new IllegalStateException();
8356
    }
8357
 
8358
    public Object getFieldValue(int fieldId) {
8359
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8360
    }
8361
 
8362
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8363
    public boolean isSet(_Fields field) {
8364
      switch (field) {
8365
      case SUCCESS:
8366
        return isSetSuccess();
8367
      case UCX:
8368
        return isSetUcx();
8369
      }
8370
      throw new IllegalStateException();
8371
    }
8372
 
8373
    public boolean isSet(int fieldID) {
8374
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8375
    }
8376
 
8377
    @Override
8378
    public boolean equals(Object that) {
8379
      if (that == null)
8380
        return false;
8381
      if (that instanceof userExists_result)
8382
        return this.equals((userExists_result)that);
8383
      return false;
8384
    }
8385
 
8386
    public boolean equals(userExists_result that) {
8387
      if (that == null)
8388
        return false;
8389
 
8390
      boolean this_present_success = true;
8391
      boolean that_present_success = true;
8392
      if (this_present_success || that_present_success) {
8393
        if (!(this_present_success && that_present_success))
8394
          return false;
8395
        if (this.success != that.success)
8396
          return false;
8397
      }
8398
 
8399
      boolean this_present_ucx = true && this.isSetUcx();
8400
      boolean that_present_ucx = true && that.isSetUcx();
8401
      if (this_present_ucx || that_present_ucx) {
8402
        if (!(this_present_ucx && that_present_ucx))
8403
          return false;
8404
        if (!this.ucx.equals(that.ucx))
8405
          return false;
8406
      }
8407
 
8408
      return true;
8409
    }
8410
 
8411
    @Override
8412
    public int hashCode() {
8413
      return 0;
8414
    }
8415
 
8416
    public int compareTo(userExists_result other) {
8417
      if (!getClass().equals(other.getClass())) {
8418
        return getClass().getName().compareTo(other.getClass().getName());
8419
      }
8420
 
8421
      int lastComparison = 0;
8422
      userExists_result typedOther = (userExists_result)other;
8423
 
8424
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8425
      if (lastComparison != 0) {
8426
        return lastComparison;
8427
      }
8428
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8429
      if (lastComparison != 0) {
8430
        return lastComparison;
8431
      }
8432
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8433
      if (lastComparison != 0) {
8434
        return lastComparison;
8435
      }
8436
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8437
      if (lastComparison != 0) {
8438
        return lastComparison;
8439
      }
8440
      return 0;
8441
    }
8442
 
8443
    public void read(TProtocol iprot) throws TException {
8444
      TField field;
8445
      iprot.readStructBegin();
8446
      while (true)
8447
      {
8448
        field = iprot.readFieldBegin();
8449
        if (field.type == TType.STOP) { 
8450
          break;
8451
        }
8452
        _Fields fieldId = _Fields.findByThriftId(field.id);
8453
        if (fieldId == null) {
8454
          TProtocolUtil.skip(iprot, field.type);
8455
        } else {
8456
          switch (fieldId) {
8457
            case SUCCESS:
8458
              if (field.type == TType.BOOL) {
8459
                this.success = iprot.readBool();
8460
                setSuccessIsSet(true);
8461
              } else { 
8462
                TProtocolUtil.skip(iprot, field.type);
8463
              }
8464
              break;
8465
            case UCX:
8466
              if (field.type == TType.STRUCT) {
8467
                this.ucx = new UserContextException();
8468
                this.ucx.read(iprot);
8469
              } else { 
8470
                TProtocolUtil.skip(iprot, field.type);
8471
              }
8472
              break;
8473
          }
8474
          iprot.readFieldEnd();
8475
        }
8476
      }
8477
      iprot.readStructEnd();
8478
      validate();
8479
    }
8480
 
8481
    public void write(TProtocol oprot) throws TException {
8482
      oprot.writeStructBegin(STRUCT_DESC);
8483
 
8484
      if (this.isSetSuccess()) {
8485
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8486
        oprot.writeBool(this.success);
8487
        oprot.writeFieldEnd();
8488
      } else if (this.isSetUcx()) {
8489
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8490
        this.ucx.write(oprot);
8491
        oprot.writeFieldEnd();
8492
      }
8493
      oprot.writeFieldStop();
8494
      oprot.writeStructEnd();
8495
    }
8496
 
8497
    @Override
8498
    public String toString() {
8499
      StringBuilder sb = new StringBuilder("userExists_result(");
8500
      boolean first = true;
8501
 
8502
      sb.append("success:");
8503
      sb.append(this.success);
8504
      first = false;
8505
      if (!first) sb.append(", ");
8506
      sb.append("ucx:");
8507
      if (this.ucx == null) {
8508
        sb.append("null");
8509
      } else {
8510
        sb.append(this.ucx);
8511
      }
8512
      first = false;
8513
      sb.append(")");
8514
      return sb.toString();
8515
    }
8516
 
8517
    public void validate() throws TException {
8518
      // check for required fields
8519
    }
8520
 
8521
  }
8522
 
8523
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8524
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8525
 
8526
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8527
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8528
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8529
 
8530
    private long userId;
8531
    private Address address;
8532
    private boolean setDefault;
8533
 
8534
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8535
    public enum _Fields implements TFieldIdEnum {
8536
      USER_ID((short)1, "userId"),
8537
      ADDRESS((short)2, "address"),
571 rajveer 8538
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8539
 
8540
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8541
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8542
 
8543
      static {
8544
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8545
          byId.put((int)field._thriftId, field);
8546
          byName.put(field.getFieldName(), field);
8547
        }
8548
      }
8549
 
8550
      /**
8551
       * Find the _Fields constant that matches fieldId, or null if its not found.
8552
       */
8553
      public static _Fields findByThriftId(int fieldId) {
8554
        return byId.get(fieldId);
8555
      }
8556
 
8557
      /**
8558
       * Find the _Fields constant that matches fieldId, throwing an exception
8559
       * if it is not found.
8560
       */
8561
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8562
        _Fields fields = findByThriftId(fieldId);
8563
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8564
        return fields;
8565
      }
8566
 
8567
      /**
8568
       * Find the _Fields constant that matches name, or null if its not found.
8569
       */
8570
      public static _Fields findByName(String name) {
8571
        return byName.get(name);
8572
      }
8573
 
8574
      private final short _thriftId;
8575
      private final String _fieldName;
8576
 
8577
      _Fields(short thriftId, String fieldName) {
8578
        _thriftId = thriftId;
8579
        _fieldName = fieldName;
8580
      }
8581
 
8582
      public short getThriftFieldId() {
8583
        return _thriftId;
8584
      }
8585
 
8586
      public String getFieldName() {
8587
        return _fieldName;
8588
      }
8589
    }
8590
 
8591
    // isset id assignments
8592
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8593
    private static final int __SETDEFAULT_ISSET_ID = 1;
8594
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8595
 
8596
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8597
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8598
          new FieldValueMetaData(TType.I64)));
8599
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8600
          new StructMetaData(TType.STRUCT, Address.class)));
8601
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8602
          new FieldValueMetaData(TType.BOOL)));
8603
    }});
8604
 
8605
    static {
8606
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8607
    }
8608
 
8609
    public addAddressForUser_args() {
8610
    }
8611
 
8612
    public addAddressForUser_args(
8613
      long userId,
8614
      Address address,
8615
      boolean setDefault)
8616
    {
8617
      this();
8618
      this.userId = userId;
8619
      setUserIdIsSet(true);
8620
      this.address = address;
8621
      this.setDefault = setDefault;
8622
      setSetDefaultIsSet(true);
8623
    }
8624
 
8625
    /**
8626
     * Performs a deep copy on <i>other</i>.
8627
     */
8628
    public addAddressForUser_args(addAddressForUser_args other) {
8629
      __isset_bit_vector.clear();
8630
      __isset_bit_vector.or(other.__isset_bit_vector);
8631
      this.userId = other.userId;
8632
      if (other.isSetAddress()) {
8633
        this.address = new Address(other.address);
8634
      }
8635
      this.setDefault = other.setDefault;
8636
    }
8637
 
8638
    public addAddressForUser_args deepCopy() {
8639
      return new addAddressForUser_args(this);
8640
    }
8641
 
8642
    @Deprecated
8643
    public addAddressForUser_args clone() {
8644
      return new addAddressForUser_args(this);
8645
    }
8646
 
8647
    public long getUserId() {
8648
      return this.userId;
8649
    }
8650
 
8651
    public addAddressForUser_args setUserId(long userId) {
8652
      this.userId = userId;
8653
      setUserIdIsSet(true);
123 ashish 8654
      return this;
8655
    }
8656
 
553 chandransh 8657
    public void unsetUserId() {
8658
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8659
    }
8660
 
553 chandransh 8661
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8662
    public boolean isSetUserId() {
8663
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8664
    }
8665
 
553 chandransh 8666
    public void setUserIdIsSet(boolean value) {
8667
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8668
    }
8669
 
8670
    public Address getAddress() {
8671
      return this.address;
8672
    }
8673
 
8674
    public addAddressForUser_args setAddress(Address address) {
8675
      this.address = address;
8676
      return this;
8677
    }
8678
 
8679
    public void unsetAddress() {
8680
      this.address = null;
8681
    }
8682
 
8683
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8684
    public boolean isSetAddress() {
8685
      return this.address != null;
8686
    }
8687
 
8688
    public void setAddressIsSet(boolean value) {
123 ashish 8689
      if (!value) {
553 chandransh 8690
        this.address = null;
123 ashish 8691
      }
8692
    }
8693
 
553 chandransh 8694
    public boolean isSetDefault() {
8695
      return this.setDefault;
8696
    }
8697
 
8698
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8699
      this.setDefault = setDefault;
8700
      setSetDefaultIsSet(true);
8701
      return this;
8702
    }
8703
 
8704
    public void unsetSetDefault() {
8705
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8706
    }
8707
 
8708
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8709
    public boolean isSetSetDefault() {
8710
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8711
    }
8712
 
8713
    public void setSetDefaultIsSet(boolean value) {
8714
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8715
    }
8716
 
123 ashish 8717
    public void setFieldValue(_Fields field, Object value) {
8718
      switch (field) {
553 chandransh 8719
      case USER_ID:
123 ashish 8720
        if (value == null) {
553 chandransh 8721
          unsetUserId();
123 ashish 8722
        } else {
553 chandransh 8723
          setUserId((Long)value);
123 ashish 8724
        }
8725
        break;
8726
 
553 chandransh 8727
      case ADDRESS:
123 ashish 8728
        if (value == null) {
553 chandransh 8729
          unsetAddress();
123 ashish 8730
        } else {
553 chandransh 8731
          setAddress((Address)value);
123 ashish 8732
        }
8733
        break;
8734
 
553 chandransh 8735
      case SET_DEFAULT:
8736
        if (value == null) {
8737
          unsetSetDefault();
8738
        } else {
8739
          setSetDefault((Boolean)value);
8740
        }
8741
        break;
8742
 
123 ashish 8743
      }
8744
    }
8745
 
8746
    public void setFieldValue(int fieldID, Object value) {
8747
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8748
    }
8749
 
8750
    public Object getFieldValue(_Fields field) {
8751
      switch (field) {
553 chandransh 8752
      case USER_ID:
8753
        return new Long(getUserId());
123 ashish 8754
 
553 chandransh 8755
      case ADDRESS:
8756
        return getAddress();
123 ashish 8757
 
553 chandransh 8758
      case SET_DEFAULT:
8759
        return new Boolean(isSetDefault());
8760
 
123 ashish 8761
      }
8762
      throw new IllegalStateException();
8763
    }
8764
 
8765
    public Object getFieldValue(int fieldId) {
8766
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8767
    }
8768
 
8769
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8770
    public boolean isSet(_Fields field) {
8771
      switch (field) {
553 chandransh 8772
      case USER_ID:
8773
        return isSetUserId();
8774
      case ADDRESS:
8775
        return isSetAddress();
8776
      case SET_DEFAULT:
8777
        return isSetSetDefault();
123 ashish 8778
      }
8779
      throw new IllegalStateException();
8780
    }
8781
 
8782
    public boolean isSet(int fieldID) {
8783
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8784
    }
8785
 
8786
    @Override
8787
    public boolean equals(Object that) {
8788
      if (that == null)
8789
        return false;
553 chandransh 8790
      if (that instanceof addAddressForUser_args)
8791
        return this.equals((addAddressForUser_args)that);
123 ashish 8792
      return false;
8793
    }
8794
 
553 chandransh 8795
    public boolean equals(addAddressForUser_args that) {
123 ashish 8796
      if (that == null)
8797
        return false;
8798
 
553 chandransh 8799
      boolean this_present_userId = true;
8800
      boolean that_present_userId = true;
8801
      if (this_present_userId || that_present_userId) {
8802
        if (!(this_present_userId && that_present_userId))
123 ashish 8803
          return false;
553 chandransh 8804
        if (this.userId != that.userId)
123 ashish 8805
          return false;
8806
      }
8807
 
553 chandransh 8808
      boolean this_present_address = true && this.isSetAddress();
8809
      boolean that_present_address = true && that.isSetAddress();
8810
      if (this_present_address || that_present_address) {
8811
        if (!(this_present_address && that_present_address))
123 ashish 8812
          return false;
553 chandransh 8813
        if (!this.address.equals(that.address))
123 ashish 8814
          return false;
8815
      }
8816
 
553 chandransh 8817
      boolean this_present_setDefault = true;
8818
      boolean that_present_setDefault = true;
8819
      if (this_present_setDefault || that_present_setDefault) {
8820
        if (!(this_present_setDefault && that_present_setDefault))
8821
          return false;
8822
        if (this.setDefault != that.setDefault)
8823
          return false;
8824
      }
8825
 
123 ashish 8826
      return true;
8827
    }
8828
 
8829
    @Override
8830
    public int hashCode() {
8831
      return 0;
8832
    }
8833
 
553 chandransh 8834
    public int compareTo(addAddressForUser_args other) {
123 ashish 8835
      if (!getClass().equals(other.getClass())) {
8836
        return getClass().getName().compareTo(other.getClass().getName());
8837
      }
8838
 
8839
      int lastComparison = 0;
553 chandransh 8840
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8841
 
553 chandransh 8842
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8843
      if (lastComparison != 0) {
8844
        return lastComparison;
8845
      }
553 chandransh 8846
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8847
      if (lastComparison != 0) {
8848
        return lastComparison;
8849
      }
553 chandransh 8850
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8851
      if (lastComparison != 0) {
8852
        return lastComparison;
8853
      }
553 chandransh 8854
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8855
      if (lastComparison != 0) {
8856
        return lastComparison;
8857
      }
553 chandransh 8858
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8859
      if (lastComparison != 0) {
8860
        return lastComparison;
8861
      }
8862
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8863
      if (lastComparison != 0) {
8864
        return lastComparison;
8865
      }
123 ashish 8866
      return 0;
8867
    }
8868
 
8869
    public void read(TProtocol iprot) throws TException {
8870
      TField field;
8871
      iprot.readStructBegin();
8872
      while (true)
8873
      {
8874
        field = iprot.readFieldBegin();
8875
        if (field.type == TType.STOP) { 
8876
          break;
8877
        }
8878
        _Fields fieldId = _Fields.findByThriftId(field.id);
8879
        if (fieldId == null) {
8880
          TProtocolUtil.skip(iprot, field.type);
8881
        } else {
8882
          switch (fieldId) {
553 chandransh 8883
            case USER_ID:
8884
              if (field.type == TType.I64) {
8885
                this.userId = iprot.readI64();
8886
                setUserIdIsSet(true);
123 ashish 8887
              } else { 
8888
                TProtocolUtil.skip(iprot, field.type);
8889
              }
8890
              break;
553 chandransh 8891
            case ADDRESS:
8892
              if (field.type == TType.STRUCT) {
8893
                this.address = new Address();
8894
                this.address.read(iprot);
123 ashish 8895
              } else { 
8896
                TProtocolUtil.skip(iprot, field.type);
8897
              }
8898
              break;
553 chandransh 8899
            case SET_DEFAULT:
123 ashish 8900
              if (field.type == TType.BOOL) {
553 chandransh 8901
                this.setDefault = iprot.readBool();
8902
                setSetDefaultIsSet(true);
123 ashish 8903
              } else { 
8904
                TProtocolUtil.skip(iprot, field.type);
8905
              }
8906
              break;
8907
          }
8908
          iprot.readFieldEnd();
8909
        }
8910
      }
8911
      iprot.readStructEnd();
8912
      validate();
8913
    }
8914
 
8915
    public void write(TProtocol oprot) throws TException {
8916
      validate();
8917
 
8918
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8919
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8920
      oprot.writeI64(this.userId);
8921
      oprot.writeFieldEnd();
8922
      if (this.address != null) {
8923
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8924
        this.address.write(oprot);
123 ashish 8925
        oprot.writeFieldEnd();
8926
      }
553 chandransh 8927
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8928
      oprot.writeBool(this.setDefault);
8929
      oprot.writeFieldEnd();
123 ashish 8930
      oprot.writeFieldStop();
8931
      oprot.writeStructEnd();
8932
    }
8933
 
8934
    @Override
8935
    public String toString() {
553 chandransh 8936
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8937
      boolean first = true;
8938
 
553 chandransh 8939
      sb.append("userId:");
8940
      sb.append(this.userId);
123 ashish 8941
      first = false;
8942
      if (!first) sb.append(", ");
553 chandransh 8943
      sb.append("address:");
8944
      if (this.address == null) {
123 ashish 8945
        sb.append("null");
8946
      } else {
553 chandransh 8947
        sb.append(this.address);
123 ashish 8948
      }
8949
      first = false;
8950
      if (!first) sb.append(", ");
553 chandransh 8951
      sb.append("setDefault:");
8952
      sb.append(this.setDefault);
8953
      first = false;
123 ashish 8954
      sb.append(")");
8955
      return sb.toString();
8956
    }
8957
 
8958
    public void validate() throws TException {
8959
      // check for required fields
8960
    }
8961
 
8962
  }
8963
 
553 chandransh 8964
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8965
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8966
 
571 rajveer 8967
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 8968
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8969
 
571 rajveer 8970
    private long success;
553 chandransh 8971
    private UserContextException ucx;
123 ashish 8972
 
8973
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8974
    public enum _Fields implements TFieldIdEnum {
8975
      SUCCESS((short)0, "success"),
553 chandransh 8976
      UCX((short)1, "ucx");
123 ashish 8977
 
8978
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8979
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8980
 
8981
      static {
8982
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8983
          byId.put((int)field._thriftId, field);
8984
          byName.put(field.getFieldName(), field);
8985
        }
8986
      }
8987
 
8988
      /**
8989
       * Find the _Fields constant that matches fieldId, or null if its not found.
8990
       */
8991
      public static _Fields findByThriftId(int fieldId) {
8992
        return byId.get(fieldId);
8993
      }
8994
 
8995
      /**
8996
       * Find the _Fields constant that matches fieldId, throwing an exception
8997
       * if it is not found.
8998
       */
8999
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9000
        _Fields fields = findByThriftId(fieldId);
9001
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9002
        return fields;
9003
      }
9004
 
9005
      /**
9006
       * Find the _Fields constant that matches name, or null if its not found.
9007
       */
9008
      public static _Fields findByName(String name) {
9009
        return byName.get(name);
9010
      }
9011
 
9012
      private final short _thriftId;
9013
      private final String _fieldName;
9014
 
9015
      _Fields(short thriftId, String fieldName) {
9016
        _thriftId = thriftId;
9017
        _fieldName = fieldName;
9018
      }
9019
 
9020
      public short getThriftFieldId() {
9021
        return _thriftId;
9022
      }
9023
 
9024
      public String getFieldName() {
9025
        return _fieldName;
9026
      }
9027
    }
9028
 
9029
    // isset id assignments
9030
    private static final int __SUCCESS_ISSET_ID = 0;
9031
    private BitSet __isset_bit_vector = new BitSet(1);
9032
 
9033
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9034
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 9035
          new FieldValueMetaData(TType.I64)));
553 chandransh 9036
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 9037
          new FieldValueMetaData(TType.STRUCT)));
9038
    }});
9039
 
9040
    static {
553 chandransh 9041
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 9042
    }
9043
 
553 chandransh 9044
    public addAddressForUser_result() {
123 ashish 9045
    }
9046
 
553 chandransh 9047
    public addAddressForUser_result(
571 rajveer 9048
      long success,
553 chandransh 9049
      UserContextException ucx)
123 ashish 9050
    {
9051
      this();
9052
      this.success = success;
9053
      setSuccessIsSet(true);
553 chandransh 9054
      this.ucx = ucx;
123 ashish 9055
    }
9056
 
9057
    /**
9058
     * Performs a deep copy on <i>other</i>.
9059
     */
553 chandransh 9060
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 9061
      __isset_bit_vector.clear();
9062
      __isset_bit_vector.or(other.__isset_bit_vector);
9063
      this.success = other.success;
553 chandransh 9064
      if (other.isSetUcx()) {
9065
        this.ucx = new UserContextException(other.ucx);
123 ashish 9066
      }
9067
    }
9068
 
553 chandransh 9069
    public addAddressForUser_result deepCopy() {
9070
      return new addAddressForUser_result(this);
123 ashish 9071
    }
9072
 
9073
    @Deprecated
553 chandransh 9074
    public addAddressForUser_result clone() {
9075
      return new addAddressForUser_result(this);
123 ashish 9076
    }
9077
 
571 rajveer 9078
    public long getSuccess() {
123 ashish 9079
      return this.success;
9080
    }
9081
 
571 rajveer 9082
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9083
      this.success = success;
9084
      setSuccessIsSet(true);
9085
      return this;
9086
    }
9087
 
9088
    public void unsetSuccess() {
9089
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9090
    }
9091
 
9092
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9093
    public boolean isSetSuccess() {
9094
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9095
    }
9096
 
9097
    public void setSuccessIsSet(boolean value) {
9098
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9099
    }
9100
 
553 chandransh 9101
    public UserContextException getUcx() {
9102
      return this.ucx;
123 ashish 9103
    }
9104
 
553 chandransh 9105
    public addAddressForUser_result setUcx(UserContextException ucx) {
9106
      this.ucx = ucx;
123 ashish 9107
      return this;
9108
    }
9109
 
553 chandransh 9110
    public void unsetUcx() {
9111
      this.ucx = null;
123 ashish 9112
    }
9113
 
553 chandransh 9114
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9115
    public boolean isSetUcx() {
9116
      return this.ucx != null;
123 ashish 9117
    }
9118
 
553 chandransh 9119
    public void setUcxIsSet(boolean value) {
123 ashish 9120
      if (!value) {
553 chandransh 9121
        this.ucx = null;
123 ashish 9122
      }
9123
    }
9124
 
9125
    public void setFieldValue(_Fields field, Object value) {
9126
      switch (field) {
9127
      case SUCCESS:
9128
        if (value == null) {
9129
          unsetSuccess();
9130
        } else {
571 rajveer 9131
          setSuccess((Long)value);
123 ashish 9132
        }
9133
        break;
9134
 
553 chandransh 9135
      case UCX:
123 ashish 9136
        if (value == null) {
553 chandransh 9137
          unsetUcx();
123 ashish 9138
        } else {
553 chandransh 9139
          setUcx((UserContextException)value);
123 ashish 9140
        }
9141
        break;
9142
 
9143
      }
9144
    }
9145
 
9146
    public void setFieldValue(int fieldID, Object value) {
9147
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9148
    }
9149
 
9150
    public Object getFieldValue(_Fields field) {
9151
      switch (field) {
9152
      case SUCCESS:
571 rajveer 9153
        return new Long(getSuccess());
123 ashish 9154
 
553 chandransh 9155
      case UCX:
9156
        return getUcx();
123 ashish 9157
 
9158
      }
9159
      throw new IllegalStateException();
9160
    }
9161
 
9162
    public Object getFieldValue(int fieldId) {
9163
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9164
    }
9165
 
9166
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9167
    public boolean isSet(_Fields field) {
9168
      switch (field) {
9169
      case SUCCESS:
9170
        return isSetSuccess();
553 chandransh 9171
      case UCX:
9172
        return isSetUcx();
123 ashish 9173
      }
9174
      throw new IllegalStateException();
9175
    }
9176
 
9177
    public boolean isSet(int fieldID) {
9178
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9179
    }
9180
 
9181
    @Override
9182
    public boolean equals(Object that) {
9183
      if (that == null)
9184
        return false;
553 chandransh 9185
      if (that instanceof addAddressForUser_result)
9186
        return this.equals((addAddressForUser_result)that);
123 ashish 9187
      return false;
9188
    }
9189
 
553 chandransh 9190
    public boolean equals(addAddressForUser_result that) {
123 ashish 9191
      if (that == null)
9192
        return false;
9193
 
9194
      boolean this_present_success = true;
9195
      boolean that_present_success = true;
9196
      if (this_present_success || that_present_success) {
9197
        if (!(this_present_success && that_present_success))
9198
          return false;
9199
        if (this.success != that.success)
9200
          return false;
9201
      }
9202
 
553 chandransh 9203
      boolean this_present_ucx = true && this.isSetUcx();
9204
      boolean that_present_ucx = true && that.isSetUcx();
9205
      if (this_present_ucx || that_present_ucx) {
9206
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9207
          return false;
553 chandransh 9208
        if (!this.ucx.equals(that.ucx))
123 ashish 9209
          return false;
9210
      }
9211
 
9212
      return true;
9213
    }
9214
 
9215
    @Override
9216
    public int hashCode() {
9217
      return 0;
9218
    }
9219
 
553 chandransh 9220
    public int compareTo(addAddressForUser_result other) {
123 ashish 9221
      if (!getClass().equals(other.getClass())) {
9222
        return getClass().getName().compareTo(other.getClass().getName());
9223
      }
9224
 
9225
      int lastComparison = 0;
553 chandransh 9226
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9227
 
9228
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9229
      if (lastComparison != 0) {
9230
        return lastComparison;
9231
      }
9232
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9233
      if (lastComparison != 0) {
9234
        return lastComparison;
9235
      }
553 chandransh 9236
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9237
      if (lastComparison != 0) {
9238
        return lastComparison;
9239
      }
553 chandransh 9240
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9241
      if (lastComparison != 0) {
9242
        return lastComparison;
9243
      }
9244
      return 0;
9245
    }
9246
 
9247
    public void read(TProtocol iprot) throws TException {
9248
      TField field;
9249
      iprot.readStructBegin();
9250
      while (true)
9251
      {
9252
        field = iprot.readFieldBegin();
9253
        if (field.type == TType.STOP) { 
9254
          break;
9255
        }
9256
        _Fields fieldId = _Fields.findByThriftId(field.id);
9257
        if (fieldId == null) {
9258
          TProtocolUtil.skip(iprot, field.type);
9259
        } else {
9260
          switch (fieldId) {
9261
            case SUCCESS:
571 rajveer 9262
              if (field.type == TType.I64) {
9263
                this.success = iprot.readI64();
123 ashish 9264
                setSuccessIsSet(true);
9265
              } else { 
9266
                TProtocolUtil.skip(iprot, field.type);
9267
              }
9268
              break;
553 chandransh 9269
            case UCX:
123 ashish 9270
              if (field.type == TType.STRUCT) {
553 chandransh 9271
                this.ucx = new UserContextException();
9272
                this.ucx.read(iprot);
123 ashish 9273
              } else { 
9274
                TProtocolUtil.skip(iprot, field.type);
9275
              }
9276
              break;
9277
          }
9278
          iprot.readFieldEnd();
9279
        }
9280
      }
9281
      iprot.readStructEnd();
9282
      validate();
9283
    }
9284
 
9285
    public void write(TProtocol oprot) throws TException {
9286
      oprot.writeStructBegin(STRUCT_DESC);
9287
 
9288
      if (this.isSetSuccess()) {
9289
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9290
        oprot.writeI64(this.success);
123 ashish 9291
        oprot.writeFieldEnd();
553 chandransh 9292
      } else if (this.isSetUcx()) {
9293
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9294
        this.ucx.write(oprot);
123 ashish 9295
        oprot.writeFieldEnd();
9296
      }
9297
      oprot.writeFieldStop();
9298
      oprot.writeStructEnd();
9299
    }
9300
 
9301
    @Override
9302
    public String toString() {
553 chandransh 9303
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9304
      boolean first = true;
9305
 
9306
      sb.append("success:");
9307
      sb.append(this.success);
9308
      first = false;
9309
      if (!first) sb.append(", ");
553 chandransh 9310
      sb.append("ucx:");
9311
      if (this.ucx == null) {
123 ashish 9312
        sb.append("null");
9313
      } else {
553 chandransh 9314
        sb.append(this.ucx);
123 ashish 9315
      }
9316
      first = false;
9317
      sb.append(")");
9318
      return sb.toString();
9319
    }
9320
 
9321
    public void validate() throws TException {
9322
      // check for required fields
9323
    }
9324
 
9325
  }
9326
 
553 chandransh 9327
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9328
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9329
 
553 chandransh 9330
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9331
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9332
 
553 chandransh 9333
    private long userid;
9334
    private long addressId;
48 ashish 9335
 
9336
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9337
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9338
      USERID((short)1, "userid"),
9339
      ADDRESS_ID((short)2, "addressId");
48 ashish 9340
 
9341
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9343
 
9344
      static {
9345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9346
          byId.put((int)field._thriftId, field);
9347
          byName.put(field.getFieldName(), field);
9348
        }
9349
      }
9350
 
9351
      /**
9352
       * Find the _Fields constant that matches fieldId, or null if its not found.
9353
       */
9354
      public static _Fields findByThriftId(int fieldId) {
9355
        return byId.get(fieldId);
9356
      }
9357
 
9358
      /**
9359
       * Find the _Fields constant that matches fieldId, throwing an exception
9360
       * if it is not found.
9361
       */
9362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9363
        _Fields fields = findByThriftId(fieldId);
9364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9365
        return fields;
9366
      }
9367
 
9368
      /**
9369
       * Find the _Fields constant that matches name, or null if its not found.
9370
       */
9371
      public static _Fields findByName(String name) {
9372
        return byName.get(name);
9373
      }
9374
 
9375
      private final short _thriftId;
9376
      private final String _fieldName;
9377
 
9378
      _Fields(short thriftId, String fieldName) {
9379
        _thriftId = thriftId;
9380
        _fieldName = fieldName;
9381
      }
9382
 
9383
      public short getThriftFieldId() {
9384
        return _thriftId;
9385
      }
9386
 
9387
      public String getFieldName() {
9388
        return _fieldName;
9389
      }
9390
    }
9391
 
9392
    // isset id assignments
553 chandransh 9393
    private static final int __USERID_ISSET_ID = 0;
9394
    private static final int __ADDRESSID_ISSET_ID = 1;
9395
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9396
 
9397
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9398
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9399
          new FieldValueMetaData(TType.I64)));
9400
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9401
          new FieldValueMetaData(TType.I64)));
48 ashish 9402
    }});
9403
 
9404
    static {
553 chandransh 9405
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9406
    }
9407
 
553 chandransh 9408
    public removeAddressForUser_args() {
48 ashish 9409
    }
9410
 
553 chandransh 9411
    public removeAddressForUser_args(
9412
      long userid,
9413
      long addressId)
48 ashish 9414
    {
9415
      this();
553 chandransh 9416
      this.userid = userid;
9417
      setUseridIsSet(true);
9418
      this.addressId = addressId;
9419
      setAddressIdIsSet(true);
48 ashish 9420
    }
9421
 
9422
    /**
9423
     * Performs a deep copy on <i>other</i>.
9424
     */
553 chandransh 9425
    public removeAddressForUser_args(removeAddressForUser_args other) {
9426
      __isset_bit_vector.clear();
9427
      __isset_bit_vector.or(other.__isset_bit_vector);
9428
      this.userid = other.userid;
9429
      this.addressId = other.addressId;
48 ashish 9430
    }
9431
 
553 chandransh 9432
    public removeAddressForUser_args deepCopy() {
9433
      return new removeAddressForUser_args(this);
48 ashish 9434
    }
9435
 
9436
    @Deprecated
553 chandransh 9437
    public removeAddressForUser_args clone() {
9438
      return new removeAddressForUser_args(this);
48 ashish 9439
    }
9440
 
553 chandransh 9441
    public long getUserid() {
9442
      return this.userid;
48 ashish 9443
    }
9444
 
553 chandransh 9445
    public removeAddressForUser_args setUserid(long userid) {
9446
      this.userid = userid;
9447
      setUseridIsSet(true);
48 ashish 9448
      return this;
9449
    }
9450
 
553 chandransh 9451
    public void unsetUserid() {
9452
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9453
    }
9454
 
553 chandransh 9455
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9456
    public boolean isSetUserid() {
9457
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9458
    }
9459
 
553 chandransh 9460
    public void setUseridIsSet(boolean value) {
9461
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9462
    }
9463
 
553 chandransh 9464
    public long getAddressId() {
9465
      return this.addressId;
9466
    }
9467
 
9468
    public removeAddressForUser_args setAddressId(long addressId) {
9469
      this.addressId = addressId;
9470
      setAddressIdIsSet(true);
9471
      return this;
9472
    }
9473
 
9474
    public void unsetAddressId() {
9475
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9476
    }
9477
 
9478
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9479
    public boolean isSetAddressId() {
9480
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9481
    }
9482
 
9483
    public void setAddressIdIsSet(boolean value) {
9484
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9485
    }
9486
 
48 ashish 9487
    public void setFieldValue(_Fields field, Object value) {
9488
      switch (field) {
553 chandransh 9489
      case USERID:
48 ashish 9490
        if (value == null) {
553 chandransh 9491
          unsetUserid();
48 ashish 9492
        } else {
553 chandransh 9493
          setUserid((Long)value);
48 ashish 9494
        }
9495
        break;
9496
 
553 chandransh 9497
      case ADDRESS_ID:
9498
        if (value == null) {
9499
          unsetAddressId();
9500
        } else {
9501
          setAddressId((Long)value);
9502
        }
9503
        break;
9504
 
48 ashish 9505
      }
9506
    }
9507
 
9508
    public void setFieldValue(int fieldID, Object value) {
9509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9510
    }
9511
 
9512
    public Object getFieldValue(_Fields field) {
9513
      switch (field) {
553 chandransh 9514
      case USERID:
9515
        return new Long(getUserid());
48 ashish 9516
 
553 chandransh 9517
      case ADDRESS_ID:
9518
        return new Long(getAddressId());
9519
 
48 ashish 9520
      }
9521
      throw new IllegalStateException();
9522
    }
9523
 
9524
    public Object getFieldValue(int fieldId) {
9525
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9526
    }
9527
 
9528
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9529
    public boolean isSet(_Fields field) {
9530
      switch (field) {
553 chandransh 9531
      case USERID:
9532
        return isSetUserid();
9533
      case ADDRESS_ID:
9534
        return isSetAddressId();
48 ashish 9535
      }
9536
      throw new IllegalStateException();
9537
    }
9538
 
9539
    public boolean isSet(int fieldID) {
9540
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9541
    }
9542
 
9543
    @Override
9544
    public boolean equals(Object that) {
9545
      if (that == null)
9546
        return false;
553 chandransh 9547
      if (that instanceof removeAddressForUser_args)
9548
        return this.equals((removeAddressForUser_args)that);
48 ashish 9549
      return false;
9550
    }
9551
 
553 chandransh 9552
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9553
      if (that == null)
9554
        return false;
9555
 
553 chandransh 9556
      boolean this_present_userid = true;
9557
      boolean that_present_userid = true;
9558
      if (this_present_userid || that_present_userid) {
9559
        if (!(this_present_userid && that_present_userid))
48 ashish 9560
          return false;
553 chandransh 9561
        if (this.userid != that.userid)
48 ashish 9562
          return false;
9563
      }
9564
 
553 chandransh 9565
      boolean this_present_addressId = true;
9566
      boolean that_present_addressId = true;
9567
      if (this_present_addressId || that_present_addressId) {
9568
        if (!(this_present_addressId && that_present_addressId))
9569
          return false;
9570
        if (this.addressId != that.addressId)
9571
          return false;
9572
      }
9573
 
48 ashish 9574
      return true;
9575
    }
9576
 
9577
    @Override
9578
    public int hashCode() {
9579
      return 0;
9580
    }
9581
 
553 chandransh 9582
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9583
      if (!getClass().equals(other.getClass())) {
9584
        return getClass().getName().compareTo(other.getClass().getName());
9585
      }
9586
 
9587
      int lastComparison = 0;
553 chandransh 9588
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9589
 
553 chandransh 9590
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9591
      if (lastComparison != 0) {
9592
        return lastComparison;
9593
      }
553 chandransh 9594
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9595
      if (lastComparison != 0) {
9596
        return lastComparison;
9597
      }
553 chandransh 9598
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9599
      if (lastComparison != 0) {
9600
        return lastComparison;
9601
      }
9602
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9603
      if (lastComparison != 0) {
9604
        return lastComparison;
9605
      }
48 ashish 9606
      return 0;
9607
    }
9608
 
9609
    public void read(TProtocol iprot) throws TException {
9610
      TField field;
9611
      iprot.readStructBegin();
9612
      while (true)
9613
      {
9614
        field = iprot.readFieldBegin();
9615
        if (field.type == TType.STOP) { 
9616
          break;
9617
        }
9618
        _Fields fieldId = _Fields.findByThriftId(field.id);
9619
        if (fieldId == null) {
9620
          TProtocolUtil.skip(iprot, field.type);
9621
        } else {
9622
          switch (fieldId) {
553 chandransh 9623
            case USERID:
9624
              if (field.type == TType.I64) {
9625
                this.userid = iprot.readI64();
9626
                setUseridIsSet(true);
48 ashish 9627
              } else { 
9628
                TProtocolUtil.skip(iprot, field.type);
9629
              }
9630
              break;
553 chandransh 9631
            case ADDRESS_ID:
9632
              if (field.type == TType.I64) {
9633
                this.addressId = iprot.readI64();
9634
                setAddressIdIsSet(true);
9635
              } else { 
9636
                TProtocolUtil.skip(iprot, field.type);
9637
              }
9638
              break;
48 ashish 9639
          }
9640
          iprot.readFieldEnd();
9641
        }
9642
      }
9643
      iprot.readStructEnd();
9644
      validate();
9645
    }
9646
 
9647
    public void write(TProtocol oprot) throws TException {
9648
      validate();
9649
 
9650
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9651
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9652
      oprot.writeI64(this.userid);
9653
      oprot.writeFieldEnd();
9654
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9655
      oprot.writeI64(this.addressId);
9656
      oprot.writeFieldEnd();
48 ashish 9657
      oprot.writeFieldStop();
9658
      oprot.writeStructEnd();
9659
    }
9660
 
9661
    @Override
9662
    public String toString() {
553 chandransh 9663
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9664
      boolean first = true;
9665
 
553 chandransh 9666
      sb.append("userid:");
9667
      sb.append(this.userid);
48 ashish 9668
      first = false;
553 chandransh 9669
      if (!first) sb.append(", ");
9670
      sb.append("addressId:");
9671
      sb.append(this.addressId);
9672
      first = false;
48 ashish 9673
      sb.append(")");
9674
      return sb.toString();
9675
    }
9676
 
9677
    public void validate() throws TException {
9678
      // check for required fields
9679
    }
9680
 
9681
  }
9682
 
553 chandransh 9683
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9684
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9685
 
9686
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9687
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9688
 
9689
    private boolean success;
9690
    private UserContextException ucx;
9691
 
9692
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9693
    public enum _Fields implements TFieldIdEnum {
9694
      SUCCESS((short)0, "success"),
9695
      UCX((short)1, "ucx");
9696
 
9697
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9698
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9699
 
9700
      static {
9701
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9702
          byId.put((int)field._thriftId, field);
9703
          byName.put(field.getFieldName(), field);
9704
        }
9705
      }
9706
 
9707
      /**
9708
       * Find the _Fields constant that matches fieldId, or null if its not found.
9709
       */
9710
      public static _Fields findByThriftId(int fieldId) {
9711
        return byId.get(fieldId);
9712
      }
9713
 
9714
      /**
9715
       * Find the _Fields constant that matches fieldId, throwing an exception
9716
       * if it is not found.
9717
       */
9718
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9719
        _Fields fields = findByThriftId(fieldId);
9720
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9721
        return fields;
9722
      }
9723
 
9724
      /**
9725
       * Find the _Fields constant that matches name, or null if its not found.
9726
       */
9727
      public static _Fields findByName(String name) {
9728
        return byName.get(name);
9729
      }
9730
 
9731
      private final short _thriftId;
9732
      private final String _fieldName;
9733
 
9734
      _Fields(short thriftId, String fieldName) {
9735
        _thriftId = thriftId;
9736
        _fieldName = fieldName;
9737
      }
9738
 
9739
      public short getThriftFieldId() {
9740
        return _thriftId;
9741
      }
9742
 
9743
      public String getFieldName() {
9744
        return _fieldName;
9745
      }
9746
    }
9747
 
9748
    // isset id assignments
9749
    private static final int __SUCCESS_ISSET_ID = 0;
9750
    private BitSet __isset_bit_vector = new BitSet(1);
9751
 
9752
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9753
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9754
          new FieldValueMetaData(TType.BOOL)));
9755
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9756
          new FieldValueMetaData(TType.STRUCT)));
9757
    }});
9758
 
9759
    static {
553 chandransh 9760
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9761
    }
9762
 
553 chandransh 9763
    public removeAddressForUser_result() {
48 ashish 9764
    }
9765
 
553 chandransh 9766
    public removeAddressForUser_result(
48 ashish 9767
      boolean success,
9768
      UserContextException ucx)
9769
    {
9770
      this();
9771
      this.success = success;
9772
      setSuccessIsSet(true);
9773
      this.ucx = ucx;
9774
    }
9775
 
9776
    /**
9777
     * Performs a deep copy on <i>other</i>.
9778
     */
553 chandransh 9779
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9780
      __isset_bit_vector.clear();
9781
      __isset_bit_vector.or(other.__isset_bit_vector);
9782
      this.success = other.success;
9783
      if (other.isSetUcx()) {
9784
        this.ucx = new UserContextException(other.ucx);
9785
      }
9786
    }
9787
 
553 chandransh 9788
    public removeAddressForUser_result deepCopy() {
9789
      return new removeAddressForUser_result(this);
48 ashish 9790
    }
9791
 
9792
    @Deprecated
553 chandransh 9793
    public removeAddressForUser_result clone() {
9794
      return new removeAddressForUser_result(this);
48 ashish 9795
    }
9796
 
9797
    public boolean isSuccess() {
9798
      return this.success;
9799
    }
9800
 
553 chandransh 9801
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9802
      this.success = success;
9803
      setSuccessIsSet(true);
9804
      return this;
9805
    }
9806
 
9807
    public void unsetSuccess() {
9808
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9809
    }
9810
 
9811
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9812
    public boolean isSetSuccess() {
9813
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9814
    }
9815
 
9816
    public void setSuccessIsSet(boolean value) {
9817
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9818
    }
9819
 
9820
    public UserContextException getUcx() {
9821
      return this.ucx;
9822
    }
9823
 
553 chandransh 9824
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9825
      this.ucx = ucx;
9826
      return this;
9827
    }
9828
 
9829
    public void unsetUcx() {
9830
      this.ucx = null;
9831
    }
9832
 
9833
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9834
    public boolean isSetUcx() {
9835
      return this.ucx != null;
9836
    }
9837
 
9838
    public void setUcxIsSet(boolean value) {
9839
      if (!value) {
9840
        this.ucx = null;
9841
      }
9842
    }
9843
 
9844
    public void setFieldValue(_Fields field, Object value) {
9845
      switch (field) {
9846
      case SUCCESS:
9847
        if (value == null) {
9848
          unsetSuccess();
9849
        } else {
9850
          setSuccess((Boolean)value);
9851
        }
9852
        break;
9853
 
9854
      case UCX:
9855
        if (value == null) {
9856
          unsetUcx();
9857
        } else {
9858
          setUcx((UserContextException)value);
9859
        }
9860
        break;
9861
 
9862
      }
9863
    }
9864
 
9865
    public void setFieldValue(int fieldID, Object value) {
9866
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9867
    }
9868
 
9869
    public Object getFieldValue(_Fields field) {
9870
      switch (field) {
9871
      case SUCCESS:
9872
        return new Boolean(isSuccess());
9873
 
9874
      case UCX:
9875
        return getUcx();
9876
 
9877
      }
9878
      throw new IllegalStateException();
9879
    }
9880
 
9881
    public Object getFieldValue(int fieldId) {
9882
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9883
    }
9884
 
9885
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9886
    public boolean isSet(_Fields field) {
9887
      switch (field) {
9888
      case SUCCESS:
9889
        return isSetSuccess();
9890
      case UCX:
9891
        return isSetUcx();
9892
      }
9893
      throw new IllegalStateException();
9894
    }
9895
 
9896
    public boolean isSet(int fieldID) {
9897
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9898
    }
9899
 
9900
    @Override
9901
    public boolean equals(Object that) {
9902
      if (that == null)
9903
        return false;
553 chandransh 9904
      if (that instanceof removeAddressForUser_result)
9905
        return this.equals((removeAddressForUser_result)that);
48 ashish 9906
      return false;
9907
    }
9908
 
553 chandransh 9909
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9910
      if (that == null)
9911
        return false;
9912
 
9913
      boolean this_present_success = true;
9914
      boolean that_present_success = true;
9915
      if (this_present_success || that_present_success) {
9916
        if (!(this_present_success && that_present_success))
9917
          return false;
9918
        if (this.success != that.success)
9919
          return false;
9920
      }
9921
 
9922
      boolean this_present_ucx = true && this.isSetUcx();
9923
      boolean that_present_ucx = true && that.isSetUcx();
9924
      if (this_present_ucx || that_present_ucx) {
9925
        if (!(this_present_ucx && that_present_ucx))
9926
          return false;
9927
        if (!this.ucx.equals(that.ucx))
9928
          return false;
9929
      }
9930
 
9931
      return true;
9932
    }
9933
 
9934
    @Override
9935
    public int hashCode() {
9936
      return 0;
9937
    }
9938
 
553 chandransh 9939
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9940
      if (!getClass().equals(other.getClass())) {
9941
        return getClass().getName().compareTo(other.getClass().getName());
9942
      }
9943
 
9944
      int lastComparison = 0;
553 chandransh 9945
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9946
 
9947
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9948
      if (lastComparison != 0) {
9949
        return lastComparison;
9950
      }
9951
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9952
      if (lastComparison != 0) {
9953
        return lastComparison;
9954
      }
9955
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9956
      if (lastComparison != 0) {
9957
        return lastComparison;
9958
      }
9959
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9960
      if (lastComparison != 0) {
9961
        return lastComparison;
9962
      }
9963
      return 0;
9964
    }
9965
 
9966
    public void read(TProtocol iprot) throws TException {
9967
      TField field;
9968
      iprot.readStructBegin();
9969
      while (true)
9970
      {
9971
        field = iprot.readFieldBegin();
9972
        if (field.type == TType.STOP) { 
9973
          break;
9974
        }
9975
        _Fields fieldId = _Fields.findByThriftId(field.id);
9976
        if (fieldId == null) {
9977
          TProtocolUtil.skip(iprot, field.type);
9978
        } else {
9979
          switch (fieldId) {
9980
            case SUCCESS:
9981
              if (field.type == TType.BOOL) {
9982
                this.success = iprot.readBool();
9983
                setSuccessIsSet(true);
9984
              } else { 
9985
                TProtocolUtil.skip(iprot, field.type);
9986
              }
9987
              break;
9988
            case UCX:
9989
              if (field.type == TType.STRUCT) {
9990
                this.ucx = new UserContextException();
9991
                this.ucx.read(iprot);
9992
              } else { 
9993
                TProtocolUtil.skip(iprot, field.type);
9994
              }
9995
              break;
9996
          }
9997
          iprot.readFieldEnd();
9998
        }
9999
      }
10000
      iprot.readStructEnd();
10001
      validate();
10002
    }
10003
 
10004
    public void write(TProtocol oprot) throws TException {
10005
      oprot.writeStructBegin(STRUCT_DESC);
10006
 
10007
      if (this.isSetSuccess()) {
10008
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10009
        oprot.writeBool(this.success);
10010
        oprot.writeFieldEnd();
10011
      } else if (this.isSetUcx()) {
10012
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10013
        this.ucx.write(oprot);
10014
        oprot.writeFieldEnd();
10015
      }
10016
      oprot.writeFieldStop();
10017
      oprot.writeStructEnd();
10018
    }
10019
 
10020
    @Override
10021
    public String toString() {
553 chandransh 10022
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 10023
      boolean first = true;
10024
 
10025
      sb.append("success:");
10026
      sb.append(this.success);
10027
      first = false;
10028
      if (!first) sb.append(", ");
10029
      sb.append("ucx:");
10030
      if (this.ucx == null) {
10031
        sb.append("null");
10032
      } else {
10033
        sb.append(this.ucx);
10034
      }
10035
      first = false;
10036
      sb.append(")");
10037
      return sb.toString();
10038
    }
10039
 
10040
    public void validate() throws TException {
10041
      // check for required fields
10042
    }
10043
 
10044
  }
10045
 
553 chandransh 10046
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10047
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 10048
 
553 chandransh 10049
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 10050
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10051
 
553 chandransh 10052
    private long userId;
48 ashish 10053
    private long timestamp;
10054
 
10055
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10056
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10057
      USER_ID((short)1, "userId"),
10058
      TIMESTAMP((short)2, "timestamp");
48 ashish 10059
 
10060
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10061
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10062
 
10063
      static {
10064
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10065
          byId.put((int)field._thriftId, field);
10066
          byName.put(field.getFieldName(), field);
10067
        }
10068
      }
10069
 
10070
      /**
10071
       * Find the _Fields constant that matches fieldId, or null if its not found.
10072
       */
10073
      public static _Fields findByThriftId(int fieldId) {
10074
        return byId.get(fieldId);
10075
      }
10076
 
10077
      /**
10078
       * Find the _Fields constant that matches fieldId, throwing an exception
10079
       * if it is not found.
10080
       */
10081
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10082
        _Fields fields = findByThriftId(fieldId);
10083
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10084
        return fields;
10085
      }
10086
 
10087
      /**
10088
       * Find the _Fields constant that matches name, or null if its not found.
10089
       */
10090
      public static _Fields findByName(String name) {
10091
        return byName.get(name);
10092
      }
10093
 
10094
      private final short _thriftId;
10095
      private final String _fieldName;
10096
 
10097
      _Fields(short thriftId, String fieldName) {
10098
        _thriftId = thriftId;
10099
        _fieldName = fieldName;
10100
      }
10101
 
10102
      public short getThriftFieldId() {
10103
        return _thriftId;
10104
      }
10105
 
10106
      public String getFieldName() {
10107
        return _fieldName;
10108
      }
10109
    }
10110
 
10111
    // isset id assignments
553 chandransh 10112
    private static final int __USERID_ISSET_ID = 0;
10113
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10114
    private BitSet __isset_bit_vector = new BitSet(2);
10115
 
10116
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10117
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10118
          new FieldValueMetaData(TType.I64)));
48 ashish 10119
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10120
          new FieldValueMetaData(TType.I64)));
10121
    }});
10122
 
10123
    static {
553 chandransh 10124
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10125
    }
10126
 
553 chandransh 10127
    public setUserAsLoggedIn_args() {
48 ashish 10128
    }
10129
 
553 chandransh 10130
    public setUserAsLoggedIn_args(
10131
      long userId,
10132
      long timestamp)
48 ashish 10133
    {
10134
      this();
553 chandransh 10135
      this.userId = userId;
10136
      setUserIdIsSet(true);
48 ashish 10137
      this.timestamp = timestamp;
10138
      setTimestampIsSet(true);
10139
    }
10140
 
10141
    /**
10142
     * Performs a deep copy on <i>other</i>.
10143
     */
553 chandransh 10144
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10145
      __isset_bit_vector.clear();
10146
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10147
      this.userId = other.userId;
48 ashish 10148
      this.timestamp = other.timestamp;
10149
    }
10150
 
553 chandransh 10151
    public setUserAsLoggedIn_args deepCopy() {
10152
      return new setUserAsLoggedIn_args(this);
48 ashish 10153
    }
10154
 
10155
    @Deprecated
553 chandransh 10156
    public setUserAsLoggedIn_args clone() {
10157
      return new setUserAsLoggedIn_args(this);
48 ashish 10158
    }
10159
 
553 chandransh 10160
    public long getUserId() {
10161
      return this.userId;
48 ashish 10162
    }
10163
 
553 chandransh 10164
    public setUserAsLoggedIn_args setUserId(long userId) {
10165
      this.userId = userId;
10166
      setUserIdIsSet(true);
48 ashish 10167
      return this;
10168
    }
10169
 
553 chandransh 10170
    public void unsetUserId() {
10171
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10172
    }
10173
 
553 chandransh 10174
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10175
    public boolean isSetUserId() {
10176
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10177
    }
10178
 
553 chandransh 10179
    public void setUserIdIsSet(boolean value) {
10180
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10181
    }
10182
 
10183
    public long getTimestamp() {
10184
      return this.timestamp;
10185
    }
10186
 
553 chandransh 10187
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10188
      this.timestamp = timestamp;
10189
      setTimestampIsSet(true);
10190
      return this;
10191
    }
10192
 
10193
    public void unsetTimestamp() {
10194
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10195
    }
10196
 
10197
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10198
    public boolean isSetTimestamp() {
10199
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10200
    }
10201
 
10202
    public void setTimestampIsSet(boolean value) {
10203
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10204
    }
10205
 
10206
    public void setFieldValue(_Fields field, Object value) {
10207
      switch (field) {
553 chandransh 10208
      case USER_ID:
48 ashish 10209
        if (value == null) {
553 chandransh 10210
          unsetUserId();
48 ashish 10211
        } else {
553 chandransh 10212
          setUserId((Long)value);
48 ashish 10213
        }
10214
        break;
10215
 
10216
      case TIMESTAMP:
10217
        if (value == null) {
10218
          unsetTimestamp();
10219
        } else {
10220
          setTimestamp((Long)value);
10221
        }
10222
        break;
10223
 
10224
      }
10225
    }
10226
 
10227
    public void setFieldValue(int fieldID, Object value) {
10228
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10229
    }
10230
 
10231
    public Object getFieldValue(_Fields field) {
10232
      switch (field) {
553 chandransh 10233
      case USER_ID:
10234
        return new Long(getUserId());
48 ashish 10235
 
10236
      case TIMESTAMP:
10237
        return new Long(getTimestamp());
10238
 
10239
      }
10240
      throw new IllegalStateException();
10241
    }
10242
 
10243
    public Object getFieldValue(int fieldId) {
10244
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10245
    }
10246
 
10247
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10248
    public boolean isSet(_Fields field) {
10249
      switch (field) {
553 chandransh 10250
      case USER_ID:
10251
        return isSetUserId();
48 ashish 10252
      case TIMESTAMP:
10253
        return isSetTimestamp();
10254
      }
10255
      throw new IllegalStateException();
10256
    }
10257
 
10258
    public boolean isSet(int fieldID) {
10259
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10260
    }
10261
 
10262
    @Override
10263
    public boolean equals(Object that) {
10264
      if (that == null)
10265
        return false;
553 chandransh 10266
      if (that instanceof setUserAsLoggedIn_args)
10267
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10268
      return false;
10269
    }
10270
 
553 chandransh 10271
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10272
      if (that == null)
10273
        return false;
10274
 
553 chandransh 10275
      boolean this_present_userId = true;
10276
      boolean that_present_userId = true;
10277
      if (this_present_userId || that_present_userId) {
10278
        if (!(this_present_userId && that_present_userId))
48 ashish 10279
          return false;
553 chandransh 10280
        if (this.userId != that.userId)
48 ashish 10281
          return false;
10282
      }
10283
 
10284
      boolean this_present_timestamp = true;
10285
      boolean that_present_timestamp = true;
10286
      if (this_present_timestamp || that_present_timestamp) {
10287
        if (!(this_present_timestamp && that_present_timestamp))
10288
          return false;
10289
        if (this.timestamp != that.timestamp)
10290
          return false;
10291
      }
10292
 
10293
      return true;
10294
    }
10295
 
10296
    @Override
10297
    public int hashCode() {
10298
      return 0;
10299
    }
10300
 
553 chandransh 10301
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10302
      if (!getClass().equals(other.getClass())) {
10303
        return getClass().getName().compareTo(other.getClass().getName());
10304
      }
10305
 
10306
      int lastComparison = 0;
553 chandransh 10307
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10308
 
553 chandransh 10309
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10310
      if (lastComparison != 0) {
10311
        return lastComparison;
10312
      }
553 chandransh 10313
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10314
      if (lastComparison != 0) {
10315
        return lastComparison;
10316
      }
10317
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10318
      if (lastComparison != 0) {
10319
        return lastComparison;
10320
      }
10321
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10322
      if (lastComparison != 0) {
10323
        return lastComparison;
10324
      }
10325
      return 0;
10326
    }
10327
 
10328
    public void read(TProtocol iprot) throws TException {
10329
      TField field;
10330
      iprot.readStructBegin();
10331
      while (true)
10332
      {
10333
        field = iprot.readFieldBegin();
10334
        if (field.type == TType.STOP) { 
10335
          break;
10336
        }
10337
        _Fields fieldId = _Fields.findByThriftId(field.id);
10338
        if (fieldId == null) {
10339
          TProtocolUtil.skip(iprot, field.type);
10340
        } else {
10341
          switch (fieldId) {
553 chandransh 10342
            case USER_ID:
10343
              if (field.type == TType.I64) {
10344
                this.userId = iprot.readI64();
10345
                setUserIdIsSet(true);
48 ashish 10346
              } else { 
10347
                TProtocolUtil.skip(iprot, field.type);
10348
              }
10349
              break;
10350
            case TIMESTAMP:
10351
              if (field.type == TType.I64) {
10352
                this.timestamp = iprot.readI64();
10353
                setTimestampIsSet(true);
10354
              } else { 
10355
                TProtocolUtil.skip(iprot, field.type);
10356
              }
10357
              break;
10358
          }
10359
          iprot.readFieldEnd();
10360
        }
10361
      }
10362
      iprot.readStructEnd();
10363
      validate();
10364
    }
10365
 
10366
    public void write(TProtocol oprot) throws TException {
10367
      validate();
10368
 
10369
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10370
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10371
      oprot.writeI64(this.userId);
10372
      oprot.writeFieldEnd();
48 ashish 10373
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10374
      oprot.writeI64(this.timestamp);
10375
      oprot.writeFieldEnd();
10376
      oprot.writeFieldStop();
10377
      oprot.writeStructEnd();
10378
    }
10379
 
10380
    @Override
10381
    public String toString() {
553 chandransh 10382
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10383
      boolean first = true;
10384
 
553 chandransh 10385
      sb.append("userId:");
10386
      sb.append(this.userId);
48 ashish 10387
      first = false;
10388
      if (!first) sb.append(", ");
10389
      sb.append("timestamp:");
10390
      sb.append(this.timestamp);
10391
      first = false;
10392
      sb.append(")");
10393
      return sb.toString();
10394
    }
10395
 
10396
    public void validate() throws TException {
10397
      // check for required fields
10398
    }
10399
 
10400
  }
10401
 
553 chandransh 10402
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10403
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10404
 
10405
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10406
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10407
 
10408
    private boolean success;
10409
    private UserContextException ucx;
10410
 
10411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10412
    public enum _Fields implements TFieldIdEnum {
10413
      SUCCESS((short)0, "success"),
10414
      UCX((short)1, "ucx");
10415
 
10416
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10417
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10418
 
10419
      static {
10420
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10421
          byId.put((int)field._thriftId, field);
10422
          byName.put(field.getFieldName(), field);
10423
        }
10424
      }
10425
 
10426
      /**
10427
       * Find the _Fields constant that matches fieldId, or null if its not found.
10428
       */
10429
      public static _Fields findByThriftId(int fieldId) {
10430
        return byId.get(fieldId);
10431
      }
10432
 
10433
      /**
10434
       * Find the _Fields constant that matches fieldId, throwing an exception
10435
       * if it is not found.
10436
       */
10437
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10438
        _Fields fields = findByThriftId(fieldId);
10439
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10440
        return fields;
10441
      }
10442
 
10443
      /**
10444
       * Find the _Fields constant that matches name, or null if its not found.
10445
       */
10446
      public static _Fields findByName(String name) {
10447
        return byName.get(name);
10448
      }
10449
 
10450
      private final short _thriftId;
10451
      private final String _fieldName;
10452
 
10453
      _Fields(short thriftId, String fieldName) {
10454
        _thriftId = thriftId;
10455
        _fieldName = fieldName;
10456
      }
10457
 
10458
      public short getThriftFieldId() {
10459
        return _thriftId;
10460
      }
10461
 
10462
      public String getFieldName() {
10463
        return _fieldName;
10464
      }
10465
    }
10466
 
10467
    // isset id assignments
10468
    private static final int __SUCCESS_ISSET_ID = 0;
10469
    private BitSet __isset_bit_vector = new BitSet(1);
10470
 
10471
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10472
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10473
          new FieldValueMetaData(TType.BOOL)));
10474
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10475
          new FieldValueMetaData(TType.STRUCT)));
10476
    }});
10477
 
10478
    static {
553 chandransh 10479
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10480
    }
10481
 
553 chandransh 10482
    public setUserAsLoggedIn_result() {
48 ashish 10483
    }
10484
 
553 chandransh 10485
    public setUserAsLoggedIn_result(
48 ashish 10486
      boolean success,
10487
      UserContextException ucx)
10488
    {
10489
      this();
10490
      this.success = success;
10491
      setSuccessIsSet(true);
10492
      this.ucx = ucx;
10493
    }
10494
 
10495
    /**
10496
     * Performs a deep copy on <i>other</i>.
10497
     */
553 chandransh 10498
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10499
      __isset_bit_vector.clear();
10500
      __isset_bit_vector.or(other.__isset_bit_vector);
10501
      this.success = other.success;
10502
      if (other.isSetUcx()) {
10503
        this.ucx = new UserContextException(other.ucx);
10504
      }
10505
    }
10506
 
553 chandransh 10507
    public setUserAsLoggedIn_result deepCopy() {
10508
      return new setUserAsLoggedIn_result(this);
48 ashish 10509
    }
10510
 
10511
    @Deprecated
553 chandransh 10512
    public setUserAsLoggedIn_result clone() {
10513
      return new setUserAsLoggedIn_result(this);
48 ashish 10514
    }
10515
 
10516
    public boolean isSuccess() {
10517
      return this.success;
10518
    }
10519
 
553 chandransh 10520
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10521
      this.success = success;
10522
      setSuccessIsSet(true);
10523
      return this;
10524
    }
10525
 
10526
    public void unsetSuccess() {
10527
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10528
    }
10529
 
10530
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10531
    public boolean isSetSuccess() {
10532
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10533
    }
10534
 
10535
    public void setSuccessIsSet(boolean value) {
10536
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10537
    }
10538
 
10539
    public UserContextException getUcx() {
10540
      return this.ucx;
10541
    }
10542
 
553 chandransh 10543
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10544
      this.ucx = ucx;
10545
      return this;
10546
    }
10547
 
10548
    public void unsetUcx() {
10549
      this.ucx = null;
10550
    }
10551
 
10552
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10553
    public boolean isSetUcx() {
10554
      return this.ucx != null;
10555
    }
10556
 
10557
    public void setUcxIsSet(boolean value) {
10558
      if (!value) {
10559
        this.ucx = null;
10560
      }
10561
    }
10562
 
10563
    public void setFieldValue(_Fields field, Object value) {
10564
      switch (field) {
10565
      case SUCCESS:
10566
        if (value == null) {
10567
          unsetSuccess();
10568
        } else {
10569
          setSuccess((Boolean)value);
10570
        }
10571
        break;
10572
 
10573
      case UCX:
10574
        if (value == null) {
10575
          unsetUcx();
10576
        } else {
10577
          setUcx((UserContextException)value);
10578
        }
10579
        break;
10580
 
10581
      }
10582
    }
10583
 
10584
    public void setFieldValue(int fieldID, Object value) {
10585
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10586
    }
10587
 
10588
    public Object getFieldValue(_Fields field) {
10589
      switch (field) {
10590
      case SUCCESS:
10591
        return new Boolean(isSuccess());
10592
 
10593
      case UCX:
10594
        return getUcx();
10595
 
10596
      }
10597
      throw new IllegalStateException();
10598
    }
10599
 
10600
    public Object getFieldValue(int fieldId) {
10601
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10602
    }
10603
 
10604
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10605
    public boolean isSet(_Fields field) {
10606
      switch (field) {
10607
      case SUCCESS:
10608
        return isSetSuccess();
10609
      case UCX:
10610
        return isSetUcx();
10611
      }
10612
      throw new IllegalStateException();
10613
    }
10614
 
10615
    public boolean isSet(int fieldID) {
10616
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10617
    }
10618
 
10619
    @Override
10620
    public boolean equals(Object that) {
10621
      if (that == null)
10622
        return false;
553 chandransh 10623
      if (that instanceof setUserAsLoggedIn_result)
10624
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10625
      return false;
10626
    }
10627
 
553 chandransh 10628
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10629
      if (that == null)
10630
        return false;
10631
 
10632
      boolean this_present_success = true;
10633
      boolean that_present_success = true;
10634
      if (this_present_success || that_present_success) {
10635
        if (!(this_present_success && that_present_success))
10636
          return false;
10637
        if (this.success != that.success)
10638
          return false;
10639
      }
10640
 
10641
      boolean this_present_ucx = true && this.isSetUcx();
10642
      boolean that_present_ucx = true && that.isSetUcx();
10643
      if (this_present_ucx || that_present_ucx) {
10644
        if (!(this_present_ucx && that_present_ucx))
10645
          return false;
10646
        if (!this.ucx.equals(that.ucx))
10647
          return false;
10648
      }
10649
 
10650
      return true;
10651
    }
10652
 
10653
    @Override
10654
    public int hashCode() {
10655
      return 0;
10656
    }
10657
 
553 chandransh 10658
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10659
      if (!getClass().equals(other.getClass())) {
10660
        return getClass().getName().compareTo(other.getClass().getName());
10661
      }
10662
 
10663
      int lastComparison = 0;
553 chandransh 10664
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10665
 
10666
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10667
      if (lastComparison != 0) {
10668
        return lastComparison;
10669
      }
10670
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10671
      if (lastComparison != 0) {
10672
        return lastComparison;
10673
      }
10674
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10675
      if (lastComparison != 0) {
10676
        return lastComparison;
10677
      }
10678
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10679
      if (lastComparison != 0) {
10680
        return lastComparison;
10681
      }
10682
      return 0;
10683
    }
10684
 
10685
    public void read(TProtocol iprot) throws TException {
10686
      TField field;
10687
      iprot.readStructBegin();
10688
      while (true)
10689
      {
10690
        field = iprot.readFieldBegin();
10691
        if (field.type == TType.STOP) { 
10692
          break;
10693
        }
10694
        _Fields fieldId = _Fields.findByThriftId(field.id);
10695
        if (fieldId == null) {
10696
          TProtocolUtil.skip(iprot, field.type);
10697
        } else {
10698
          switch (fieldId) {
10699
            case SUCCESS:
10700
              if (field.type == TType.BOOL) {
10701
                this.success = iprot.readBool();
10702
                setSuccessIsSet(true);
10703
              } else { 
10704
                TProtocolUtil.skip(iprot, field.type);
10705
              }
10706
              break;
10707
            case UCX:
10708
              if (field.type == TType.STRUCT) {
10709
                this.ucx = new UserContextException();
10710
                this.ucx.read(iprot);
10711
              } else { 
10712
                TProtocolUtil.skip(iprot, field.type);
10713
              }
10714
              break;
10715
          }
10716
          iprot.readFieldEnd();
10717
        }
10718
      }
10719
      iprot.readStructEnd();
10720
      validate();
10721
    }
10722
 
10723
    public void write(TProtocol oprot) throws TException {
10724
      oprot.writeStructBegin(STRUCT_DESC);
10725
 
10726
      if (this.isSetSuccess()) {
10727
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10728
        oprot.writeBool(this.success);
10729
        oprot.writeFieldEnd();
10730
      } else if (this.isSetUcx()) {
10731
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10732
        this.ucx.write(oprot);
10733
        oprot.writeFieldEnd();
10734
      }
10735
      oprot.writeFieldStop();
10736
      oprot.writeStructEnd();
10737
    }
10738
 
10739
    @Override
10740
    public String toString() {
553 chandransh 10741
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10742
      boolean first = true;
10743
 
10744
      sb.append("success:");
10745
      sb.append(this.success);
10746
      first = false;
10747
      if (!first) sb.append(", ");
10748
      sb.append("ucx:");
10749
      if (this.ucx == null) {
10750
        sb.append("null");
10751
      } else {
10752
        sb.append(this.ucx);
10753
      }
10754
      first = false;
10755
      sb.append(")");
10756
      return sb.toString();
10757
    }
10758
 
10759
    public void validate() throws TException {
10760
      // check for required fields
10761
    }
10762
 
10763
  }
10764
 
553 chandransh 10765
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10766
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10767
 
553 chandransh 10768
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10769
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10770
 
10771
    private long userid;
10772
    private long timestamp;
10773
 
10774
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10775
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10776
      USERID((short)1, "userid"),
10777
      TIMESTAMP((short)2, "timestamp");
48 ashish 10778
 
10779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10781
 
10782
      static {
10783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10784
          byId.put((int)field._thriftId, field);
10785
          byName.put(field.getFieldName(), field);
10786
        }
10787
      }
10788
 
10789
      /**
10790
       * Find the _Fields constant that matches fieldId, or null if its not found.
10791
       */
10792
      public static _Fields findByThriftId(int fieldId) {
10793
        return byId.get(fieldId);
10794
      }
10795
 
10796
      /**
10797
       * Find the _Fields constant that matches fieldId, throwing an exception
10798
       * if it is not found.
10799
       */
10800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10801
        _Fields fields = findByThriftId(fieldId);
10802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10803
        return fields;
10804
      }
10805
 
10806
      /**
10807
       * Find the _Fields constant that matches name, or null if its not found.
10808
       */
10809
      public static _Fields findByName(String name) {
10810
        return byName.get(name);
10811
      }
10812
 
10813
      private final short _thriftId;
10814
      private final String _fieldName;
10815
 
10816
      _Fields(short thriftId, String fieldName) {
10817
        _thriftId = thriftId;
10818
        _fieldName = fieldName;
10819
      }
10820
 
10821
      public short getThriftFieldId() {
10822
        return _thriftId;
10823
      }
10824
 
10825
      public String getFieldName() {
10826
        return _fieldName;
10827
      }
10828
    }
10829
 
10830
    // isset id assignments
10831
    private static final int __USERID_ISSET_ID = 0;
10832
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10833
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10834
 
10835
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10836
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10837
          new FieldValueMetaData(TType.I64)));
10838
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10839
          new FieldValueMetaData(TType.I64)));
10840
    }});
10841
 
10842
    static {
553 chandransh 10843
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10844
    }
10845
 
553 chandransh 10846
    public setUserAsLoggedOut_args() {
48 ashish 10847
    }
10848
 
553 chandransh 10849
    public setUserAsLoggedOut_args(
48 ashish 10850
      long userid,
553 chandransh 10851
      long timestamp)
48 ashish 10852
    {
10853
      this();
10854
      this.userid = userid;
10855
      setUseridIsSet(true);
10856
      this.timestamp = timestamp;
10857
      setTimestampIsSet(true);
10858
    }
10859
 
10860
    /**
10861
     * Performs a deep copy on <i>other</i>.
10862
     */
553 chandransh 10863
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10864
      __isset_bit_vector.clear();
10865
      __isset_bit_vector.or(other.__isset_bit_vector);
10866
      this.userid = other.userid;
10867
      this.timestamp = other.timestamp;
10868
    }
10869
 
553 chandransh 10870
    public setUserAsLoggedOut_args deepCopy() {
10871
      return new setUserAsLoggedOut_args(this);
48 ashish 10872
    }
10873
 
10874
    @Deprecated
553 chandransh 10875
    public setUserAsLoggedOut_args clone() {
10876
      return new setUserAsLoggedOut_args(this);
48 ashish 10877
    }
10878
 
10879
    public long getUserid() {
10880
      return this.userid;
10881
    }
10882
 
553 chandransh 10883
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10884
      this.userid = userid;
10885
      setUseridIsSet(true);
10886
      return this;
10887
    }
10888
 
10889
    public void unsetUserid() {
10890
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10891
    }
10892
 
10893
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10894
    public boolean isSetUserid() {
10895
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10896
    }
10897
 
10898
    public void setUseridIsSet(boolean value) {
10899
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10900
    }
10901
 
10902
    public long getTimestamp() {
10903
      return this.timestamp;
10904
    }
10905
 
553 chandransh 10906
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10907
      this.timestamp = timestamp;
10908
      setTimestampIsSet(true);
10909
      return this;
10910
    }
10911
 
10912
    public void unsetTimestamp() {
10913
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10914
    }
10915
 
10916
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10917
    public boolean isSetTimestamp() {
10918
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10919
    }
10920
 
10921
    public void setTimestampIsSet(boolean value) {
10922
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10923
    }
10924
 
10925
    public void setFieldValue(_Fields field, Object value) {
10926
      switch (field) {
10927
      case USERID:
10928
        if (value == null) {
10929
          unsetUserid();
10930
        } else {
10931
          setUserid((Long)value);
10932
        }
10933
        break;
10934
 
10935
      case TIMESTAMP:
10936
        if (value == null) {
10937
          unsetTimestamp();
10938
        } else {
10939
          setTimestamp((Long)value);
10940
        }
10941
        break;
10942
 
10943
      }
10944
    }
10945
 
10946
    public void setFieldValue(int fieldID, Object value) {
10947
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10948
    }
10949
 
10950
    public Object getFieldValue(_Fields field) {
10951
      switch (field) {
10952
      case USERID:
10953
        return new Long(getUserid());
10954
 
10955
      case TIMESTAMP:
10956
        return new Long(getTimestamp());
10957
 
10958
      }
10959
      throw new IllegalStateException();
10960
    }
10961
 
10962
    public Object getFieldValue(int fieldId) {
10963
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10964
    }
10965
 
10966
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10967
    public boolean isSet(_Fields field) {
10968
      switch (field) {
10969
      case USERID:
10970
        return isSetUserid();
10971
      case TIMESTAMP:
10972
        return isSetTimestamp();
10973
      }
10974
      throw new IllegalStateException();
10975
    }
10976
 
10977
    public boolean isSet(int fieldID) {
10978
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10979
    }
10980
 
10981
    @Override
10982
    public boolean equals(Object that) {
10983
      if (that == null)
10984
        return false;
553 chandransh 10985
      if (that instanceof setUserAsLoggedOut_args)
10986
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10987
      return false;
10988
    }
10989
 
553 chandransh 10990
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10991
      if (that == null)
10992
        return false;
10993
 
10994
      boolean this_present_userid = true;
10995
      boolean that_present_userid = true;
10996
      if (this_present_userid || that_present_userid) {
10997
        if (!(this_present_userid && that_present_userid))
10998
          return false;
10999
        if (this.userid != that.userid)
11000
          return false;
11001
      }
11002
 
11003
      boolean this_present_timestamp = true;
11004
      boolean that_present_timestamp = true;
11005
      if (this_present_timestamp || that_present_timestamp) {
11006
        if (!(this_present_timestamp && that_present_timestamp))
11007
          return false;
11008
        if (this.timestamp != that.timestamp)
11009
          return false;
11010
      }
11011
 
11012
      return true;
11013
    }
11014
 
11015
    @Override
11016
    public int hashCode() {
11017
      return 0;
11018
    }
11019
 
553 chandransh 11020
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 11021
      if (!getClass().equals(other.getClass())) {
11022
        return getClass().getName().compareTo(other.getClass().getName());
11023
      }
11024
 
11025
      int lastComparison = 0;
553 chandransh 11026
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 11027
 
11028
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11029
      if (lastComparison != 0) {
11030
        return lastComparison;
11031
      }
11032
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11033
      if (lastComparison != 0) {
11034
        return lastComparison;
11035
      }
11036
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11037
      if (lastComparison != 0) {
11038
        return lastComparison;
11039
      }
11040
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11041
      if (lastComparison != 0) {
11042
        return lastComparison;
11043
      }
11044
      return 0;
11045
    }
11046
 
11047
    public void read(TProtocol iprot) throws TException {
11048
      TField field;
11049
      iprot.readStructBegin();
11050
      while (true)
11051
      {
11052
        field = iprot.readFieldBegin();
11053
        if (field.type == TType.STOP) { 
11054
          break;
11055
        }
11056
        _Fields fieldId = _Fields.findByThriftId(field.id);
11057
        if (fieldId == null) {
11058
          TProtocolUtil.skip(iprot, field.type);
11059
        } else {
11060
          switch (fieldId) {
11061
            case USERID:
11062
              if (field.type == TType.I64) {
11063
                this.userid = iprot.readI64();
11064
                setUseridIsSet(true);
11065
              } else { 
11066
                TProtocolUtil.skip(iprot, field.type);
11067
              }
11068
              break;
11069
            case TIMESTAMP:
11070
              if (field.type == TType.I64) {
11071
                this.timestamp = iprot.readI64();
11072
                setTimestampIsSet(true);
11073
              } else { 
11074
                TProtocolUtil.skip(iprot, field.type);
11075
              }
11076
              break;
11077
          }
11078
          iprot.readFieldEnd();
11079
        }
11080
      }
11081
      iprot.readStructEnd();
11082
      validate();
11083
    }
11084
 
11085
    public void write(TProtocol oprot) throws TException {
11086
      validate();
11087
 
11088
      oprot.writeStructBegin(STRUCT_DESC);
11089
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11090
      oprot.writeI64(this.userid);
11091
      oprot.writeFieldEnd();
11092
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11093
      oprot.writeI64(this.timestamp);
11094
      oprot.writeFieldEnd();
11095
      oprot.writeFieldStop();
11096
      oprot.writeStructEnd();
11097
    }
11098
 
11099
    @Override
11100
    public String toString() {
553 chandransh 11101
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11102
      boolean first = true;
11103
 
11104
      sb.append("userid:");
11105
      sb.append(this.userid);
11106
      first = false;
11107
      if (!first) sb.append(", ");
11108
      sb.append("timestamp:");
11109
      sb.append(this.timestamp);
11110
      first = false;
11111
      sb.append(")");
11112
      return sb.toString();
11113
    }
11114
 
11115
    public void validate() throws TException {
11116
      // check for required fields
11117
    }
11118
 
11119
  }
11120
 
553 chandransh 11121
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11122
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11123
 
11124
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11125
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11126
 
11127
    private boolean success;
11128
    private UserContextException ucx;
11129
 
11130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11131
    public enum _Fields implements TFieldIdEnum {
11132
      SUCCESS((short)0, "success"),
11133
      UCX((short)1, "ucx");
11134
 
11135
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11137
 
11138
      static {
11139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11140
          byId.put((int)field._thriftId, field);
11141
          byName.put(field.getFieldName(), field);
11142
        }
11143
      }
11144
 
11145
      /**
11146
       * Find the _Fields constant that matches fieldId, or null if its not found.
11147
       */
11148
      public static _Fields findByThriftId(int fieldId) {
11149
        return byId.get(fieldId);
11150
      }
11151
 
11152
      /**
11153
       * Find the _Fields constant that matches fieldId, throwing an exception
11154
       * if it is not found.
11155
       */
11156
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11157
        _Fields fields = findByThriftId(fieldId);
11158
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11159
        return fields;
11160
      }
11161
 
11162
      /**
11163
       * Find the _Fields constant that matches name, or null if its not found.
11164
       */
11165
      public static _Fields findByName(String name) {
11166
        return byName.get(name);
11167
      }
11168
 
11169
      private final short _thriftId;
11170
      private final String _fieldName;
11171
 
11172
      _Fields(short thriftId, String fieldName) {
11173
        _thriftId = thriftId;
11174
        _fieldName = fieldName;
11175
      }
11176
 
11177
      public short getThriftFieldId() {
11178
        return _thriftId;
11179
      }
11180
 
11181
      public String getFieldName() {
11182
        return _fieldName;
11183
      }
11184
    }
11185
 
11186
    // isset id assignments
11187
    private static final int __SUCCESS_ISSET_ID = 0;
11188
    private BitSet __isset_bit_vector = new BitSet(1);
11189
 
11190
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11191
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11192
          new FieldValueMetaData(TType.BOOL)));
11193
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11194
          new FieldValueMetaData(TType.STRUCT)));
11195
    }});
11196
 
11197
    static {
553 chandransh 11198
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11199
    }
11200
 
553 chandransh 11201
    public setUserAsLoggedOut_result() {
48 ashish 11202
    }
11203
 
553 chandransh 11204
    public setUserAsLoggedOut_result(
48 ashish 11205
      boolean success,
11206
      UserContextException ucx)
11207
    {
11208
      this();
11209
      this.success = success;
11210
      setSuccessIsSet(true);
11211
      this.ucx = ucx;
11212
    }
11213
 
11214
    /**
11215
     * Performs a deep copy on <i>other</i>.
11216
     */
553 chandransh 11217
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11218
      __isset_bit_vector.clear();
11219
      __isset_bit_vector.or(other.__isset_bit_vector);
11220
      this.success = other.success;
11221
      if (other.isSetUcx()) {
11222
        this.ucx = new UserContextException(other.ucx);
11223
      }
11224
    }
11225
 
553 chandransh 11226
    public setUserAsLoggedOut_result deepCopy() {
11227
      return new setUserAsLoggedOut_result(this);
48 ashish 11228
    }
11229
 
11230
    @Deprecated
553 chandransh 11231
    public setUserAsLoggedOut_result clone() {
11232
      return new setUserAsLoggedOut_result(this);
48 ashish 11233
    }
11234
 
11235
    public boolean isSuccess() {
11236
      return this.success;
11237
    }
11238
 
553 chandransh 11239
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11240
      this.success = success;
11241
      setSuccessIsSet(true);
11242
      return this;
11243
    }
11244
 
11245
    public void unsetSuccess() {
11246
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11247
    }
11248
 
11249
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11250
    public boolean isSetSuccess() {
11251
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11252
    }
11253
 
11254
    public void setSuccessIsSet(boolean value) {
11255
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11256
    }
11257
 
11258
    public UserContextException getUcx() {
11259
      return this.ucx;
11260
    }
11261
 
553 chandransh 11262
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11263
      this.ucx = ucx;
11264
      return this;
11265
    }
11266
 
11267
    public void unsetUcx() {
11268
      this.ucx = null;
11269
    }
11270
 
11271
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11272
    public boolean isSetUcx() {
11273
      return this.ucx != null;
11274
    }
11275
 
11276
    public void setUcxIsSet(boolean value) {
11277
      if (!value) {
11278
        this.ucx = null;
11279
      }
11280
    }
11281
 
11282
    public void setFieldValue(_Fields field, Object value) {
11283
      switch (field) {
11284
      case SUCCESS:
11285
        if (value == null) {
11286
          unsetSuccess();
11287
        } else {
11288
          setSuccess((Boolean)value);
11289
        }
11290
        break;
11291
 
11292
      case UCX:
11293
        if (value == null) {
11294
          unsetUcx();
11295
        } else {
11296
          setUcx((UserContextException)value);
11297
        }
11298
        break;
11299
 
11300
      }
11301
    }
11302
 
11303
    public void setFieldValue(int fieldID, Object value) {
11304
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11305
    }
11306
 
11307
    public Object getFieldValue(_Fields field) {
11308
      switch (field) {
11309
      case SUCCESS:
11310
        return new Boolean(isSuccess());
11311
 
11312
      case UCX:
11313
        return getUcx();
11314
 
11315
      }
11316
      throw new IllegalStateException();
11317
    }
11318
 
11319
    public Object getFieldValue(int fieldId) {
11320
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11321
    }
11322
 
11323
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11324
    public boolean isSet(_Fields field) {
11325
      switch (field) {
11326
      case SUCCESS:
11327
        return isSetSuccess();
11328
      case UCX:
11329
        return isSetUcx();
11330
      }
11331
      throw new IllegalStateException();
11332
    }
11333
 
11334
    public boolean isSet(int fieldID) {
11335
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11336
    }
11337
 
11338
    @Override
11339
    public boolean equals(Object that) {
11340
      if (that == null)
11341
        return false;
553 chandransh 11342
      if (that instanceof setUserAsLoggedOut_result)
11343
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11344
      return false;
11345
    }
11346
 
553 chandransh 11347
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11348
      if (that == null)
11349
        return false;
11350
 
11351
      boolean this_present_success = true;
11352
      boolean that_present_success = true;
11353
      if (this_present_success || that_present_success) {
11354
        if (!(this_present_success && that_present_success))
11355
          return false;
11356
        if (this.success != that.success)
11357
          return false;
11358
      }
11359
 
11360
      boolean this_present_ucx = true && this.isSetUcx();
11361
      boolean that_present_ucx = true && that.isSetUcx();
11362
      if (this_present_ucx || that_present_ucx) {
11363
        if (!(this_present_ucx && that_present_ucx))
11364
          return false;
11365
        if (!this.ucx.equals(that.ucx))
11366
          return false;
11367
      }
11368
 
11369
      return true;
11370
    }
11371
 
11372
    @Override
11373
    public int hashCode() {
11374
      return 0;
11375
    }
11376
 
553 chandransh 11377
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11378
      if (!getClass().equals(other.getClass())) {
11379
        return getClass().getName().compareTo(other.getClass().getName());
11380
      }
11381
 
11382
      int lastComparison = 0;
553 chandransh 11383
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11384
 
11385
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11386
      if (lastComparison != 0) {
11387
        return lastComparison;
11388
      }
11389
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11390
      if (lastComparison != 0) {
11391
        return lastComparison;
11392
      }
11393
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11394
      if (lastComparison != 0) {
11395
        return lastComparison;
11396
      }
11397
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11398
      if (lastComparison != 0) {
11399
        return lastComparison;
11400
      }
11401
      return 0;
11402
    }
11403
 
11404
    public void read(TProtocol iprot) throws TException {
11405
      TField field;
11406
      iprot.readStructBegin();
11407
      while (true)
11408
      {
11409
        field = iprot.readFieldBegin();
11410
        if (field.type == TType.STOP) { 
11411
          break;
11412
        }
11413
        _Fields fieldId = _Fields.findByThriftId(field.id);
11414
        if (fieldId == null) {
11415
          TProtocolUtil.skip(iprot, field.type);
11416
        } else {
11417
          switch (fieldId) {
11418
            case SUCCESS:
11419
              if (field.type == TType.BOOL) {
11420
                this.success = iprot.readBool();
11421
                setSuccessIsSet(true);
11422
              } else { 
11423
                TProtocolUtil.skip(iprot, field.type);
11424
              }
11425
              break;
11426
            case UCX:
11427
              if (field.type == TType.STRUCT) {
11428
                this.ucx = new UserContextException();
11429
                this.ucx.read(iprot);
11430
              } else { 
11431
                TProtocolUtil.skip(iprot, field.type);
11432
              }
11433
              break;
11434
          }
11435
          iprot.readFieldEnd();
11436
        }
11437
      }
11438
      iprot.readStructEnd();
11439
      validate();
11440
    }
11441
 
11442
    public void write(TProtocol oprot) throws TException {
11443
      oprot.writeStructBegin(STRUCT_DESC);
11444
 
11445
      if (this.isSetSuccess()) {
11446
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11447
        oprot.writeBool(this.success);
11448
        oprot.writeFieldEnd();
11449
      } else if (this.isSetUcx()) {
11450
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11451
        this.ucx.write(oprot);
11452
        oprot.writeFieldEnd();
11453
      }
11454
      oprot.writeFieldStop();
11455
      oprot.writeStructEnd();
11456
    }
11457
 
11458
    @Override
11459
    public String toString() {
553 chandransh 11460
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11461
      boolean first = true;
11462
 
11463
      sb.append("success:");
11464
      sb.append(this.success);
11465
      first = false;
11466
      if (!first) sb.append(", ");
11467
      sb.append("ucx:");
11468
      if (this.ucx == null) {
11469
        sb.append("null");
11470
      } else {
11471
        sb.append(this.ucx);
11472
      }
11473
      first = false;
11474
      sb.append(")");
11475
      return sb.toString();
11476
    }
11477
 
11478
    public void validate() throws TException {
11479
      // check for required fields
11480
    }
11481
 
11482
  }
11483
 
553 chandransh 11484
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11485
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11486
 
11487
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11488
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11489
 
11490
    private long userid;
11491
    private long addressId;
11492
 
11493
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11494
    public enum _Fields implements TFieldIdEnum {
11495
      USERID((short)1, "userid"),
11496
      ADDRESS_ID((short)2, "addressId");
11497
 
11498
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11499
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11500
 
11501
      static {
11502
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11503
          byId.put((int)field._thriftId, field);
11504
          byName.put(field.getFieldName(), field);
11505
        }
11506
      }
11507
 
11508
      /**
11509
       * Find the _Fields constant that matches fieldId, or null if its not found.
11510
       */
11511
      public static _Fields findByThriftId(int fieldId) {
11512
        return byId.get(fieldId);
11513
      }
11514
 
11515
      /**
11516
       * Find the _Fields constant that matches fieldId, throwing an exception
11517
       * if it is not found.
11518
       */
11519
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11520
        _Fields fields = findByThriftId(fieldId);
11521
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11522
        return fields;
11523
      }
11524
 
11525
      /**
11526
       * Find the _Fields constant that matches name, or null if its not found.
11527
       */
11528
      public static _Fields findByName(String name) {
11529
        return byName.get(name);
11530
      }
11531
 
11532
      private final short _thriftId;
11533
      private final String _fieldName;
11534
 
11535
      _Fields(short thriftId, String fieldName) {
11536
        _thriftId = thriftId;
11537
        _fieldName = fieldName;
11538
      }
11539
 
11540
      public short getThriftFieldId() {
11541
        return _thriftId;
11542
      }
11543
 
11544
      public String getFieldName() {
11545
        return _fieldName;
11546
      }
11547
    }
11548
 
11549
    // isset id assignments
11550
    private static final int __USERID_ISSET_ID = 0;
11551
    private static final int __ADDRESSID_ISSET_ID = 1;
11552
    private BitSet __isset_bit_vector = new BitSet(2);
11553
 
11554
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11555
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11556
          new FieldValueMetaData(TType.I64)));
11557
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11558
          new FieldValueMetaData(TType.I64)));
11559
    }});
11560
 
11561
    static {
553 chandransh 11562
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11563
    }
11564
 
553 chandransh 11565
    public setDefaultAddress_args() {
48 ashish 11566
    }
11567
 
553 chandransh 11568
    public setDefaultAddress_args(
48 ashish 11569
      long userid,
11570
      long addressId)
11571
    {
11572
      this();
11573
      this.userid = userid;
11574
      setUseridIsSet(true);
11575
      this.addressId = addressId;
11576
      setAddressIdIsSet(true);
11577
    }
11578
 
11579
    /**
11580
     * Performs a deep copy on <i>other</i>.
11581
     */
553 chandransh 11582
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11583
      __isset_bit_vector.clear();
11584
      __isset_bit_vector.or(other.__isset_bit_vector);
11585
      this.userid = other.userid;
11586
      this.addressId = other.addressId;
11587
    }
11588
 
553 chandransh 11589
    public setDefaultAddress_args deepCopy() {
11590
      return new setDefaultAddress_args(this);
48 ashish 11591
    }
11592
 
11593
    @Deprecated
553 chandransh 11594
    public setDefaultAddress_args clone() {
11595
      return new setDefaultAddress_args(this);
48 ashish 11596
    }
11597
 
11598
    public long getUserid() {
11599
      return this.userid;
11600
    }
11601
 
553 chandransh 11602
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11603
      this.userid = userid;
11604
      setUseridIsSet(true);
11605
      return this;
11606
    }
11607
 
11608
    public void unsetUserid() {
11609
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11610
    }
11611
 
11612
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11613
    public boolean isSetUserid() {
11614
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11615
    }
11616
 
11617
    public void setUseridIsSet(boolean value) {
11618
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11619
    }
11620
 
11621
    public long getAddressId() {
11622
      return this.addressId;
11623
    }
11624
 
553 chandransh 11625
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11626
      this.addressId = addressId;
11627
      setAddressIdIsSet(true);
11628
      return this;
11629
    }
11630
 
11631
    public void unsetAddressId() {
11632
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11633
    }
11634
 
11635
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11636
    public boolean isSetAddressId() {
11637
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11638
    }
11639
 
11640
    public void setAddressIdIsSet(boolean value) {
11641
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11642
    }
11643
 
11644
    public void setFieldValue(_Fields field, Object value) {
11645
      switch (field) {
11646
      case USERID:
11647
        if (value == null) {
11648
          unsetUserid();
11649
        } else {
11650
          setUserid((Long)value);
11651
        }
11652
        break;
11653
 
11654
      case ADDRESS_ID:
11655
        if (value == null) {
11656
          unsetAddressId();
11657
        } else {
11658
          setAddressId((Long)value);
11659
        }
11660
        break;
11661
 
11662
      }
11663
    }
11664
 
11665
    public void setFieldValue(int fieldID, Object value) {
11666
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11667
    }
11668
 
11669
    public Object getFieldValue(_Fields field) {
11670
      switch (field) {
11671
      case USERID:
11672
        return new Long(getUserid());
11673
 
11674
      case ADDRESS_ID:
11675
        return new Long(getAddressId());
11676
 
11677
      }
11678
      throw new IllegalStateException();
11679
    }
11680
 
11681
    public Object getFieldValue(int fieldId) {
11682
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11683
    }
11684
 
11685
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11686
    public boolean isSet(_Fields field) {
11687
      switch (field) {
11688
      case USERID:
11689
        return isSetUserid();
11690
      case ADDRESS_ID:
11691
        return isSetAddressId();
11692
      }
11693
      throw new IllegalStateException();
11694
    }
11695
 
11696
    public boolean isSet(int fieldID) {
11697
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11698
    }
11699
 
11700
    @Override
11701
    public boolean equals(Object that) {
11702
      if (that == null)
11703
        return false;
553 chandransh 11704
      if (that instanceof setDefaultAddress_args)
11705
        return this.equals((setDefaultAddress_args)that);
48 ashish 11706
      return false;
11707
    }
11708
 
553 chandransh 11709
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11710
      if (that == null)
11711
        return false;
11712
 
11713
      boolean this_present_userid = true;
11714
      boolean that_present_userid = true;
11715
      if (this_present_userid || that_present_userid) {
11716
        if (!(this_present_userid && that_present_userid))
11717
          return false;
11718
        if (this.userid != that.userid)
11719
          return false;
11720
      }
11721
 
11722
      boolean this_present_addressId = true;
11723
      boolean that_present_addressId = true;
11724
      if (this_present_addressId || that_present_addressId) {
11725
        if (!(this_present_addressId && that_present_addressId))
11726
          return false;
11727
        if (this.addressId != that.addressId)
11728
          return false;
11729
      }
11730
 
11731
      return true;
11732
    }
11733
 
11734
    @Override
11735
    public int hashCode() {
11736
      return 0;
11737
    }
11738
 
553 chandransh 11739
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11740
      if (!getClass().equals(other.getClass())) {
11741
        return getClass().getName().compareTo(other.getClass().getName());
11742
      }
11743
 
11744
      int lastComparison = 0;
553 chandransh 11745
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11746
 
11747
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11748
      if (lastComparison != 0) {
11749
        return lastComparison;
11750
      }
11751
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11752
      if (lastComparison != 0) {
11753
        return lastComparison;
11754
      }
11755
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11756
      if (lastComparison != 0) {
11757
        return lastComparison;
11758
      }
11759
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11760
      if (lastComparison != 0) {
11761
        return lastComparison;
11762
      }
11763
      return 0;
11764
    }
11765
 
11766
    public void read(TProtocol iprot) throws TException {
11767
      TField field;
11768
      iprot.readStructBegin();
11769
      while (true)
11770
      {
11771
        field = iprot.readFieldBegin();
11772
        if (field.type == TType.STOP) { 
11773
          break;
11774
        }
11775
        _Fields fieldId = _Fields.findByThriftId(field.id);
11776
        if (fieldId == null) {
11777
          TProtocolUtil.skip(iprot, field.type);
11778
        } else {
11779
          switch (fieldId) {
11780
            case USERID:
11781
              if (field.type == TType.I64) {
11782
                this.userid = iprot.readI64();
11783
                setUseridIsSet(true);
11784
              } else { 
11785
                TProtocolUtil.skip(iprot, field.type);
11786
              }
11787
              break;
11788
            case ADDRESS_ID:
11789
              if (field.type == TType.I64) {
11790
                this.addressId = iprot.readI64();
11791
                setAddressIdIsSet(true);
11792
              } else { 
11793
                TProtocolUtil.skip(iprot, field.type);
11794
              }
11795
              break;
11796
          }
11797
          iprot.readFieldEnd();
11798
        }
11799
      }
11800
      iprot.readStructEnd();
11801
      validate();
11802
    }
11803
 
11804
    public void write(TProtocol oprot) throws TException {
11805
      validate();
11806
 
11807
      oprot.writeStructBegin(STRUCT_DESC);
11808
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11809
      oprot.writeI64(this.userid);
11810
      oprot.writeFieldEnd();
11811
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11812
      oprot.writeI64(this.addressId);
11813
      oprot.writeFieldEnd();
11814
      oprot.writeFieldStop();
11815
      oprot.writeStructEnd();
11816
    }
11817
 
11818
    @Override
11819
    public String toString() {
553 chandransh 11820
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11821
      boolean first = true;
11822
 
11823
      sb.append("userid:");
11824
      sb.append(this.userid);
11825
      first = false;
11826
      if (!first) sb.append(", ");
11827
      sb.append("addressId:");
11828
      sb.append(this.addressId);
11829
      first = false;
11830
      sb.append(")");
11831
      return sb.toString();
11832
    }
11833
 
11834
    public void validate() throws TException {
11835
      // check for required fields
11836
    }
11837
 
11838
  }
11839
 
553 chandransh 11840
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11841
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11842
 
11843
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11844
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11845
 
11846
    private boolean success;
11847
    private UserContextException ucx;
11848
 
11849
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11850
    public enum _Fields implements TFieldIdEnum {
11851
      SUCCESS((short)0, "success"),
11852
      UCX((short)1, "ucx");
11853
 
11854
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11855
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11856
 
11857
      static {
11858
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11859
          byId.put((int)field._thriftId, field);
11860
          byName.put(field.getFieldName(), field);
11861
        }
11862
      }
11863
 
11864
      /**
11865
       * Find the _Fields constant that matches fieldId, or null if its not found.
11866
       */
11867
      public static _Fields findByThriftId(int fieldId) {
11868
        return byId.get(fieldId);
11869
      }
11870
 
11871
      /**
11872
       * Find the _Fields constant that matches fieldId, throwing an exception
11873
       * if it is not found.
11874
       */
11875
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11876
        _Fields fields = findByThriftId(fieldId);
11877
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11878
        return fields;
11879
      }
11880
 
11881
      /**
11882
       * Find the _Fields constant that matches name, or null if its not found.
11883
       */
11884
      public static _Fields findByName(String name) {
11885
        return byName.get(name);
11886
      }
11887
 
11888
      private final short _thriftId;
11889
      private final String _fieldName;
11890
 
11891
      _Fields(short thriftId, String fieldName) {
11892
        _thriftId = thriftId;
11893
        _fieldName = fieldName;
11894
      }
11895
 
11896
      public short getThriftFieldId() {
11897
        return _thriftId;
11898
      }
11899
 
11900
      public String getFieldName() {
11901
        return _fieldName;
11902
      }
11903
    }
11904
 
11905
    // isset id assignments
11906
    private static final int __SUCCESS_ISSET_ID = 0;
11907
    private BitSet __isset_bit_vector = new BitSet(1);
11908
 
11909
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11910
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11911
          new FieldValueMetaData(TType.BOOL)));
11912
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11913
          new FieldValueMetaData(TType.STRUCT)));
11914
    }});
11915
 
11916
    static {
553 chandransh 11917
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11918
    }
11919
 
553 chandransh 11920
    public setDefaultAddress_result() {
48 ashish 11921
    }
11922
 
553 chandransh 11923
    public setDefaultAddress_result(
48 ashish 11924
      boolean success,
11925
      UserContextException ucx)
11926
    {
11927
      this();
11928
      this.success = success;
11929
      setSuccessIsSet(true);
11930
      this.ucx = ucx;
11931
    }
11932
 
11933
    /**
11934
     * Performs a deep copy on <i>other</i>.
11935
     */
553 chandransh 11936
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11937
      __isset_bit_vector.clear();
11938
      __isset_bit_vector.or(other.__isset_bit_vector);
11939
      this.success = other.success;
11940
      if (other.isSetUcx()) {
11941
        this.ucx = new UserContextException(other.ucx);
11942
      }
11943
    }
11944
 
553 chandransh 11945
    public setDefaultAddress_result deepCopy() {
11946
      return new setDefaultAddress_result(this);
48 ashish 11947
    }
11948
 
11949
    @Deprecated
553 chandransh 11950
    public setDefaultAddress_result clone() {
11951
      return new setDefaultAddress_result(this);
48 ashish 11952
    }
11953
 
11954
    public boolean isSuccess() {
11955
      return this.success;
11956
    }
11957
 
553 chandransh 11958
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11959
      this.success = success;
11960
      setSuccessIsSet(true);
11961
      return this;
11962
    }
11963
 
11964
    public void unsetSuccess() {
11965
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11966
    }
11967
 
11968
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11969
    public boolean isSetSuccess() {
11970
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11971
    }
11972
 
11973
    public void setSuccessIsSet(boolean value) {
11974
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11975
    }
11976
 
11977
    public UserContextException getUcx() {
11978
      return this.ucx;
11979
    }
11980
 
553 chandransh 11981
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11982
      this.ucx = ucx;
11983
      return this;
11984
    }
11985
 
11986
    public void unsetUcx() {
11987
      this.ucx = null;
11988
    }
11989
 
11990
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11991
    public boolean isSetUcx() {
11992
      return this.ucx != null;
11993
    }
11994
 
11995
    public void setUcxIsSet(boolean value) {
11996
      if (!value) {
11997
        this.ucx = null;
11998
      }
11999
    }
12000
 
12001
    public void setFieldValue(_Fields field, Object value) {
12002
      switch (field) {
12003
      case SUCCESS:
12004
        if (value == null) {
12005
          unsetSuccess();
12006
        } else {
12007
          setSuccess((Boolean)value);
12008
        }
12009
        break;
12010
 
12011
      case UCX:
12012
        if (value == null) {
12013
          unsetUcx();
12014
        } else {
12015
          setUcx((UserContextException)value);
12016
        }
12017
        break;
12018
 
12019
      }
12020
    }
12021
 
12022
    public void setFieldValue(int fieldID, Object value) {
12023
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12024
    }
12025
 
12026
    public Object getFieldValue(_Fields field) {
12027
      switch (field) {
12028
      case SUCCESS:
12029
        return new Boolean(isSuccess());
12030
 
12031
      case UCX:
12032
        return getUcx();
12033
 
12034
      }
12035
      throw new IllegalStateException();
12036
    }
12037
 
12038
    public Object getFieldValue(int fieldId) {
12039
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12040
    }
12041
 
12042
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12043
    public boolean isSet(_Fields field) {
12044
      switch (field) {
12045
      case SUCCESS:
12046
        return isSetSuccess();
12047
      case UCX:
12048
        return isSetUcx();
12049
      }
12050
      throw new IllegalStateException();
12051
    }
12052
 
12053
    public boolean isSet(int fieldID) {
12054
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12055
    }
12056
 
12057
    @Override
12058
    public boolean equals(Object that) {
12059
      if (that == null)
12060
        return false;
553 chandransh 12061
      if (that instanceof setDefaultAddress_result)
12062
        return this.equals((setDefaultAddress_result)that);
48 ashish 12063
      return false;
12064
    }
12065
 
553 chandransh 12066
    public boolean equals(setDefaultAddress_result that) {
48 ashish 12067
      if (that == null)
12068
        return false;
12069
 
12070
      boolean this_present_success = true;
12071
      boolean that_present_success = true;
12072
      if (this_present_success || that_present_success) {
12073
        if (!(this_present_success && that_present_success))
12074
          return false;
12075
        if (this.success != that.success)
12076
          return false;
12077
      }
12078
 
12079
      boolean this_present_ucx = true && this.isSetUcx();
12080
      boolean that_present_ucx = true && that.isSetUcx();
12081
      if (this_present_ucx || that_present_ucx) {
12082
        if (!(this_present_ucx && that_present_ucx))
12083
          return false;
12084
        if (!this.ucx.equals(that.ucx))
12085
          return false;
12086
      }
12087
 
12088
      return true;
12089
    }
12090
 
12091
    @Override
12092
    public int hashCode() {
12093
      return 0;
12094
    }
12095
 
553 chandransh 12096
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12097
      if (!getClass().equals(other.getClass())) {
12098
        return getClass().getName().compareTo(other.getClass().getName());
12099
      }
12100
 
12101
      int lastComparison = 0;
553 chandransh 12102
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12103
 
12104
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12105
      if (lastComparison != 0) {
12106
        return lastComparison;
12107
      }
12108
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12109
      if (lastComparison != 0) {
12110
        return lastComparison;
12111
      }
12112
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12113
      if (lastComparison != 0) {
12114
        return lastComparison;
12115
      }
12116
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12117
      if (lastComparison != 0) {
12118
        return lastComparison;
12119
      }
12120
      return 0;
12121
    }
12122
 
12123
    public void read(TProtocol iprot) throws TException {
12124
      TField field;
12125
      iprot.readStructBegin();
12126
      while (true)
12127
      {
12128
        field = iprot.readFieldBegin();
12129
        if (field.type == TType.STOP) { 
12130
          break;
12131
        }
12132
        _Fields fieldId = _Fields.findByThriftId(field.id);
12133
        if (fieldId == null) {
12134
          TProtocolUtil.skip(iprot, field.type);
12135
        } else {
12136
          switch (fieldId) {
12137
            case SUCCESS:
12138
              if (field.type == TType.BOOL) {
12139
                this.success = iprot.readBool();
12140
                setSuccessIsSet(true);
12141
              } else { 
12142
                TProtocolUtil.skip(iprot, field.type);
12143
              }
12144
              break;
12145
            case UCX:
12146
              if (field.type == TType.STRUCT) {
12147
                this.ucx = new UserContextException();
12148
                this.ucx.read(iprot);
12149
              } else { 
12150
                TProtocolUtil.skip(iprot, field.type);
12151
              }
12152
              break;
12153
          }
12154
          iprot.readFieldEnd();
12155
        }
12156
      }
12157
      iprot.readStructEnd();
12158
      validate();
12159
    }
12160
 
12161
    public void write(TProtocol oprot) throws TException {
12162
      oprot.writeStructBegin(STRUCT_DESC);
12163
 
12164
      if (this.isSetSuccess()) {
12165
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12166
        oprot.writeBool(this.success);
12167
        oprot.writeFieldEnd();
12168
      } else if (this.isSetUcx()) {
12169
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12170
        this.ucx.write(oprot);
12171
        oprot.writeFieldEnd();
12172
      }
12173
      oprot.writeFieldStop();
12174
      oprot.writeStructEnd();
12175
    }
12176
 
12177
    @Override
12178
    public String toString() {
553 chandransh 12179
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12180
      boolean first = true;
12181
 
12182
      sb.append("success:");
12183
      sb.append(this.success);
12184
      first = false;
12185
      if (!first) sb.append(", ");
12186
      sb.append("ucx:");
12187
      if (this.ucx == null) {
12188
        sb.append("null");
12189
      } else {
12190
        sb.append(this.ucx);
12191
      }
12192
      first = false;
12193
      sb.append(")");
12194
      return sb.toString();
12195
    }
12196
 
12197
    public void validate() throws TException {
12198
      // check for required fields
12199
    }
12200
 
12201
  }
12202
 
553 chandransh 12203
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12204
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12205
 
553 chandransh 12206
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12207
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12208
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12209
 
553 chandransh 12210
    private long userid;
593 rajveer 12211
    private String oldPassword;
12212
    private String newPassword;
48 ashish 12213
 
12214
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12215
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12216
      USERID((short)1, "userid"),
593 rajveer 12217
      OLD_PASSWORD((short)2, "oldPassword"),
12218
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12219
 
12220
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12221
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12222
 
12223
      static {
12224
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12225
          byId.put((int)field._thriftId, field);
12226
          byName.put(field.getFieldName(), field);
12227
        }
12228
      }
12229
 
12230
      /**
12231
       * Find the _Fields constant that matches fieldId, or null if its not found.
12232
       */
12233
      public static _Fields findByThriftId(int fieldId) {
12234
        return byId.get(fieldId);
12235
      }
12236
 
12237
      /**
12238
       * Find the _Fields constant that matches fieldId, throwing an exception
12239
       * if it is not found.
12240
       */
12241
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12242
        _Fields fields = findByThriftId(fieldId);
12243
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12244
        return fields;
12245
      }
12246
 
12247
      /**
12248
       * Find the _Fields constant that matches name, or null if its not found.
12249
       */
12250
      public static _Fields findByName(String name) {
12251
        return byName.get(name);
12252
      }
12253
 
12254
      private final short _thriftId;
12255
      private final String _fieldName;
12256
 
12257
      _Fields(short thriftId, String fieldName) {
12258
        _thriftId = thriftId;
12259
        _fieldName = fieldName;
12260
      }
12261
 
12262
      public short getThriftFieldId() {
12263
        return _thriftId;
12264
      }
12265
 
12266
      public String getFieldName() {
12267
        return _fieldName;
12268
      }
12269
    }
12270
 
12271
    // isset id assignments
12272
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12273
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12274
 
12275
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12276
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12277
          new FieldValueMetaData(TType.I64)));
593 rajveer 12278
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12279
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12280
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12281
          new FieldValueMetaData(TType.STRING)));
48 ashish 12282
    }});
12283
 
12284
    static {
553 chandransh 12285
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12286
    }
12287
 
553 chandransh 12288
    public updatePassword_args() {
48 ashish 12289
    }
12290
 
553 chandransh 12291
    public updatePassword_args(
12292
      long userid,
593 rajveer 12293
      String oldPassword,
12294
      String newPassword)
48 ashish 12295
    {
12296
      this();
553 chandransh 12297
      this.userid = userid;
12298
      setUseridIsSet(true);
593 rajveer 12299
      this.oldPassword = oldPassword;
12300
      this.newPassword = newPassword;
48 ashish 12301
    }
12302
 
12303
    /**
12304
     * Performs a deep copy on <i>other</i>.
12305
     */
553 chandransh 12306
    public updatePassword_args(updatePassword_args other) {
48 ashish 12307
      __isset_bit_vector.clear();
12308
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12309
      this.userid = other.userid;
593 rajveer 12310
      if (other.isSetOldPassword()) {
12311
        this.oldPassword = other.oldPassword;
553 chandransh 12312
      }
593 rajveer 12313
      if (other.isSetNewPassword()) {
12314
        this.newPassword = other.newPassword;
12315
      }
48 ashish 12316
    }
12317
 
553 chandransh 12318
    public updatePassword_args deepCopy() {
12319
      return new updatePassword_args(this);
48 ashish 12320
    }
12321
 
12322
    @Deprecated
553 chandransh 12323
    public updatePassword_args clone() {
12324
      return new updatePassword_args(this);
48 ashish 12325
    }
12326
 
553 chandransh 12327
    public long getUserid() {
12328
      return this.userid;
48 ashish 12329
    }
12330
 
553 chandransh 12331
    public updatePassword_args setUserid(long userid) {
12332
      this.userid = userid;
12333
      setUseridIsSet(true);
48 ashish 12334
      return this;
12335
    }
12336
 
553 chandransh 12337
    public void unsetUserid() {
48 ashish 12338
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12339
    }
12340
 
553 chandransh 12341
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12342
    public boolean isSetUserid() {
48 ashish 12343
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12344
    }
12345
 
553 chandransh 12346
    public void setUseridIsSet(boolean value) {
48 ashish 12347
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12348
    }
12349
 
593 rajveer 12350
    public String getOldPassword() {
12351
      return this.oldPassword;
48 ashish 12352
    }
12353
 
593 rajveer 12354
    public updatePassword_args setOldPassword(String oldPassword) {
12355
      this.oldPassword = oldPassword;
48 ashish 12356
      return this;
12357
    }
12358
 
593 rajveer 12359
    public void unsetOldPassword() {
12360
      this.oldPassword = null;
48 ashish 12361
    }
12362
 
593 rajveer 12363
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12364
    public boolean isSetOldPassword() {
12365
      return this.oldPassword != null;
48 ashish 12366
    }
12367
 
593 rajveer 12368
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12369
      if (!value) {
593 rajveer 12370
        this.oldPassword = null;
553 chandransh 12371
      }
48 ashish 12372
    }
12373
 
593 rajveer 12374
    public String getNewPassword() {
12375
      return this.newPassword;
12376
    }
12377
 
12378
    public updatePassword_args setNewPassword(String newPassword) {
12379
      this.newPassword = newPassword;
12380
      return this;
12381
    }
12382
 
12383
    public void unsetNewPassword() {
12384
      this.newPassword = null;
12385
    }
12386
 
12387
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12388
    public boolean isSetNewPassword() {
12389
      return this.newPassword != null;
12390
    }
12391
 
12392
    public void setNewPasswordIsSet(boolean value) {
12393
      if (!value) {
12394
        this.newPassword = null;
12395
      }
12396
    }
12397
 
48 ashish 12398
    public void setFieldValue(_Fields field, Object value) {
12399
      switch (field) {
553 chandransh 12400
      case USERID:
48 ashish 12401
        if (value == null) {
553 chandransh 12402
          unsetUserid();
48 ashish 12403
        } else {
553 chandransh 12404
          setUserid((Long)value);
48 ashish 12405
        }
12406
        break;
12407
 
593 rajveer 12408
      case OLD_PASSWORD:
48 ashish 12409
        if (value == null) {
593 rajveer 12410
          unsetOldPassword();
48 ashish 12411
        } else {
593 rajveer 12412
          setOldPassword((String)value);
48 ashish 12413
        }
12414
        break;
12415
 
593 rajveer 12416
      case NEW_PASSWORD:
12417
        if (value == null) {
12418
          unsetNewPassword();
12419
        } else {
12420
          setNewPassword((String)value);
12421
        }
12422
        break;
12423
 
48 ashish 12424
      }
12425
    }
12426
 
12427
    public void setFieldValue(int fieldID, Object value) {
12428
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12429
    }
12430
 
12431
    public Object getFieldValue(_Fields field) {
12432
      switch (field) {
553 chandransh 12433
      case USERID:
12434
        return new Long(getUserid());
48 ashish 12435
 
593 rajveer 12436
      case OLD_PASSWORD:
12437
        return getOldPassword();
48 ashish 12438
 
593 rajveer 12439
      case NEW_PASSWORD:
12440
        return getNewPassword();
12441
 
48 ashish 12442
      }
12443
      throw new IllegalStateException();
12444
    }
12445
 
12446
    public Object getFieldValue(int fieldId) {
12447
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12448
    }
12449
 
12450
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12451
    public boolean isSet(_Fields field) {
12452
      switch (field) {
553 chandransh 12453
      case USERID:
12454
        return isSetUserid();
593 rajveer 12455
      case OLD_PASSWORD:
12456
        return isSetOldPassword();
12457
      case NEW_PASSWORD:
12458
        return isSetNewPassword();
48 ashish 12459
      }
12460
      throw new IllegalStateException();
12461
    }
12462
 
12463
    public boolean isSet(int fieldID) {
12464
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12465
    }
12466
 
12467
    @Override
12468
    public boolean equals(Object that) {
12469
      if (that == null)
12470
        return false;
553 chandransh 12471
      if (that instanceof updatePassword_args)
12472
        return this.equals((updatePassword_args)that);
48 ashish 12473
      return false;
12474
    }
12475
 
553 chandransh 12476
    public boolean equals(updatePassword_args that) {
48 ashish 12477
      if (that == null)
12478
        return false;
12479
 
553 chandransh 12480
      boolean this_present_userid = true;
12481
      boolean that_present_userid = true;
12482
      if (this_present_userid || that_present_userid) {
12483
        if (!(this_present_userid && that_present_userid))
48 ashish 12484
          return false;
553 chandransh 12485
        if (this.userid != that.userid)
48 ashish 12486
          return false;
12487
      }
12488
 
593 rajveer 12489
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12490
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12491
      if (this_present_oldPassword || that_present_oldPassword) {
12492
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12493
          return false;
593 rajveer 12494
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12495
          return false;
12496
      }
12497
 
593 rajveer 12498
      boolean this_present_newPassword = true && this.isSetNewPassword();
12499
      boolean that_present_newPassword = true && that.isSetNewPassword();
12500
      if (this_present_newPassword || that_present_newPassword) {
12501
        if (!(this_present_newPassword && that_present_newPassword))
12502
          return false;
12503
        if (!this.newPassword.equals(that.newPassword))
12504
          return false;
12505
      }
12506
 
48 ashish 12507
      return true;
12508
    }
12509
 
12510
    @Override
12511
    public int hashCode() {
12512
      return 0;
12513
    }
12514
 
553 chandransh 12515
    public int compareTo(updatePassword_args other) {
48 ashish 12516
      if (!getClass().equals(other.getClass())) {
12517
        return getClass().getName().compareTo(other.getClass().getName());
12518
      }
12519
 
12520
      int lastComparison = 0;
553 chandransh 12521
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12522
 
553 chandransh 12523
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12524
      if (lastComparison != 0) {
12525
        return lastComparison;
12526
      }
553 chandransh 12527
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12528
      if (lastComparison != 0) {
12529
        return lastComparison;
12530
      }
593 rajveer 12531
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12532
      if (lastComparison != 0) {
12533
        return lastComparison;
12534
      }
593 rajveer 12535
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12536
      if (lastComparison != 0) {
12537
        return lastComparison;
12538
      }
593 rajveer 12539
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12540
      if (lastComparison != 0) {
12541
        return lastComparison;
12542
      }
12543
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12544
      if (lastComparison != 0) {
12545
        return lastComparison;
12546
      }
48 ashish 12547
      return 0;
12548
    }
12549
 
12550
    public void read(TProtocol iprot) throws TException {
12551
      TField field;
12552
      iprot.readStructBegin();
12553
      while (true)
12554
      {
12555
        field = iprot.readFieldBegin();
12556
        if (field.type == TType.STOP) { 
12557
          break;
12558
        }
12559
        _Fields fieldId = _Fields.findByThriftId(field.id);
12560
        if (fieldId == null) {
12561
          TProtocolUtil.skip(iprot, field.type);
12562
        } else {
12563
          switch (fieldId) {
553 chandransh 12564
            case USERID:
48 ashish 12565
              if (field.type == TType.I64) {
553 chandransh 12566
                this.userid = iprot.readI64();
12567
                setUseridIsSet(true);
48 ashish 12568
              } else { 
12569
                TProtocolUtil.skip(iprot, field.type);
12570
              }
12571
              break;
593 rajveer 12572
            case OLD_PASSWORD:
553 chandransh 12573
              if (field.type == TType.STRING) {
593 rajveer 12574
                this.oldPassword = iprot.readString();
48 ashish 12575
              } else { 
12576
                TProtocolUtil.skip(iprot, field.type);
12577
              }
12578
              break;
593 rajveer 12579
            case NEW_PASSWORD:
12580
              if (field.type == TType.STRING) {
12581
                this.newPassword = iprot.readString();
12582
              } else { 
12583
                TProtocolUtil.skip(iprot, field.type);
12584
              }
12585
              break;
48 ashish 12586
          }
12587
          iprot.readFieldEnd();
12588
        }
12589
      }
12590
      iprot.readStructEnd();
12591
      validate();
12592
    }
12593
 
12594
    public void write(TProtocol oprot) throws TException {
12595
      validate();
12596
 
12597
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12598
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12599
      oprot.writeI64(this.userid);
48 ashish 12600
      oprot.writeFieldEnd();
593 rajveer 12601
      if (this.oldPassword != null) {
12602
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12603
        oprot.writeString(this.oldPassword);
553 chandransh 12604
        oprot.writeFieldEnd();
12605
      }
593 rajveer 12606
      if (this.newPassword != null) {
12607
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
12608
        oprot.writeString(this.newPassword);
12609
        oprot.writeFieldEnd();
12610
      }
48 ashish 12611
      oprot.writeFieldStop();
12612
      oprot.writeStructEnd();
12613
    }
12614
 
12615
    @Override
12616
    public String toString() {
553 chandransh 12617
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12618
      boolean first = true;
12619
 
553 chandransh 12620
      sb.append("userid:");
12621
      sb.append(this.userid);
48 ashish 12622
      first = false;
12623
      if (!first) sb.append(", ");
593 rajveer 12624
      sb.append("oldPassword:");
12625
      if (this.oldPassword == null) {
553 chandransh 12626
        sb.append("null");
12627
      } else {
593 rajveer 12628
        sb.append(this.oldPassword);
553 chandransh 12629
      }
48 ashish 12630
      first = false;
593 rajveer 12631
      if (!first) sb.append(", ");
12632
      sb.append("newPassword:");
12633
      if (this.newPassword == null) {
12634
        sb.append("null");
12635
      } else {
12636
        sb.append(this.newPassword);
12637
      }
12638
      first = false;
48 ashish 12639
      sb.append(")");
12640
      return sb.toString();
12641
    }
12642
 
12643
    public void validate() throws TException {
12644
      // check for required fields
12645
    }
12646
 
12647
  }
12648
 
553 chandransh 12649
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12650
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12651
 
12652
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12653
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12654
 
12655
    private boolean success;
12656
    private UserContextException ucx;
12657
 
12658
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12659
    public enum _Fields implements TFieldIdEnum {
12660
      SUCCESS((short)0, "success"),
12661
      UCX((short)1, "ucx");
12662
 
12663
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12665
 
12666
      static {
12667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12668
          byId.put((int)field._thriftId, field);
12669
          byName.put(field.getFieldName(), field);
12670
        }
12671
      }
12672
 
12673
      /**
12674
       * Find the _Fields constant that matches fieldId, or null if its not found.
12675
       */
12676
      public static _Fields findByThriftId(int fieldId) {
12677
        return byId.get(fieldId);
12678
      }
12679
 
12680
      /**
12681
       * Find the _Fields constant that matches fieldId, throwing an exception
12682
       * if it is not found.
12683
       */
12684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12685
        _Fields fields = findByThriftId(fieldId);
12686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12687
        return fields;
12688
      }
12689
 
12690
      /**
12691
       * Find the _Fields constant that matches name, or null if its not found.
12692
       */
12693
      public static _Fields findByName(String name) {
12694
        return byName.get(name);
12695
      }
12696
 
12697
      private final short _thriftId;
12698
      private final String _fieldName;
12699
 
12700
      _Fields(short thriftId, String fieldName) {
12701
        _thriftId = thriftId;
12702
        _fieldName = fieldName;
12703
      }
12704
 
12705
      public short getThriftFieldId() {
12706
        return _thriftId;
12707
      }
12708
 
12709
      public String getFieldName() {
12710
        return _fieldName;
12711
      }
12712
    }
12713
 
12714
    // isset id assignments
12715
    private static final int __SUCCESS_ISSET_ID = 0;
12716
    private BitSet __isset_bit_vector = new BitSet(1);
12717
 
12718
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12719
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12720
          new FieldValueMetaData(TType.BOOL)));
12721
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12722
          new FieldValueMetaData(TType.STRUCT)));
12723
    }});
12724
 
12725
    static {
553 chandransh 12726
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12727
    }
12728
 
553 chandransh 12729
    public updatePassword_result() {
48 ashish 12730
    }
12731
 
553 chandransh 12732
    public updatePassword_result(
48 ashish 12733
      boolean success,
12734
      UserContextException ucx)
12735
    {
12736
      this();
12737
      this.success = success;
12738
      setSuccessIsSet(true);
12739
      this.ucx = ucx;
12740
    }
12741
 
12742
    /**
12743
     * Performs a deep copy on <i>other</i>.
12744
     */
553 chandransh 12745
    public updatePassword_result(updatePassword_result other) {
48 ashish 12746
      __isset_bit_vector.clear();
12747
      __isset_bit_vector.or(other.__isset_bit_vector);
12748
      this.success = other.success;
12749
      if (other.isSetUcx()) {
12750
        this.ucx = new UserContextException(other.ucx);
12751
      }
12752
    }
12753
 
553 chandransh 12754
    public updatePassword_result deepCopy() {
12755
      return new updatePassword_result(this);
48 ashish 12756
    }
12757
 
12758
    @Deprecated
553 chandransh 12759
    public updatePassword_result clone() {
12760
      return new updatePassword_result(this);
48 ashish 12761
    }
12762
 
12763
    public boolean isSuccess() {
12764
      return this.success;
12765
    }
12766
 
553 chandransh 12767
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12768
      this.success = success;
12769
      setSuccessIsSet(true);
12770
      return this;
12771
    }
12772
 
12773
    public void unsetSuccess() {
12774
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12775
    }
12776
 
12777
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12778
    public boolean isSetSuccess() {
12779
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12780
    }
12781
 
12782
    public void setSuccessIsSet(boolean value) {
12783
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12784
    }
12785
 
12786
    public UserContextException getUcx() {
12787
      return this.ucx;
12788
    }
12789
 
553 chandransh 12790
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12791
      this.ucx = ucx;
12792
      return this;
12793
    }
12794
 
12795
    public void unsetUcx() {
12796
      this.ucx = null;
12797
    }
12798
 
12799
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12800
    public boolean isSetUcx() {
12801
      return this.ucx != null;
12802
    }
12803
 
12804
    public void setUcxIsSet(boolean value) {
12805
      if (!value) {
12806
        this.ucx = null;
12807
      }
12808
    }
12809
 
12810
    public void setFieldValue(_Fields field, Object value) {
12811
      switch (field) {
12812
      case SUCCESS:
12813
        if (value == null) {
12814
          unsetSuccess();
12815
        } else {
12816
          setSuccess((Boolean)value);
12817
        }
12818
        break;
12819
 
12820
      case UCX:
12821
        if (value == null) {
12822
          unsetUcx();
12823
        } else {
12824
          setUcx((UserContextException)value);
12825
        }
12826
        break;
12827
 
12828
      }
12829
    }
12830
 
12831
    public void setFieldValue(int fieldID, Object value) {
12832
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12833
    }
12834
 
12835
    public Object getFieldValue(_Fields field) {
12836
      switch (field) {
12837
      case SUCCESS:
12838
        return new Boolean(isSuccess());
12839
 
12840
      case UCX:
12841
        return getUcx();
12842
 
12843
      }
12844
      throw new IllegalStateException();
12845
    }
12846
 
12847
    public Object getFieldValue(int fieldId) {
12848
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12849
    }
12850
 
12851
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12852
    public boolean isSet(_Fields field) {
12853
      switch (field) {
12854
      case SUCCESS:
12855
        return isSetSuccess();
12856
      case UCX:
12857
        return isSetUcx();
12858
      }
12859
      throw new IllegalStateException();
12860
    }
12861
 
12862
    public boolean isSet(int fieldID) {
12863
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12864
    }
12865
 
12866
    @Override
12867
    public boolean equals(Object that) {
12868
      if (that == null)
12869
        return false;
553 chandransh 12870
      if (that instanceof updatePassword_result)
12871
        return this.equals((updatePassword_result)that);
48 ashish 12872
      return false;
12873
    }
12874
 
553 chandransh 12875
    public boolean equals(updatePassword_result that) {
48 ashish 12876
      if (that == null)
12877
        return false;
12878
 
12879
      boolean this_present_success = true;
12880
      boolean that_present_success = true;
12881
      if (this_present_success || that_present_success) {
12882
        if (!(this_present_success && that_present_success))
12883
          return false;
12884
        if (this.success != that.success)
12885
          return false;
12886
      }
12887
 
12888
      boolean this_present_ucx = true && this.isSetUcx();
12889
      boolean that_present_ucx = true && that.isSetUcx();
12890
      if (this_present_ucx || that_present_ucx) {
12891
        if (!(this_present_ucx && that_present_ucx))
12892
          return false;
12893
        if (!this.ucx.equals(that.ucx))
12894
          return false;
12895
      }
12896
 
12897
      return true;
12898
    }
12899
 
12900
    @Override
12901
    public int hashCode() {
12902
      return 0;
12903
    }
12904
 
553 chandransh 12905
    public int compareTo(updatePassword_result other) {
48 ashish 12906
      if (!getClass().equals(other.getClass())) {
12907
        return getClass().getName().compareTo(other.getClass().getName());
12908
      }
12909
 
12910
      int lastComparison = 0;
553 chandransh 12911
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12912
 
12913
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12914
      if (lastComparison != 0) {
12915
        return lastComparison;
12916
      }
12917
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12918
      if (lastComparison != 0) {
12919
        return lastComparison;
12920
      }
12921
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12922
      if (lastComparison != 0) {
12923
        return lastComparison;
12924
      }
12925
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12926
      if (lastComparison != 0) {
12927
        return lastComparison;
12928
      }
12929
      return 0;
12930
    }
12931
 
12932
    public void read(TProtocol iprot) throws TException {
12933
      TField field;
12934
      iprot.readStructBegin();
12935
      while (true)
12936
      {
12937
        field = iprot.readFieldBegin();
12938
        if (field.type == TType.STOP) { 
12939
          break;
12940
        }
12941
        _Fields fieldId = _Fields.findByThriftId(field.id);
12942
        if (fieldId == null) {
12943
          TProtocolUtil.skip(iprot, field.type);
12944
        } else {
12945
          switch (fieldId) {
12946
            case SUCCESS:
12947
              if (field.type == TType.BOOL) {
12948
                this.success = iprot.readBool();
12949
                setSuccessIsSet(true);
12950
              } else { 
12951
                TProtocolUtil.skip(iprot, field.type);
12952
              }
12953
              break;
12954
            case UCX:
12955
              if (field.type == TType.STRUCT) {
12956
                this.ucx = new UserContextException();
12957
                this.ucx.read(iprot);
12958
              } else { 
12959
                TProtocolUtil.skip(iprot, field.type);
12960
              }
12961
              break;
12962
          }
12963
          iprot.readFieldEnd();
12964
        }
12965
      }
12966
      iprot.readStructEnd();
12967
      validate();
12968
    }
12969
 
12970
    public void write(TProtocol oprot) throws TException {
12971
      oprot.writeStructBegin(STRUCT_DESC);
12972
 
12973
      if (this.isSetSuccess()) {
12974
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12975
        oprot.writeBool(this.success);
12976
        oprot.writeFieldEnd();
12977
      } else if (this.isSetUcx()) {
12978
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12979
        this.ucx.write(oprot);
12980
        oprot.writeFieldEnd();
12981
      }
12982
      oprot.writeFieldStop();
12983
      oprot.writeStructEnd();
12984
    }
12985
 
12986
    @Override
12987
    public String toString() {
553 chandransh 12988
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12989
      boolean first = true;
12990
 
12991
      sb.append("success:");
12992
      sb.append(this.success);
12993
      first = false;
12994
      if (!first) sb.append(", ");
12995
      sb.append("ucx:");
12996
      if (this.ucx == null) {
12997
        sb.append("null");
12998
      } else {
12999
        sb.append(this.ucx);
13000
      }
13001
      first = false;
13002
      sb.append(")");
13003
      return sb.toString();
13004
    }
13005
 
13006
    public void validate() throws TException {
13007
      // check for required fields
13008
    }
13009
 
13010
  }
13011
 
582 rajveer 13012
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
13013
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
13014
 
13015
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
896 rajveer 13016
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)2);
582 rajveer 13017
 
13018
    private String email;
896 rajveer 13019
    private String newPassword;
582 rajveer 13020
 
13021
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13022
    public enum _Fields implements TFieldIdEnum {
896 rajveer 13023
      EMAIL((short)1, "email"),
13024
      NEW_PASSWORD((short)2, "newPassword");
582 rajveer 13025
 
13026
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13027
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13028
 
13029
      static {
13030
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13031
          byId.put((int)field._thriftId, field);
13032
          byName.put(field.getFieldName(), field);
13033
        }
13034
      }
13035
 
13036
      /**
13037
       * Find the _Fields constant that matches fieldId, or null if its not found.
13038
       */
13039
      public static _Fields findByThriftId(int fieldId) {
13040
        return byId.get(fieldId);
13041
      }
13042
 
13043
      /**
13044
       * Find the _Fields constant that matches fieldId, throwing an exception
13045
       * if it is not found.
13046
       */
13047
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13048
        _Fields fields = findByThriftId(fieldId);
13049
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13050
        return fields;
13051
      }
13052
 
13053
      /**
13054
       * Find the _Fields constant that matches name, or null if its not found.
13055
       */
13056
      public static _Fields findByName(String name) {
13057
        return byName.get(name);
13058
      }
13059
 
13060
      private final short _thriftId;
13061
      private final String _fieldName;
13062
 
13063
      _Fields(short thriftId, String fieldName) {
13064
        _thriftId = thriftId;
13065
        _fieldName = fieldName;
13066
      }
13067
 
13068
      public short getThriftFieldId() {
13069
        return _thriftId;
13070
      }
13071
 
13072
      public String getFieldName() {
13073
        return _fieldName;
13074
      }
13075
    }
13076
 
13077
    // isset id assignments
13078
 
13079
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13080
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13081
          new FieldValueMetaData(TType.STRING)));
896 rajveer 13082
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
13083
          new FieldValueMetaData(TType.STRING)));
582 rajveer 13084
    }});
13085
 
13086
    static {
13087
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13088
    }
13089
 
13090
    public forgotPassword_args() {
13091
    }
13092
 
13093
    public forgotPassword_args(
896 rajveer 13094
      String email,
13095
      String newPassword)
582 rajveer 13096
    {
13097
      this();
13098
      this.email = email;
896 rajveer 13099
      this.newPassword = newPassword;
582 rajveer 13100
    }
13101
 
13102
    /**
13103
     * Performs a deep copy on <i>other</i>.
13104
     */
13105
    public forgotPassword_args(forgotPassword_args other) {
13106
      if (other.isSetEmail()) {
13107
        this.email = other.email;
13108
      }
896 rajveer 13109
      if (other.isSetNewPassword()) {
13110
        this.newPassword = other.newPassword;
13111
      }
582 rajveer 13112
    }
13113
 
13114
    public forgotPassword_args deepCopy() {
13115
      return new forgotPassword_args(this);
13116
    }
13117
 
13118
    @Deprecated
13119
    public forgotPassword_args clone() {
13120
      return new forgotPassword_args(this);
13121
    }
13122
 
13123
    public String getEmail() {
13124
      return this.email;
13125
    }
13126
 
13127
    public forgotPassword_args setEmail(String email) {
13128
      this.email = email;
13129
      return this;
13130
    }
13131
 
13132
    public void unsetEmail() {
13133
      this.email = null;
13134
    }
13135
 
13136
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13137
    public boolean isSetEmail() {
13138
      return this.email != null;
13139
    }
13140
 
13141
    public void setEmailIsSet(boolean value) {
13142
      if (!value) {
13143
        this.email = null;
13144
      }
13145
    }
13146
 
896 rajveer 13147
    public String getNewPassword() {
13148
      return this.newPassword;
13149
    }
13150
 
13151
    public forgotPassword_args setNewPassword(String newPassword) {
13152
      this.newPassword = newPassword;
13153
      return this;
13154
    }
13155
 
13156
    public void unsetNewPassword() {
13157
      this.newPassword = null;
13158
    }
13159
 
13160
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
13161
    public boolean isSetNewPassword() {
13162
      return this.newPassword != null;
13163
    }
13164
 
13165
    public void setNewPasswordIsSet(boolean value) {
13166
      if (!value) {
13167
        this.newPassword = null;
13168
      }
13169
    }
13170
 
582 rajveer 13171
    public void setFieldValue(_Fields field, Object value) {
13172
      switch (field) {
13173
      case EMAIL:
13174
        if (value == null) {
13175
          unsetEmail();
13176
        } else {
13177
          setEmail((String)value);
13178
        }
13179
        break;
13180
 
896 rajveer 13181
      case NEW_PASSWORD:
13182
        if (value == null) {
13183
          unsetNewPassword();
13184
        } else {
13185
          setNewPassword((String)value);
13186
        }
13187
        break;
13188
 
582 rajveer 13189
      }
13190
    }
13191
 
13192
    public void setFieldValue(int fieldID, Object value) {
13193
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13194
    }
13195
 
13196
    public Object getFieldValue(_Fields field) {
13197
      switch (field) {
13198
      case EMAIL:
13199
        return getEmail();
13200
 
896 rajveer 13201
      case NEW_PASSWORD:
13202
        return getNewPassword();
13203
 
582 rajveer 13204
      }
13205
      throw new IllegalStateException();
13206
    }
13207
 
13208
    public Object getFieldValue(int fieldId) {
13209
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13210
    }
13211
 
13212
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13213
    public boolean isSet(_Fields field) {
13214
      switch (field) {
13215
      case EMAIL:
13216
        return isSetEmail();
896 rajveer 13217
      case NEW_PASSWORD:
13218
        return isSetNewPassword();
582 rajveer 13219
      }
13220
      throw new IllegalStateException();
13221
    }
13222
 
13223
    public boolean isSet(int fieldID) {
13224
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13225
    }
13226
 
13227
    @Override
13228
    public boolean equals(Object that) {
13229
      if (that == null)
13230
        return false;
13231
      if (that instanceof forgotPassword_args)
13232
        return this.equals((forgotPassword_args)that);
13233
      return false;
13234
    }
13235
 
13236
    public boolean equals(forgotPassword_args that) {
13237
      if (that == null)
13238
        return false;
13239
 
13240
      boolean this_present_email = true && this.isSetEmail();
13241
      boolean that_present_email = true && that.isSetEmail();
13242
      if (this_present_email || that_present_email) {
13243
        if (!(this_present_email && that_present_email))
13244
          return false;
13245
        if (!this.email.equals(that.email))
13246
          return false;
13247
      }
13248
 
896 rajveer 13249
      boolean this_present_newPassword = true && this.isSetNewPassword();
13250
      boolean that_present_newPassword = true && that.isSetNewPassword();
13251
      if (this_present_newPassword || that_present_newPassword) {
13252
        if (!(this_present_newPassword && that_present_newPassword))
13253
          return false;
13254
        if (!this.newPassword.equals(that.newPassword))
13255
          return false;
13256
      }
13257
 
582 rajveer 13258
      return true;
13259
    }
13260
 
13261
    @Override
13262
    public int hashCode() {
13263
      return 0;
13264
    }
13265
 
13266
    public int compareTo(forgotPassword_args other) {
13267
      if (!getClass().equals(other.getClass())) {
13268
        return getClass().getName().compareTo(other.getClass().getName());
13269
      }
13270
 
13271
      int lastComparison = 0;
13272
      forgotPassword_args typedOther = (forgotPassword_args)other;
13273
 
13274
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13275
      if (lastComparison != 0) {
13276
        return lastComparison;
13277
      }
13278
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13279
      if (lastComparison != 0) {
13280
        return lastComparison;
13281
      }
896 rajveer 13282
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
13283
      if (lastComparison != 0) {
13284
        return lastComparison;
13285
      }
13286
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
13287
      if (lastComparison != 0) {
13288
        return lastComparison;
13289
      }
582 rajveer 13290
      return 0;
13291
    }
13292
 
13293
    public void read(TProtocol iprot) throws TException {
13294
      TField field;
13295
      iprot.readStructBegin();
13296
      while (true)
13297
      {
13298
        field = iprot.readFieldBegin();
13299
        if (field.type == TType.STOP) { 
13300
          break;
13301
        }
13302
        _Fields fieldId = _Fields.findByThriftId(field.id);
13303
        if (fieldId == null) {
13304
          TProtocolUtil.skip(iprot, field.type);
13305
        } else {
13306
          switch (fieldId) {
13307
            case EMAIL:
13308
              if (field.type == TType.STRING) {
13309
                this.email = iprot.readString();
13310
              } else { 
13311
                TProtocolUtil.skip(iprot, field.type);
13312
              }
13313
              break;
896 rajveer 13314
            case NEW_PASSWORD:
13315
              if (field.type == TType.STRING) {
13316
                this.newPassword = iprot.readString();
13317
              } else { 
13318
                TProtocolUtil.skip(iprot, field.type);
13319
              }
13320
              break;
582 rajveer 13321
          }
13322
          iprot.readFieldEnd();
13323
        }
13324
      }
13325
      iprot.readStructEnd();
13326
      validate();
13327
    }
13328
 
13329
    public void write(TProtocol oprot) throws TException {
13330
      validate();
13331
 
13332
      oprot.writeStructBegin(STRUCT_DESC);
13333
      if (this.email != null) {
13334
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13335
        oprot.writeString(this.email);
13336
        oprot.writeFieldEnd();
13337
      }
896 rajveer 13338
      if (this.newPassword != null) {
13339
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
13340
        oprot.writeString(this.newPassword);
13341
        oprot.writeFieldEnd();
13342
      }
582 rajveer 13343
      oprot.writeFieldStop();
13344
      oprot.writeStructEnd();
13345
    }
13346
 
13347
    @Override
13348
    public String toString() {
13349
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13350
      boolean first = true;
13351
 
13352
      sb.append("email:");
13353
      if (this.email == null) {
13354
        sb.append("null");
13355
      } else {
13356
        sb.append(this.email);
13357
      }
13358
      first = false;
896 rajveer 13359
      if (!first) sb.append(", ");
13360
      sb.append("newPassword:");
13361
      if (this.newPassword == null) {
13362
        sb.append("null");
13363
      } else {
13364
        sb.append(this.newPassword);
13365
      }
13366
      first = false;
582 rajveer 13367
      sb.append(")");
13368
      return sb.toString();
13369
    }
13370
 
13371
    public void validate() throws TException {
13372
      // check for required fields
13373
    }
13374
 
13375
  }
13376
 
13377
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13378
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13379
 
13380
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13381
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13382
 
13383
    private boolean success;
13384
    private UserContextException ucx;
13385
 
13386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13387
    public enum _Fields implements TFieldIdEnum {
13388
      SUCCESS((short)0, "success"),
13389
      UCX((short)1, "ucx");
13390
 
13391
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13392
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13393
 
13394
      static {
13395
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13396
          byId.put((int)field._thriftId, field);
13397
          byName.put(field.getFieldName(), field);
13398
        }
13399
      }
13400
 
13401
      /**
13402
       * Find the _Fields constant that matches fieldId, or null if its not found.
13403
       */
13404
      public static _Fields findByThriftId(int fieldId) {
13405
        return byId.get(fieldId);
13406
      }
13407
 
13408
      /**
13409
       * Find the _Fields constant that matches fieldId, throwing an exception
13410
       * if it is not found.
13411
       */
13412
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13413
        _Fields fields = findByThriftId(fieldId);
13414
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13415
        return fields;
13416
      }
13417
 
13418
      /**
13419
       * Find the _Fields constant that matches name, or null if its not found.
13420
       */
13421
      public static _Fields findByName(String name) {
13422
        return byName.get(name);
13423
      }
13424
 
13425
      private final short _thriftId;
13426
      private final String _fieldName;
13427
 
13428
      _Fields(short thriftId, String fieldName) {
13429
        _thriftId = thriftId;
13430
        _fieldName = fieldName;
13431
      }
13432
 
13433
      public short getThriftFieldId() {
13434
        return _thriftId;
13435
      }
13436
 
13437
      public String getFieldName() {
13438
        return _fieldName;
13439
      }
13440
    }
13441
 
13442
    // isset id assignments
13443
    private static final int __SUCCESS_ISSET_ID = 0;
13444
    private BitSet __isset_bit_vector = new BitSet(1);
13445
 
13446
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13447
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13448
          new FieldValueMetaData(TType.BOOL)));
13449
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13450
          new FieldValueMetaData(TType.STRUCT)));
13451
    }});
13452
 
13453
    static {
13454
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13455
    }
13456
 
13457
    public forgotPassword_result() {
13458
    }
13459
 
13460
    public forgotPassword_result(
13461
      boolean success,
13462
      UserContextException ucx)
13463
    {
13464
      this();
13465
      this.success = success;
13466
      setSuccessIsSet(true);
13467
      this.ucx = ucx;
13468
    }
13469
 
13470
    /**
13471
     * Performs a deep copy on <i>other</i>.
13472
     */
13473
    public forgotPassword_result(forgotPassword_result other) {
13474
      __isset_bit_vector.clear();
13475
      __isset_bit_vector.or(other.__isset_bit_vector);
13476
      this.success = other.success;
13477
      if (other.isSetUcx()) {
13478
        this.ucx = new UserContextException(other.ucx);
13479
      }
13480
    }
13481
 
13482
    public forgotPassword_result deepCopy() {
13483
      return new forgotPassword_result(this);
13484
    }
13485
 
13486
    @Deprecated
13487
    public forgotPassword_result clone() {
13488
      return new forgotPassword_result(this);
13489
    }
13490
 
13491
    public boolean isSuccess() {
13492
      return this.success;
13493
    }
13494
 
13495
    public forgotPassword_result setSuccess(boolean success) {
13496
      this.success = success;
13497
      setSuccessIsSet(true);
13498
      return this;
13499
    }
13500
 
13501
    public void unsetSuccess() {
13502
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13503
    }
13504
 
13505
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13506
    public boolean isSetSuccess() {
13507
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13508
    }
13509
 
13510
    public void setSuccessIsSet(boolean value) {
13511
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13512
    }
13513
 
13514
    public UserContextException getUcx() {
13515
      return this.ucx;
13516
    }
13517
 
13518
    public forgotPassword_result setUcx(UserContextException ucx) {
13519
      this.ucx = ucx;
13520
      return this;
13521
    }
13522
 
13523
    public void unsetUcx() {
13524
      this.ucx = null;
13525
    }
13526
 
13527
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13528
    public boolean isSetUcx() {
13529
      return this.ucx != null;
13530
    }
13531
 
13532
    public void setUcxIsSet(boolean value) {
13533
      if (!value) {
13534
        this.ucx = null;
13535
      }
13536
    }
13537
 
13538
    public void setFieldValue(_Fields field, Object value) {
13539
      switch (field) {
13540
      case SUCCESS:
13541
        if (value == null) {
13542
          unsetSuccess();
13543
        } else {
13544
          setSuccess((Boolean)value);
13545
        }
13546
        break;
13547
 
13548
      case UCX:
13549
        if (value == null) {
13550
          unsetUcx();
13551
        } else {
13552
          setUcx((UserContextException)value);
13553
        }
13554
        break;
13555
 
13556
      }
13557
    }
13558
 
13559
    public void setFieldValue(int fieldID, Object value) {
13560
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13561
    }
13562
 
13563
    public Object getFieldValue(_Fields field) {
13564
      switch (field) {
13565
      case SUCCESS:
13566
        return new Boolean(isSuccess());
13567
 
13568
      case UCX:
13569
        return getUcx();
13570
 
13571
      }
13572
      throw new IllegalStateException();
13573
    }
13574
 
13575
    public Object getFieldValue(int fieldId) {
13576
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13577
    }
13578
 
13579
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13580
    public boolean isSet(_Fields field) {
13581
      switch (field) {
13582
      case SUCCESS:
13583
        return isSetSuccess();
13584
      case UCX:
13585
        return isSetUcx();
13586
      }
13587
      throw new IllegalStateException();
13588
    }
13589
 
13590
    public boolean isSet(int fieldID) {
13591
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13592
    }
13593
 
13594
    @Override
13595
    public boolean equals(Object that) {
13596
      if (that == null)
13597
        return false;
13598
      if (that instanceof forgotPassword_result)
13599
        return this.equals((forgotPassword_result)that);
13600
      return false;
13601
    }
13602
 
13603
    public boolean equals(forgotPassword_result that) {
13604
      if (that == null)
13605
        return false;
13606
 
13607
      boolean this_present_success = true;
13608
      boolean that_present_success = true;
13609
      if (this_present_success || that_present_success) {
13610
        if (!(this_present_success && that_present_success))
13611
          return false;
13612
        if (this.success != that.success)
13613
          return false;
13614
      }
13615
 
13616
      boolean this_present_ucx = true && this.isSetUcx();
13617
      boolean that_present_ucx = true && that.isSetUcx();
13618
      if (this_present_ucx || that_present_ucx) {
13619
        if (!(this_present_ucx && that_present_ucx))
13620
          return false;
13621
        if (!this.ucx.equals(that.ucx))
13622
          return false;
13623
      }
13624
 
13625
      return true;
13626
    }
13627
 
13628
    @Override
13629
    public int hashCode() {
13630
      return 0;
13631
    }
13632
 
13633
    public int compareTo(forgotPassword_result other) {
13634
      if (!getClass().equals(other.getClass())) {
13635
        return getClass().getName().compareTo(other.getClass().getName());
13636
      }
13637
 
13638
      int lastComparison = 0;
13639
      forgotPassword_result typedOther = (forgotPassword_result)other;
13640
 
13641
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13642
      if (lastComparison != 0) {
13643
        return lastComparison;
13644
      }
13645
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13646
      if (lastComparison != 0) {
13647
        return lastComparison;
13648
      }
13649
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13650
      if (lastComparison != 0) {
13651
        return lastComparison;
13652
      }
13653
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13654
      if (lastComparison != 0) {
13655
        return lastComparison;
13656
      }
13657
      return 0;
13658
    }
13659
 
13660
    public void read(TProtocol iprot) throws TException {
13661
      TField field;
13662
      iprot.readStructBegin();
13663
      while (true)
13664
      {
13665
        field = iprot.readFieldBegin();
13666
        if (field.type == TType.STOP) { 
13667
          break;
13668
        }
13669
        _Fields fieldId = _Fields.findByThriftId(field.id);
13670
        if (fieldId == null) {
13671
          TProtocolUtil.skip(iprot, field.type);
13672
        } else {
13673
          switch (fieldId) {
13674
            case SUCCESS:
13675
              if (field.type == TType.BOOL) {
13676
                this.success = iprot.readBool();
13677
                setSuccessIsSet(true);
13678
              } else { 
13679
                TProtocolUtil.skip(iprot, field.type);
13680
              }
13681
              break;
13682
            case UCX:
13683
              if (field.type == TType.STRUCT) {
13684
                this.ucx = new UserContextException();
13685
                this.ucx.read(iprot);
13686
              } else { 
13687
                TProtocolUtil.skip(iprot, field.type);
13688
              }
13689
              break;
13690
          }
13691
          iprot.readFieldEnd();
13692
        }
13693
      }
13694
      iprot.readStructEnd();
13695
      validate();
13696
    }
13697
 
13698
    public void write(TProtocol oprot) throws TException {
13699
      oprot.writeStructBegin(STRUCT_DESC);
13700
 
13701
      if (this.isSetSuccess()) {
13702
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13703
        oprot.writeBool(this.success);
13704
        oprot.writeFieldEnd();
13705
      } else if (this.isSetUcx()) {
13706
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13707
        this.ucx.write(oprot);
13708
        oprot.writeFieldEnd();
13709
      }
13710
      oprot.writeFieldStop();
13711
      oprot.writeStructEnd();
13712
    }
13713
 
13714
    @Override
13715
    public String toString() {
13716
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13717
      boolean first = true;
13718
 
13719
      sb.append("success:");
13720
      sb.append(this.success);
13721
      first = false;
13722
      if (!first) sb.append(", ");
13723
      sb.append("ucx:");
13724
      if (this.ucx == null) {
13725
        sb.append("null");
13726
      } else {
13727
        sb.append(this.ucx);
13728
      }
13729
      first = false;
13730
      sb.append(")");
13731
      return sb.toString();
13732
    }
13733
 
13734
    public void validate() throws TException {
13735
      // check for required fields
13736
    }
13737
 
13738
  }
13739
 
593 rajveer 13740
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
13741
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
13742
 
13743
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
13744
 
13745
    private long userId;
13746
 
13747
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13748
    public enum _Fields implements TFieldIdEnum {
13749
      USER_ID((short)1, "userId");
13750
 
13751
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13752
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13753
 
13754
      static {
13755
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13756
          byId.put((int)field._thriftId, field);
13757
          byName.put(field.getFieldName(), field);
13758
        }
13759
      }
13760
 
13761
      /**
13762
       * Find the _Fields constant that matches fieldId, or null if its not found.
13763
       */
13764
      public static _Fields findByThriftId(int fieldId) {
13765
        return byId.get(fieldId);
13766
      }
13767
 
13768
      /**
13769
       * Find the _Fields constant that matches fieldId, throwing an exception
13770
       * if it is not found.
13771
       */
13772
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13773
        _Fields fields = findByThriftId(fieldId);
13774
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13775
        return fields;
13776
      }
13777
 
13778
      /**
13779
       * Find the _Fields constant that matches name, or null if its not found.
13780
       */
13781
      public static _Fields findByName(String name) {
13782
        return byName.get(name);
13783
      }
13784
 
13785
      private final short _thriftId;
13786
      private final String _fieldName;
13787
 
13788
      _Fields(short thriftId, String fieldName) {
13789
        _thriftId = thriftId;
13790
        _fieldName = fieldName;
13791
      }
13792
 
13793
      public short getThriftFieldId() {
13794
        return _thriftId;
13795
      }
13796
 
13797
      public String getFieldName() {
13798
        return _fieldName;
13799
      }
13800
    }
13801
 
13802
    // isset id assignments
13803
    private static final int __USERID_ISSET_ID = 0;
13804
    private BitSet __isset_bit_vector = new BitSet(1);
13805
 
13806
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13807
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
13808
          new FieldValueMetaData(TType.I64)));
13809
    }});
13810
 
13811
    static {
13812
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
13813
    }
13814
 
13815
    public getAllAddressesForUser_args() {
13816
    }
13817
 
13818
    public getAllAddressesForUser_args(
13819
      long userId)
13820
    {
13821
      this();
13822
      this.userId = userId;
13823
      setUserIdIsSet(true);
13824
    }
13825
 
13826
    /**
13827
     * Performs a deep copy on <i>other</i>.
13828
     */
13829
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
13830
      __isset_bit_vector.clear();
13831
      __isset_bit_vector.or(other.__isset_bit_vector);
13832
      this.userId = other.userId;
13833
    }
13834
 
13835
    public getAllAddressesForUser_args deepCopy() {
13836
      return new getAllAddressesForUser_args(this);
13837
    }
13838
 
13839
    @Deprecated
13840
    public getAllAddressesForUser_args clone() {
13841
      return new getAllAddressesForUser_args(this);
13842
    }
13843
 
13844
    public long getUserId() {
13845
      return this.userId;
13846
    }
13847
 
13848
    public getAllAddressesForUser_args setUserId(long userId) {
13849
      this.userId = userId;
13850
      setUserIdIsSet(true);
13851
      return this;
13852
    }
13853
 
13854
    public void unsetUserId() {
13855
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13856
    }
13857
 
13858
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13859
    public boolean isSetUserId() {
13860
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13861
    }
13862
 
13863
    public void setUserIdIsSet(boolean value) {
13864
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13865
    }
13866
 
13867
    public void setFieldValue(_Fields field, Object value) {
13868
      switch (field) {
13869
      case USER_ID:
13870
        if (value == null) {
13871
          unsetUserId();
13872
        } else {
13873
          setUserId((Long)value);
13874
        }
13875
        break;
13876
 
13877
      }
13878
    }
13879
 
13880
    public void setFieldValue(int fieldID, Object value) {
13881
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13882
    }
13883
 
13884
    public Object getFieldValue(_Fields field) {
13885
      switch (field) {
13886
      case USER_ID:
13887
        return new Long(getUserId());
13888
 
13889
      }
13890
      throw new IllegalStateException();
13891
    }
13892
 
13893
    public Object getFieldValue(int fieldId) {
13894
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13895
    }
13896
 
13897
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13898
    public boolean isSet(_Fields field) {
13899
      switch (field) {
13900
      case USER_ID:
13901
        return isSetUserId();
13902
      }
13903
      throw new IllegalStateException();
13904
    }
13905
 
13906
    public boolean isSet(int fieldID) {
13907
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13908
    }
13909
 
13910
    @Override
13911
    public boolean equals(Object that) {
13912
      if (that == null)
13913
        return false;
13914
      if (that instanceof getAllAddressesForUser_args)
13915
        return this.equals((getAllAddressesForUser_args)that);
13916
      return false;
13917
    }
13918
 
13919
    public boolean equals(getAllAddressesForUser_args that) {
13920
      if (that == null)
13921
        return false;
13922
 
13923
      boolean this_present_userId = true;
13924
      boolean that_present_userId = true;
13925
      if (this_present_userId || that_present_userId) {
13926
        if (!(this_present_userId && that_present_userId))
13927
          return false;
13928
        if (this.userId != that.userId)
13929
          return false;
13930
      }
13931
 
13932
      return true;
13933
    }
13934
 
13935
    @Override
13936
    public int hashCode() {
13937
      return 0;
13938
    }
13939
 
13940
    public int compareTo(getAllAddressesForUser_args other) {
13941
      if (!getClass().equals(other.getClass())) {
13942
        return getClass().getName().compareTo(other.getClass().getName());
13943
      }
13944
 
13945
      int lastComparison = 0;
13946
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
13947
 
13948
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
13949
      if (lastComparison != 0) {
13950
        return lastComparison;
13951
      }
13952
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
13953
      if (lastComparison != 0) {
13954
        return lastComparison;
13955
      }
13956
      return 0;
13957
    }
13958
 
13959
    public void read(TProtocol iprot) throws TException {
13960
      TField field;
13961
      iprot.readStructBegin();
13962
      while (true)
13963
      {
13964
        field = iprot.readFieldBegin();
13965
        if (field.type == TType.STOP) { 
13966
          break;
13967
        }
13968
        _Fields fieldId = _Fields.findByThriftId(field.id);
13969
        if (fieldId == null) {
13970
          TProtocolUtil.skip(iprot, field.type);
13971
        } else {
13972
          switch (fieldId) {
13973
            case USER_ID:
13974
              if (field.type == TType.I64) {
13975
                this.userId = iprot.readI64();
13976
                setUserIdIsSet(true);
13977
              } else { 
13978
                TProtocolUtil.skip(iprot, field.type);
13979
              }
13980
              break;
13981
          }
13982
          iprot.readFieldEnd();
13983
        }
13984
      }
13985
      iprot.readStructEnd();
13986
      validate();
13987
    }
13988
 
13989
    public void write(TProtocol oprot) throws TException {
13990
      validate();
13991
 
13992
      oprot.writeStructBegin(STRUCT_DESC);
13993
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13994
      oprot.writeI64(this.userId);
13995
      oprot.writeFieldEnd();
13996
      oprot.writeFieldStop();
13997
      oprot.writeStructEnd();
13998
    }
13999
 
14000
    @Override
14001
    public String toString() {
14002
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
14003
      boolean first = true;
14004
 
14005
      sb.append("userId:");
14006
      sb.append(this.userId);
14007
      first = false;
14008
      sb.append(")");
14009
      return sb.toString();
14010
    }
14011
 
14012
    public void validate() throws TException {
14013
      // check for required fields
14014
    }
14015
 
14016
  }
14017
 
14018
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
14019
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
14020
 
14021
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14022
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14023
 
14024
    private List<Address> success;
14025
    private UserContextException ucx;
14026
 
14027
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14028
    public enum _Fields implements TFieldIdEnum {
14029
      SUCCESS((short)0, "success"),
14030
      UCX((short)1, "ucx");
14031
 
14032
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14033
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14034
 
14035
      static {
14036
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14037
          byId.put((int)field._thriftId, field);
14038
          byName.put(field.getFieldName(), field);
14039
        }
14040
      }
14041
 
14042
      /**
14043
       * Find the _Fields constant that matches fieldId, or null if its not found.
14044
       */
14045
      public static _Fields findByThriftId(int fieldId) {
14046
        return byId.get(fieldId);
14047
      }
14048
 
14049
      /**
14050
       * Find the _Fields constant that matches fieldId, throwing an exception
14051
       * if it is not found.
14052
       */
14053
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14054
        _Fields fields = findByThriftId(fieldId);
14055
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14056
        return fields;
14057
      }
14058
 
14059
      /**
14060
       * Find the _Fields constant that matches name, or null if its not found.
14061
       */
14062
      public static _Fields findByName(String name) {
14063
        return byName.get(name);
14064
      }
14065
 
14066
      private final short _thriftId;
14067
      private final String _fieldName;
14068
 
14069
      _Fields(short thriftId, String fieldName) {
14070
        _thriftId = thriftId;
14071
        _fieldName = fieldName;
14072
      }
14073
 
14074
      public short getThriftFieldId() {
14075
        return _thriftId;
14076
      }
14077
 
14078
      public String getFieldName() {
14079
        return _fieldName;
14080
      }
14081
    }
14082
 
14083
    // isset id assignments
14084
 
14085
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14086
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14087
          new ListMetaData(TType.LIST, 
14088
              new StructMetaData(TType.STRUCT, Address.class))));
14089
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14090
          new FieldValueMetaData(TType.STRUCT)));
14091
    }});
14092
 
14093
    static {
14094
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
14095
    }
14096
 
14097
    public getAllAddressesForUser_result() {
14098
    }
14099
 
14100
    public getAllAddressesForUser_result(
14101
      List<Address> success,
14102
      UserContextException ucx)
14103
    {
14104
      this();
14105
      this.success = success;
14106
      this.ucx = ucx;
14107
    }
14108
 
14109
    /**
14110
     * Performs a deep copy on <i>other</i>.
14111
     */
14112
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
14113
      if (other.isSetSuccess()) {
14114
        List<Address> __this__success = new ArrayList<Address>();
14115
        for (Address other_element : other.success) {
14116
          __this__success.add(new Address(other_element));
14117
        }
14118
        this.success = __this__success;
14119
      }
14120
      if (other.isSetUcx()) {
14121
        this.ucx = new UserContextException(other.ucx);
14122
      }
14123
    }
14124
 
14125
    public getAllAddressesForUser_result deepCopy() {
14126
      return new getAllAddressesForUser_result(this);
14127
    }
14128
 
14129
    @Deprecated
14130
    public getAllAddressesForUser_result clone() {
14131
      return new getAllAddressesForUser_result(this);
14132
    }
14133
 
14134
    public int getSuccessSize() {
14135
      return (this.success == null) ? 0 : this.success.size();
14136
    }
14137
 
14138
    public java.util.Iterator<Address> getSuccessIterator() {
14139
      return (this.success == null) ? null : this.success.iterator();
14140
    }
14141
 
14142
    public void addToSuccess(Address elem) {
14143
      if (this.success == null) {
14144
        this.success = new ArrayList<Address>();
14145
      }
14146
      this.success.add(elem);
14147
    }
14148
 
14149
    public List<Address> getSuccess() {
14150
      return this.success;
14151
    }
14152
 
14153
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14154
      this.success = success;
14155
      return this;
14156
    }
14157
 
14158
    public void unsetSuccess() {
14159
      this.success = null;
14160
    }
14161
 
14162
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14163
    public boolean isSetSuccess() {
14164
      return this.success != null;
14165
    }
14166
 
14167
    public void setSuccessIsSet(boolean value) {
14168
      if (!value) {
14169
        this.success = null;
14170
      }
14171
    }
14172
 
14173
    public UserContextException getUcx() {
14174
      return this.ucx;
14175
    }
14176
 
14177
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14178
      this.ucx = ucx;
14179
      return this;
14180
    }
14181
 
14182
    public void unsetUcx() {
14183
      this.ucx = null;
14184
    }
14185
 
14186
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14187
    public boolean isSetUcx() {
14188
      return this.ucx != null;
14189
    }
14190
 
14191
    public void setUcxIsSet(boolean value) {
14192
      if (!value) {
14193
        this.ucx = null;
14194
      }
14195
    }
14196
 
14197
    public void setFieldValue(_Fields field, Object value) {
14198
      switch (field) {
14199
      case SUCCESS:
14200
        if (value == null) {
14201
          unsetSuccess();
14202
        } else {
14203
          setSuccess((List<Address>)value);
14204
        }
14205
        break;
14206
 
14207
      case UCX:
14208
        if (value == null) {
14209
          unsetUcx();
14210
        } else {
14211
          setUcx((UserContextException)value);
14212
        }
14213
        break;
14214
 
14215
      }
14216
    }
14217
 
14218
    public void setFieldValue(int fieldID, Object value) {
14219
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14220
    }
14221
 
14222
    public Object getFieldValue(_Fields field) {
14223
      switch (field) {
14224
      case SUCCESS:
14225
        return getSuccess();
14226
 
14227
      case UCX:
14228
        return getUcx();
14229
 
14230
      }
14231
      throw new IllegalStateException();
14232
    }
14233
 
14234
    public Object getFieldValue(int fieldId) {
14235
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14236
    }
14237
 
14238
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14239
    public boolean isSet(_Fields field) {
14240
      switch (field) {
14241
      case SUCCESS:
14242
        return isSetSuccess();
14243
      case UCX:
14244
        return isSetUcx();
14245
      }
14246
      throw new IllegalStateException();
14247
    }
14248
 
14249
    public boolean isSet(int fieldID) {
14250
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14251
    }
14252
 
14253
    @Override
14254
    public boolean equals(Object that) {
14255
      if (that == null)
14256
        return false;
14257
      if (that instanceof getAllAddressesForUser_result)
14258
        return this.equals((getAllAddressesForUser_result)that);
14259
      return false;
14260
    }
14261
 
14262
    public boolean equals(getAllAddressesForUser_result that) {
14263
      if (that == null)
14264
        return false;
14265
 
14266
      boolean this_present_success = true && this.isSetSuccess();
14267
      boolean that_present_success = true && that.isSetSuccess();
14268
      if (this_present_success || that_present_success) {
14269
        if (!(this_present_success && that_present_success))
14270
          return false;
14271
        if (!this.success.equals(that.success))
14272
          return false;
14273
      }
14274
 
14275
      boolean this_present_ucx = true && this.isSetUcx();
14276
      boolean that_present_ucx = true && that.isSetUcx();
14277
      if (this_present_ucx || that_present_ucx) {
14278
        if (!(this_present_ucx && that_present_ucx))
14279
          return false;
14280
        if (!this.ucx.equals(that.ucx))
14281
          return false;
14282
      }
14283
 
14284
      return true;
14285
    }
14286
 
14287
    @Override
14288
    public int hashCode() {
14289
      return 0;
14290
    }
14291
 
14292
    public int compareTo(getAllAddressesForUser_result other) {
14293
      if (!getClass().equals(other.getClass())) {
14294
        return getClass().getName().compareTo(other.getClass().getName());
14295
      }
14296
 
14297
      int lastComparison = 0;
14298
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14299
 
14300
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14301
      if (lastComparison != 0) {
14302
        return lastComparison;
14303
      }
14304
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14305
      if (lastComparison != 0) {
14306
        return lastComparison;
14307
      }
14308
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14309
      if (lastComparison != 0) {
14310
        return lastComparison;
14311
      }
14312
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14313
      if (lastComparison != 0) {
14314
        return lastComparison;
14315
      }
14316
      return 0;
14317
    }
14318
 
14319
    public void read(TProtocol iprot) throws TException {
14320
      TField field;
14321
      iprot.readStructBegin();
14322
      while (true)
14323
      {
14324
        field = iprot.readFieldBegin();
14325
        if (field.type == TType.STOP) { 
14326
          break;
14327
        }
14328
        _Fields fieldId = _Fields.findByThriftId(field.id);
14329
        if (fieldId == null) {
14330
          TProtocolUtil.skip(iprot, field.type);
14331
        } else {
14332
          switch (fieldId) {
14333
            case SUCCESS:
14334
              if (field.type == TType.LIST) {
14335
                {
771 rajveer 14336
                  TList _list16 = iprot.readListBegin();
14337
                  this.success = new ArrayList<Address>(_list16.size);
14338
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 14339
                  {
771 rajveer 14340
                    Address _elem18;
14341
                    _elem18 = new Address();
14342
                    _elem18.read(iprot);
14343
                    this.success.add(_elem18);
593 rajveer 14344
                  }
14345
                  iprot.readListEnd();
14346
                }
14347
              } else { 
14348
                TProtocolUtil.skip(iprot, field.type);
14349
              }
14350
              break;
14351
            case UCX:
14352
              if (field.type == TType.STRUCT) {
14353
                this.ucx = new UserContextException();
14354
                this.ucx.read(iprot);
14355
              } else { 
14356
                TProtocolUtil.skip(iprot, field.type);
14357
              }
14358
              break;
14359
          }
14360
          iprot.readFieldEnd();
14361
        }
14362
      }
14363
      iprot.readStructEnd();
14364
      validate();
14365
    }
14366
 
14367
    public void write(TProtocol oprot) throws TException {
14368
      oprot.writeStructBegin(STRUCT_DESC);
14369
 
14370
      if (this.isSetSuccess()) {
14371
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14372
        {
14373
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 14374
          for (Address _iter19 : this.success)
593 rajveer 14375
          {
771 rajveer 14376
            _iter19.write(oprot);
593 rajveer 14377
          }
14378
          oprot.writeListEnd();
14379
        }
14380
        oprot.writeFieldEnd();
14381
      } else if (this.isSetUcx()) {
14382
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14383
        this.ucx.write(oprot);
14384
        oprot.writeFieldEnd();
14385
      }
14386
      oprot.writeFieldStop();
14387
      oprot.writeStructEnd();
14388
    }
14389
 
14390
    @Override
14391
    public String toString() {
14392
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14393
      boolean first = true;
14394
 
14395
      sb.append("success:");
14396
      if (this.success == null) {
14397
        sb.append("null");
14398
      } else {
14399
        sb.append(this.success);
14400
      }
14401
      first = false;
14402
      if (!first) sb.append(", ");
14403
      sb.append("ucx:");
14404
      if (this.ucx == null) {
14405
        sb.append("null");
14406
      } else {
14407
        sb.append(this.ucx);
14408
      }
14409
      first = false;
14410
      sb.append(")");
14411
      return sb.toString();
14412
    }
14413
 
14414
    public void validate() throws TException {
14415
      // check for required fields
14416
    }
14417
 
14418
  }
14419
 
14420
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14421
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14422
 
14423
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14424
 
14425
    private long userId;
14426
 
14427
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14428
    public enum _Fields implements TFieldIdEnum {
14429
      USER_ID((short)1, "userId");
14430
 
14431
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14432
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14433
 
14434
      static {
14435
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14436
          byId.put((int)field._thriftId, field);
14437
          byName.put(field.getFieldName(), field);
14438
        }
14439
      }
14440
 
14441
      /**
14442
       * Find the _Fields constant that matches fieldId, or null if its not found.
14443
       */
14444
      public static _Fields findByThriftId(int fieldId) {
14445
        return byId.get(fieldId);
14446
      }
14447
 
14448
      /**
14449
       * Find the _Fields constant that matches fieldId, throwing an exception
14450
       * if it is not found.
14451
       */
14452
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14453
        _Fields fields = findByThriftId(fieldId);
14454
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14455
        return fields;
14456
      }
14457
 
14458
      /**
14459
       * Find the _Fields constant that matches name, or null if its not found.
14460
       */
14461
      public static _Fields findByName(String name) {
14462
        return byName.get(name);
14463
      }
14464
 
14465
      private final short _thriftId;
14466
      private final String _fieldName;
14467
 
14468
      _Fields(short thriftId, String fieldName) {
14469
        _thriftId = thriftId;
14470
        _fieldName = fieldName;
14471
      }
14472
 
14473
      public short getThriftFieldId() {
14474
        return _thriftId;
14475
      }
14476
 
14477
      public String getFieldName() {
14478
        return _fieldName;
14479
      }
14480
    }
14481
 
14482
    // isset id assignments
14483
    private static final int __USERID_ISSET_ID = 0;
14484
    private BitSet __isset_bit_vector = new BitSet(1);
14485
 
14486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14487
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14488
          new FieldValueMetaData(TType.I64)));
14489
    }});
14490
 
14491
    static {
14492
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14493
    }
14494
 
14495
    public getDefaultAddressId_args() {
14496
    }
14497
 
14498
    public getDefaultAddressId_args(
14499
      long userId)
14500
    {
14501
      this();
14502
      this.userId = userId;
14503
      setUserIdIsSet(true);
14504
    }
14505
 
14506
    /**
14507
     * Performs a deep copy on <i>other</i>.
14508
     */
14509
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14510
      __isset_bit_vector.clear();
14511
      __isset_bit_vector.or(other.__isset_bit_vector);
14512
      this.userId = other.userId;
14513
    }
14514
 
14515
    public getDefaultAddressId_args deepCopy() {
14516
      return new getDefaultAddressId_args(this);
14517
    }
14518
 
14519
    @Deprecated
14520
    public getDefaultAddressId_args clone() {
14521
      return new getDefaultAddressId_args(this);
14522
    }
14523
 
14524
    public long getUserId() {
14525
      return this.userId;
14526
    }
14527
 
14528
    public getDefaultAddressId_args setUserId(long userId) {
14529
      this.userId = userId;
14530
      setUserIdIsSet(true);
14531
      return this;
14532
    }
14533
 
14534
    public void unsetUserId() {
14535
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14536
    }
14537
 
14538
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14539
    public boolean isSetUserId() {
14540
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14541
    }
14542
 
14543
    public void setUserIdIsSet(boolean value) {
14544
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14545
    }
14546
 
14547
    public void setFieldValue(_Fields field, Object value) {
14548
      switch (field) {
14549
      case USER_ID:
14550
        if (value == null) {
14551
          unsetUserId();
14552
        } else {
14553
          setUserId((Long)value);
14554
        }
14555
        break;
14556
 
14557
      }
14558
    }
14559
 
14560
    public void setFieldValue(int fieldID, Object value) {
14561
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14562
    }
14563
 
14564
    public Object getFieldValue(_Fields field) {
14565
      switch (field) {
14566
      case USER_ID:
14567
        return new Long(getUserId());
14568
 
14569
      }
14570
      throw new IllegalStateException();
14571
    }
14572
 
14573
    public Object getFieldValue(int fieldId) {
14574
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14575
    }
14576
 
14577
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14578
    public boolean isSet(_Fields field) {
14579
      switch (field) {
14580
      case USER_ID:
14581
        return isSetUserId();
14582
      }
14583
      throw new IllegalStateException();
14584
    }
14585
 
14586
    public boolean isSet(int fieldID) {
14587
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14588
    }
14589
 
14590
    @Override
14591
    public boolean equals(Object that) {
14592
      if (that == null)
14593
        return false;
14594
      if (that instanceof getDefaultAddressId_args)
14595
        return this.equals((getDefaultAddressId_args)that);
14596
      return false;
14597
    }
14598
 
14599
    public boolean equals(getDefaultAddressId_args that) {
14600
      if (that == null)
14601
        return false;
14602
 
14603
      boolean this_present_userId = true;
14604
      boolean that_present_userId = true;
14605
      if (this_present_userId || that_present_userId) {
14606
        if (!(this_present_userId && that_present_userId))
14607
          return false;
14608
        if (this.userId != that.userId)
14609
          return false;
14610
      }
14611
 
14612
      return true;
14613
    }
14614
 
14615
    @Override
14616
    public int hashCode() {
14617
      return 0;
14618
    }
14619
 
14620
    public int compareTo(getDefaultAddressId_args other) {
14621
      if (!getClass().equals(other.getClass())) {
14622
        return getClass().getName().compareTo(other.getClass().getName());
14623
      }
14624
 
14625
      int lastComparison = 0;
14626
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14627
 
14628
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14629
      if (lastComparison != 0) {
14630
        return lastComparison;
14631
      }
14632
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14633
      if (lastComparison != 0) {
14634
        return lastComparison;
14635
      }
14636
      return 0;
14637
    }
14638
 
14639
    public void read(TProtocol iprot) throws TException {
14640
      TField field;
14641
      iprot.readStructBegin();
14642
      while (true)
14643
      {
14644
        field = iprot.readFieldBegin();
14645
        if (field.type == TType.STOP) { 
14646
          break;
14647
        }
14648
        _Fields fieldId = _Fields.findByThriftId(field.id);
14649
        if (fieldId == null) {
14650
          TProtocolUtil.skip(iprot, field.type);
14651
        } else {
14652
          switch (fieldId) {
14653
            case USER_ID:
14654
              if (field.type == TType.I64) {
14655
                this.userId = iprot.readI64();
14656
                setUserIdIsSet(true);
14657
              } else { 
14658
                TProtocolUtil.skip(iprot, field.type);
14659
              }
14660
              break;
14661
          }
14662
          iprot.readFieldEnd();
14663
        }
14664
      }
14665
      iprot.readStructEnd();
14666
      validate();
14667
    }
14668
 
14669
    public void write(TProtocol oprot) throws TException {
14670
      validate();
14671
 
14672
      oprot.writeStructBegin(STRUCT_DESC);
14673
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14674
      oprot.writeI64(this.userId);
14675
      oprot.writeFieldEnd();
14676
      oprot.writeFieldStop();
14677
      oprot.writeStructEnd();
14678
    }
14679
 
14680
    @Override
14681
    public String toString() {
14682
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14683
      boolean first = true;
14684
 
14685
      sb.append("userId:");
14686
      sb.append(this.userId);
14687
      first = false;
14688
      sb.append(")");
14689
      return sb.toString();
14690
    }
14691
 
14692
    public void validate() throws TException {
14693
      // check for required fields
14694
    }
14695
 
14696
  }
14697
 
14698
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
14699
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
14700
 
14701
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
14702
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14703
 
14704
    private long success;
14705
    private UserContextException ucx;
14706
 
14707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14708
    public enum _Fields implements TFieldIdEnum {
14709
      SUCCESS((short)0, "success"),
14710
      UCX((short)1, "ucx");
14711
 
14712
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14713
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14714
 
14715
      static {
14716
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14717
          byId.put((int)field._thriftId, field);
14718
          byName.put(field.getFieldName(), field);
14719
        }
14720
      }
14721
 
14722
      /**
14723
       * Find the _Fields constant that matches fieldId, or null if its not found.
14724
       */
14725
      public static _Fields findByThriftId(int fieldId) {
14726
        return byId.get(fieldId);
14727
      }
14728
 
14729
      /**
14730
       * Find the _Fields constant that matches fieldId, throwing an exception
14731
       * if it is not found.
14732
       */
14733
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14734
        _Fields fields = findByThriftId(fieldId);
14735
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14736
        return fields;
14737
      }
14738
 
14739
      /**
14740
       * Find the _Fields constant that matches name, or null if its not found.
14741
       */
14742
      public static _Fields findByName(String name) {
14743
        return byName.get(name);
14744
      }
14745
 
14746
      private final short _thriftId;
14747
      private final String _fieldName;
14748
 
14749
      _Fields(short thriftId, String fieldName) {
14750
        _thriftId = thriftId;
14751
        _fieldName = fieldName;
14752
      }
14753
 
14754
      public short getThriftFieldId() {
14755
        return _thriftId;
14756
      }
14757
 
14758
      public String getFieldName() {
14759
        return _fieldName;
14760
      }
14761
    }
14762
 
14763
    // isset id assignments
14764
    private static final int __SUCCESS_ISSET_ID = 0;
14765
    private BitSet __isset_bit_vector = new BitSet(1);
14766
 
14767
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14768
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14769
          new FieldValueMetaData(TType.I64)));
14770
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14771
          new FieldValueMetaData(TType.STRUCT)));
14772
    }});
14773
 
14774
    static {
14775
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
14776
    }
14777
 
14778
    public getDefaultAddressId_result() {
14779
    }
14780
 
14781
    public getDefaultAddressId_result(
14782
      long success,
14783
      UserContextException ucx)
14784
    {
14785
      this();
14786
      this.success = success;
14787
      setSuccessIsSet(true);
14788
      this.ucx = ucx;
14789
    }
14790
 
14791
    /**
14792
     * Performs a deep copy on <i>other</i>.
14793
     */
14794
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
14795
      __isset_bit_vector.clear();
14796
      __isset_bit_vector.or(other.__isset_bit_vector);
14797
      this.success = other.success;
14798
      if (other.isSetUcx()) {
14799
        this.ucx = new UserContextException(other.ucx);
14800
      }
14801
    }
14802
 
14803
    public getDefaultAddressId_result deepCopy() {
14804
      return new getDefaultAddressId_result(this);
14805
    }
14806
 
14807
    @Deprecated
14808
    public getDefaultAddressId_result clone() {
14809
      return new getDefaultAddressId_result(this);
14810
    }
14811
 
14812
    public long getSuccess() {
14813
      return this.success;
14814
    }
14815
 
14816
    public getDefaultAddressId_result setSuccess(long success) {
14817
      this.success = success;
14818
      setSuccessIsSet(true);
14819
      return this;
14820
    }
14821
 
14822
    public void unsetSuccess() {
14823
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14824
    }
14825
 
14826
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14827
    public boolean isSetSuccess() {
14828
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14829
    }
14830
 
14831
    public void setSuccessIsSet(boolean value) {
14832
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14833
    }
14834
 
14835
    public UserContextException getUcx() {
14836
      return this.ucx;
14837
    }
14838
 
14839
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
14840
      this.ucx = ucx;
14841
      return this;
14842
    }
14843
 
14844
    public void unsetUcx() {
14845
      this.ucx = null;
14846
    }
14847
 
14848
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14849
    public boolean isSetUcx() {
14850
      return this.ucx != null;
14851
    }
14852
 
14853
    public void setUcxIsSet(boolean value) {
14854
      if (!value) {
14855
        this.ucx = null;
14856
      }
14857
    }
14858
 
14859
    public void setFieldValue(_Fields field, Object value) {
14860
      switch (field) {
14861
      case SUCCESS:
14862
        if (value == null) {
14863
          unsetSuccess();
14864
        } else {
14865
          setSuccess((Long)value);
14866
        }
14867
        break;
14868
 
14869
      case UCX:
14870
        if (value == null) {
14871
          unsetUcx();
14872
        } else {
14873
          setUcx((UserContextException)value);
14874
        }
14875
        break;
14876
 
14877
      }
14878
    }
14879
 
14880
    public void setFieldValue(int fieldID, Object value) {
14881
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14882
    }
14883
 
14884
    public Object getFieldValue(_Fields field) {
14885
      switch (field) {
14886
      case SUCCESS:
14887
        return new Long(getSuccess());
14888
 
14889
      case UCX:
14890
        return getUcx();
14891
 
14892
      }
14893
      throw new IllegalStateException();
14894
    }
14895
 
14896
    public Object getFieldValue(int fieldId) {
14897
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14898
    }
14899
 
14900
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14901
    public boolean isSet(_Fields field) {
14902
      switch (field) {
14903
      case SUCCESS:
14904
        return isSetSuccess();
14905
      case UCX:
14906
        return isSetUcx();
14907
      }
14908
      throw new IllegalStateException();
14909
    }
14910
 
14911
    public boolean isSet(int fieldID) {
14912
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14913
    }
14914
 
14915
    @Override
14916
    public boolean equals(Object that) {
14917
      if (that == null)
14918
        return false;
14919
      if (that instanceof getDefaultAddressId_result)
14920
        return this.equals((getDefaultAddressId_result)that);
14921
      return false;
14922
    }
14923
 
14924
    public boolean equals(getDefaultAddressId_result that) {
14925
      if (that == null)
14926
        return false;
14927
 
14928
      boolean this_present_success = true;
14929
      boolean that_present_success = true;
14930
      if (this_present_success || that_present_success) {
14931
        if (!(this_present_success && that_present_success))
14932
          return false;
14933
        if (this.success != that.success)
14934
          return false;
14935
      }
14936
 
14937
      boolean this_present_ucx = true && this.isSetUcx();
14938
      boolean that_present_ucx = true && that.isSetUcx();
14939
      if (this_present_ucx || that_present_ucx) {
14940
        if (!(this_present_ucx && that_present_ucx))
14941
          return false;
14942
        if (!this.ucx.equals(that.ucx))
14943
          return false;
14944
      }
14945
 
14946
      return true;
14947
    }
14948
 
14949
    @Override
14950
    public int hashCode() {
14951
      return 0;
14952
    }
14953
 
14954
    public int compareTo(getDefaultAddressId_result other) {
14955
      if (!getClass().equals(other.getClass())) {
14956
        return getClass().getName().compareTo(other.getClass().getName());
14957
      }
14958
 
14959
      int lastComparison = 0;
14960
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
14961
 
14962
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14963
      if (lastComparison != 0) {
14964
        return lastComparison;
14965
      }
14966
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14967
      if (lastComparison != 0) {
14968
        return lastComparison;
14969
      }
14970
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14971
      if (lastComparison != 0) {
14972
        return lastComparison;
14973
      }
14974
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14975
      if (lastComparison != 0) {
14976
        return lastComparison;
14977
      }
14978
      return 0;
14979
    }
14980
 
14981
    public void read(TProtocol iprot) throws TException {
14982
      TField field;
14983
      iprot.readStructBegin();
14984
      while (true)
14985
      {
14986
        field = iprot.readFieldBegin();
14987
        if (field.type == TType.STOP) { 
14988
          break;
14989
        }
14990
        _Fields fieldId = _Fields.findByThriftId(field.id);
14991
        if (fieldId == null) {
14992
          TProtocolUtil.skip(iprot, field.type);
14993
        } else {
14994
          switch (fieldId) {
14995
            case SUCCESS:
14996
              if (field.type == TType.I64) {
14997
                this.success = iprot.readI64();
14998
                setSuccessIsSet(true);
14999
              } else { 
15000
                TProtocolUtil.skip(iprot, field.type);
15001
              }
15002
              break;
15003
            case UCX:
15004
              if (field.type == TType.STRUCT) {
15005
                this.ucx = new UserContextException();
15006
                this.ucx.read(iprot);
15007
              } else { 
15008
                TProtocolUtil.skip(iprot, field.type);
15009
              }
15010
              break;
15011
          }
15012
          iprot.readFieldEnd();
15013
        }
15014
      }
15015
      iprot.readStructEnd();
15016
      validate();
15017
    }
15018
 
15019
    public void write(TProtocol oprot) throws TException {
15020
      oprot.writeStructBegin(STRUCT_DESC);
15021
 
15022
      if (this.isSetSuccess()) {
15023
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15024
        oprot.writeI64(this.success);
15025
        oprot.writeFieldEnd();
15026
      } else if (this.isSetUcx()) {
15027
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15028
        this.ucx.write(oprot);
15029
        oprot.writeFieldEnd();
15030
      }
15031
      oprot.writeFieldStop();
15032
      oprot.writeStructEnd();
15033
    }
15034
 
15035
    @Override
15036
    public String toString() {
15037
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
15038
      boolean first = true;
15039
 
15040
      sb.append("success:");
15041
      sb.append(this.success);
15042
      first = false;
15043
      if (!first) sb.append(", ");
15044
      sb.append("ucx:");
15045
      if (this.ucx == null) {
15046
        sb.append("null");
15047
      } else {
15048
        sb.append(this.ucx);
15049
      }
15050
      first = false;
15051
      sb.append(")");
15052
      return sb.toString();
15053
    }
15054
 
15055
    public void validate() throws TException {
15056
      // check for required fields
15057
    }
15058
 
15059
  }
15060
 
784 rajveer 15061
  public static class getDefaultPincode_args implements TBase<getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_args>   {
15062
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_args");
15063
 
15064
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15065
 
15066
    private long userId;
15067
 
15068
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15069
    public enum _Fields implements TFieldIdEnum {
15070
      USER_ID((short)1, "userId");
15071
 
15072
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15073
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15074
 
15075
      static {
15076
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15077
          byId.put((int)field._thriftId, field);
15078
          byName.put(field.getFieldName(), field);
15079
        }
15080
      }
15081
 
15082
      /**
15083
       * Find the _Fields constant that matches fieldId, or null if its not found.
15084
       */
15085
      public static _Fields findByThriftId(int fieldId) {
15086
        return byId.get(fieldId);
15087
      }
15088
 
15089
      /**
15090
       * Find the _Fields constant that matches fieldId, throwing an exception
15091
       * if it is not found.
15092
       */
15093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15094
        _Fields fields = findByThriftId(fieldId);
15095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15096
        return fields;
15097
      }
15098
 
15099
      /**
15100
       * Find the _Fields constant that matches name, or null if its not found.
15101
       */
15102
      public static _Fields findByName(String name) {
15103
        return byName.get(name);
15104
      }
15105
 
15106
      private final short _thriftId;
15107
      private final String _fieldName;
15108
 
15109
      _Fields(short thriftId, String fieldName) {
15110
        _thriftId = thriftId;
15111
        _fieldName = fieldName;
15112
      }
15113
 
15114
      public short getThriftFieldId() {
15115
        return _thriftId;
15116
      }
15117
 
15118
      public String getFieldName() {
15119
        return _fieldName;
15120
      }
15121
    }
15122
 
15123
    // isset id assignments
15124
    private static final int __USERID_ISSET_ID = 0;
15125
    private BitSet __isset_bit_vector = new BitSet(1);
15126
 
15127
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15128
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15129
          new FieldValueMetaData(TType.I64)));
15130
    }});
15131
 
15132
    static {
15133
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
15134
    }
15135
 
15136
    public getDefaultPincode_args() {
15137
    }
15138
 
15139
    public getDefaultPincode_args(
15140
      long userId)
15141
    {
15142
      this();
15143
      this.userId = userId;
15144
      setUserIdIsSet(true);
15145
    }
15146
 
15147
    /**
15148
     * Performs a deep copy on <i>other</i>.
15149
     */
15150
    public getDefaultPincode_args(getDefaultPincode_args other) {
15151
      __isset_bit_vector.clear();
15152
      __isset_bit_vector.or(other.__isset_bit_vector);
15153
      this.userId = other.userId;
15154
    }
15155
 
15156
    public getDefaultPincode_args deepCopy() {
15157
      return new getDefaultPincode_args(this);
15158
    }
15159
 
15160
    @Deprecated
15161
    public getDefaultPincode_args clone() {
15162
      return new getDefaultPincode_args(this);
15163
    }
15164
 
15165
    public long getUserId() {
15166
      return this.userId;
15167
    }
15168
 
15169
    public getDefaultPincode_args setUserId(long userId) {
15170
      this.userId = userId;
15171
      setUserIdIsSet(true);
15172
      return this;
15173
    }
15174
 
15175
    public void unsetUserId() {
15176
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15177
    }
15178
 
15179
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15180
    public boolean isSetUserId() {
15181
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15182
    }
15183
 
15184
    public void setUserIdIsSet(boolean value) {
15185
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15186
    }
15187
 
15188
    public void setFieldValue(_Fields field, Object value) {
15189
      switch (field) {
15190
      case USER_ID:
15191
        if (value == null) {
15192
          unsetUserId();
15193
        } else {
15194
          setUserId((Long)value);
15195
        }
15196
        break;
15197
 
15198
      }
15199
    }
15200
 
15201
    public void setFieldValue(int fieldID, Object value) {
15202
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15203
    }
15204
 
15205
    public Object getFieldValue(_Fields field) {
15206
      switch (field) {
15207
      case USER_ID:
15208
        return new Long(getUserId());
15209
 
15210
      }
15211
      throw new IllegalStateException();
15212
    }
15213
 
15214
    public Object getFieldValue(int fieldId) {
15215
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15216
    }
15217
 
15218
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15219
    public boolean isSet(_Fields field) {
15220
      switch (field) {
15221
      case USER_ID:
15222
        return isSetUserId();
15223
      }
15224
      throw new IllegalStateException();
15225
    }
15226
 
15227
    public boolean isSet(int fieldID) {
15228
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15229
    }
15230
 
15231
    @Override
15232
    public boolean equals(Object that) {
15233
      if (that == null)
15234
        return false;
15235
      if (that instanceof getDefaultPincode_args)
15236
        return this.equals((getDefaultPincode_args)that);
15237
      return false;
15238
    }
15239
 
15240
    public boolean equals(getDefaultPincode_args that) {
15241
      if (that == null)
15242
        return false;
15243
 
15244
      boolean this_present_userId = true;
15245
      boolean that_present_userId = true;
15246
      if (this_present_userId || that_present_userId) {
15247
        if (!(this_present_userId && that_present_userId))
15248
          return false;
15249
        if (this.userId != that.userId)
15250
          return false;
15251
      }
15252
 
15253
      return true;
15254
    }
15255
 
15256
    @Override
15257
    public int hashCode() {
15258
      return 0;
15259
    }
15260
 
15261
    public int compareTo(getDefaultPincode_args other) {
15262
      if (!getClass().equals(other.getClass())) {
15263
        return getClass().getName().compareTo(other.getClass().getName());
15264
      }
15265
 
15266
      int lastComparison = 0;
15267
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;
15268
 
15269
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15270
      if (lastComparison != 0) {
15271
        return lastComparison;
15272
      }
15273
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15274
      if (lastComparison != 0) {
15275
        return lastComparison;
15276
      }
15277
      return 0;
15278
    }
15279
 
15280
    public void read(TProtocol iprot) throws TException {
15281
      TField field;
15282
      iprot.readStructBegin();
15283
      while (true)
15284
      {
15285
        field = iprot.readFieldBegin();
15286
        if (field.type == TType.STOP) { 
15287
          break;
15288
        }
15289
        _Fields fieldId = _Fields.findByThriftId(field.id);
15290
        if (fieldId == null) {
15291
          TProtocolUtil.skip(iprot, field.type);
15292
        } else {
15293
          switch (fieldId) {
15294
            case USER_ID:
15295
              if (field.type == TType.I64) {
15296
                this.userId = iprot.readI64();
15297
                setUserIdIsSet(true);
15298
              } else { 
15299
                TProtocolUtil.skip(iprot, field.type);
15300
              }
15301
              break;
15302
          }
15303
          iprot.readFieldEnd();
15304
        }
15305
      }
15306
      iprot.readStructEnd();
15307
      validate();
15308
    }
15309
 
15310
    public void write(TProtocol oprot) throws TException {
15311
      validate();
15312
 
15313
      oprot.writeStructBegin(STRUCT_DESC);
15314
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15315
      oprot.writeI64(this.userId);
15316
      oprot.writeFieldEnd();
15317
      oprot.writeFieldStop();
15318
      oprot.writeStructEnd();
15319
    }
15320
 
15321
    @Override
15322
    public String toString() {
15323
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
15324
      boolean first = true;
15325
 
15326
      sb.append("userId:");
15327
      sb.append(this.userId);
15328
      first = false;
15329
      sb.append(")");
15330
      return sb.toString();
15331
    }
15332
 
15333
    public void validate() throws TException {
15334
      // check for required fields
15335
    }
15336
 
15337
  }
15338
 
15339
  public static class getDefaultPincode_result implements TBase<getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_result>   {
15340
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_result");
15341
 
15342
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
15343
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15344
 
15345
    private String success;
15346
    private UserContextException ucx;
15347
 
15348
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15349
    public enum _Fields implements TFieldIdEnum {
15350
      SUCCESS((short)0, "success"),
15351
      UCX((short)1, "ucx");
15352
 
15353
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15354
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15355
 
15356
      static {
15357
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15358
          byId.put((int)field._thriftId, field);
15359
          byName.put(field.getFieldName(), field);
15360
        }
15361
      }
15362
 
15363
      /**
15364
       * Find the _Fields constant that matches fieldId, or null if its not found.
15365
       */
15366
      public static _Fields findByThriftId(int fieldId) {
15367
        return byId.get(fieldId);
15368
      }
15369
 
15370
      /**
15371
       * Find the _Fields constant that matches fieldId, throwing an exception
15372
       * if it is not found.
15373
       */
15374
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15375
        _Fields fields = findByThriftId(fieldId);
15376
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15377
        return fields;
15378
      }
15379
 
15380
      /**
15381
       * Find the _Fields constant that matches name, or null if its not found.
15382
       */
15383
      public static _Fields findByName(String name) {
15384
        return byName.get(name);
15385
      }
15386
 
15387
      private final short _thriftId;
15388
      private final String _fieldName;
15389
 
15390
      _Fields(short thriftId, String fieldName) {
15391
        _thriftId = thriftId;
15392
        _fieldName = fieldName;
15393
      }
15394
 
15395
      public short getThriftFieldId() {
15396
        return _thriftId;
15397
      }
15398
 
15399
      public String getFieldName() {
15400
        return _fieldName;
15401
      }
15402
    }
15403
 
15404
    // isset id assignments
15405
 
15406
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15407
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15408
          new FieldValueMetaData(TType.STRING)));
15409
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15410
          new FieldValueMetaData(TType.STRUCT)));
15411
    }});
15412
 
15413
    static {
15414
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
15415
    }
15416
 
15417
    public getDefaultPincode_result() {
15418
    }
15419
 
15420
    public getDefaultPincode_result(
15421
      String success,
15422
      UserContextException ucx)
15423
    {
15424
      this();
15425
      this.success = success;
15426
      this.ucx = ucx;
15427
    }
15428
 
15429
    /**
15430
     * Performs a deep copy on <i>other</i>.
15431
     */
15432
    public getDefaultPincode_result(getDefaultPincode_result other) {
15433
      if (other.isSetSuccess()) {
15434
        this.success = other.success;
15435
      }
15436
      if (other.isSetUcx()) {
15437
        this.ucx = new UserContextException(other.ucx);
15438
      }
15439
    }
15440
 
15441
    public getDefaultPincode_result deepCopy() {
15442
      return new getDefaultPincode_result(this);
15443
    }
15444
 
15445
    @Deprecated
15446
    public getDefaultPincode_result clone() {
15447
      return new getDefaultPincode_result(this);
15448
    }
15449
 
15450
    public String getSuccess() {
15451
      return this.success;
15452
    }
15453
 
15454
    public getDefaultPincode_result setSuccess(String success) {
15455
      this.success = success;
15456
      return this;
15457
    }
15458
 
15459
    public void unsetSuccess() {
15460
      this.success = null;
15461
    }
15462
 
15463
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15464
    public boolean isSetSuccess() {
15465
      return this.success != null;
15466
    }
15467
 
15468
    public void setSuccessIsSet(boolean value) {
15469
      if (!value) {
15470
        this.success = null;
15471
      }
15472
    }
15473
 
15474
    public UserContextException getUcx() {
15475
      return this.ucx;
15476
    }
15477
 
15478
    public getDefaultPincode_result setUcx(UserContextException ucx) {
15479
      this.ucx = ucx;
15480
      return this;
15481
    }
15482
 
15483
    public void unsetUcx() {
15484
      this.ucx = null;
15485
    }
15486
 
15487
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15488
    public boolean isSetUcx() {
15489
      return this.ucx != null;
15490
    }
15491
 
15492
    public void setUcxIsSet(boolean value) {
15493
      if (!value) {
15494
        this.ucx = null;
15495
      }
15496
    }
15497
 
15498
    public void setFieldValue(_Fields field, Object value) {
15499
      switch (field) {
15500
      case SUCCESS:
15501
        if (value == null) {
15502
          unsetSuccess();
15503
        } else {
15504
          setSuccess((String)value);
15505
        }
15506
        break;
15507
 
15508
      case UCX:
15509
        if (value == null) {
15510
          unsetUcx();
15511
        } else {
15512
          setUcx((UserContextException)value);
15513
        }
15514
        break;
15515
 
15516
      }
15517
    }
15518
 
15519
    public void setFieldValue(int fieldID, Object value) {
15520
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15521
    }
15522
 
15523
    public Object getFieldValue(_Fields field) {
15524
      switch (field) {
15525
      case SUCCESS:
15526
        return getSuccess();
15527
 
15528
      case UCX:
15529
        return getUcx();
15530
 
15531
      }
15532
      throw new IllegalStateException();
15533
    }
15534
 
15535
    public Object getFieldValue(int fieldId) {
15536
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15537
    }
15538
 
15539
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15540
    public boolean isSet(_Fields field) {
15541
      switch (field) {
15542
      case SUCCESS:
15543
        return isSetSuccess();
15544
      case UCX:
15545
        return isSetUcx();
15546
      }
15547
      throw new IllegalStateException();
15548
    }
15549
 
15550
    public boolean isSet(int fieldID) {
15551
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15552
    }
15553
 
15554
    @Override
15555
    public boolean equals(Object that) {
15556
      if (that == null)
15557
        return false;
15558
      if (that instanceof getDefaultPincode_result)
15559
        return this.equals((getDefaultPincode_result)that);
15560
      return false;
15561
    }
15562
 
15563
    public boolean equals(getDefaultPincode_result that) {
15564
      if (that == null)
15565
        return false;
15566
 
15567
      boolean this_present_success = true && this.isSetSuccess();
15568
      boolean that_present_success = true && that.isSetSuccess();
15569
      if (this_present_success || that_present_success) {
15570
        if (!(this_present_success && that_present_success))
15571
          return false;
15572
        if (!this.success.equals(that.success))
15573
          return false;
15574
      }
15575
 
15576
      boolean this_present_ucx = true && this.isSetUcx();
15577
      boolean that_present_ucx = true && that.isSetUcx();
15578
      if (this_present_ucx || that_present_ucx) {
15579
        if (!(this_present_ucx && that_present_ucx))
15580
          return false;
15581
        if (!this.ucx.equals(that.ucx))
15582
          return false;
15583
      }
15584
 
15585
      return true;
15586
    }
15587
 
15588
    @Override
15589
    public int hashCode() {
15590
      return 0;
15591
    }
15592
 
15593
    public int compareTo(getDefaultPincode_result other) {
15594
      if (!getClass().equals(other.getClass())) {
15595
        return getClass().getName().compareTo(other.getClass().getName());
15596
      }
15597
 
15598
      int lastComparison = 0;
15599
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;
15600
 
15601
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15602
      if (lastComparison != 0) {
15603
        return lastComparison;
15604
      }
15605
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15606
      if (lastComparison != 0) {
15607
        return lastComparison;
15608
      }
15609
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15610
      if (lastComparison != 0) {
15611
        return lastComparison;
15612
      }
15613
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15614
      if (lastComparison != 0) {
15615
        return lastComparison;
15616
      }
15617
      return 0;
15618
    }
15619
 
15620
    public void read(TProtocol iprot) throws TException {
15621
      TField field;
15622
      iprot.readStructBegin();
15623
      while (true)
15624
      {
15625
        field = iprot.readFieldBegin();
15626
        if (field.type == TType.STOP) { 
15627
          break;
15628
        }
15629
        _Fields fieldId = _Fields.findByThriftId(field.id);
15630
        if (fieldId == null) {
15631
          TProtocolUtil.skip(iprot, field.type);
15632
        } else {
15633
          switch (fieldId) {
15634
            case SUCCESS:
15635
              if (field.type == TType.STRING) {
15636
                this.success = iprot.readString();
15637
              } else { 
15638
                TProtocolUtil.skip(iprot, field.type);
15639
              }
15640
              break;
15641
            case UCX:
15642
              if (field.type == TType.STRUCT) {
15643
                this.ucx = new UserContextException();
15644
                this.ucx.read(iprot);
15645
              } else { 
15646
                TProtocolUtil.skip(iprot, field.type);
15647
              }
15648
              break;
15649
          }
15650
          iprot.readFieldEnd();
15651
        }
15652
      }
15653
      iprot.readStructEnd();
15654
      validate();
15655
    }
15656
 
15657
    public void write(TProtocol oprot) throws TException {
15658
      oprot.writeStructBegin(STRUCT_DESC);
15659
 
15660
      if (this.isSetSuccess()) {
15661
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15662
        oprot.writeString(this.success);
15663
        oprot.writeFieldEnd();
15664
      } else if (this.isSetUcx()) {
15665
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15666
        this.ucx.write(oprot);
15667
        oprot.writeFieldEnd();
15668
      }
15669
      oprot.writeFieldStop();
15670
      oprot.writeStructEnd();
15671
    }
15672
 
15673
    @Override
15674
    public String toString() {
15675
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
15676
      boolean first = true;
15677
 
15678
      sb.append("success:");
15679
      if (this.success == null) {
15680
        sb.append("null");
15681
      } else {
15682
        sb.append(this.success);
15683
      }
15684
      first = false;
15685
      if (!first) sb.append(", ");
15686
      sb.append("ucx:");
15687
      if (this.ucx == null) {
15688
        sb.append("null");
15689
      } else {
15690
        sb.append(this.ucx);
15691
      }
15692
      first = false;
15693
      sb.append(")");
15694
      return sb.toString();
15695
    }
15696
 
15697
    public void validate() throws TException {
15698
      // check for required fields
15699
    }
15700
 
15701
  }
15702
 
553 chandransh 15703
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
15704
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 15705
 
553 chandransh 15706
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 15707
 
553 chandransh 15708
    private long userId;
48 ashish 15709
 
15710
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15711
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15712
      USER_ID((short)1, "userId");
48 ashish 15713
 
15714
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15715
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15716
 
15717
      static {
15718
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15719
          byId.put((int)field._thriftId, field);
15720
          byName.put(field.getFieldName(), field);
15721
        }
15722
      }
15723
 
15724
      /**
15725
       * Find the _Fields constant that matches fieldId, or null if its not found.
15726
       */
15727
      public static _Fields findByThriftId(int fieldId) {
15728
        return byId.get(fieldId);
15729
      }
15730
 
15731
      /**
15732
       * Find the _Fields constant that matches fieldId, throwing an exception
15733
       * if it is not found.
15734
       */
15735
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15736
        _Fields fields = findByThriftId(fieldId);
15737
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15738
        return fields;
15739
      }
15740
 
15741
      /**
15742
       * Find the _Fields constant that matches name, or null if its not found.
15743
       */
15744
      public static _Fields findByName(String name) {
15745
        return byName.get(name);
15746
      }
15747
 
15748
      private final short _thriftId;
15749
      private final String _fieldName;
15750
 
15751
      _Fields(short thriftId, String fieldName) {
15752
        _thriftId = thriftId;
15753
        _fieldName = fieldName;
15754
      }
15755
 
15756
      public short getThriftFieldId() {
15757
        return _thriftId;
15758
      }
15759
 
15760
      public String getFieldName() {
15761
        return _fieldName;
15762
      }
15763
    }
15764
 
15765
    // isset id assignments
15766
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 15767
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 15768
 
15769
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15770
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 15771
          new FieldValueMetaData(TType.I64)));
15772
    }});
15773
 
15774
    static {
553 chandransh 15775
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 15776
    }
15777
 
553 chandransh 15778
    public createCart_args() {
48 ashish 15779
    }
15780
 
553 chandransh 15781
    public createCart_args(
15782
      long userId)
48 ashish 15783
    {
15784
      this();
553 chandransh 15785
      this.userId = userId;
15786
      setUserIdIsSet(true);
48 ashish 15787
    }
15788
 
15789
    /**
15790
     * Performs a deep copy on <i>other</i>.
15791
     */
553 chandransh 15792
    public createCart_args(createCart_args other) {
48 ashish 15793
      __isset_bit_vector.clear();
15794
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15795
      this.userId = other.userId;
48 ashish 15796
    }
15797
 
553 chandransh 15798
    public createCart_args deepCopy() {
15799
      return new createCart_args(this);
48 ashish 15800
    }
15801
 
15802
    @Deprecated
553 chandransh 15803
    public createCart_args clone() {
15804
      return new createCart_args(this);
48 ashish 15805
    }
15806
 
553 chandransh 15807
    public long getUserId() {
15808
      return this.userId;
48 ashish 15809
    }
15810
 
553 chandransh 15811
    public createCart_args setUserId(long userId) {
15812
      this.userId = userId;
15813
      setUserIdIsSet(true);
48 ashish 15814
      return this;
15815
    }
15816
 
553 chandransh 15817
    public void unsetUserId() {
48 ashish 15818
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15819
    }
15820
 
553 chandransh 15821
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15822
    public boolean isSetUserId() {
48 ashish 15823
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15824
    }
15825
 
553 chandransh 15826
    public void setUserIdIsSet(boolean value) {
48 ashish 15827
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15828
    }
15829
 
15830
    public void setFieldValue(_Fields field, Object value) {
15831
      switch (field) {
553 chandransh 15832
      case USER_ID:
48 ashish 15833
        if (value == null) {
553 chandransh 15834
          unsetUserId();
48 ashish 15835
        } else {
553 chandransh 15836
          setUserId((Long)value);
48 ashish 15837
        }
15838
        break;
15839
 
15840
      }
15841
    }
15842
 
15843
    public void setFieldValue(int fieldID, Object value) {
15844
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15845
    }
15846
 
15847
    public Object getFieldValue(_Fields field) {
15848
      switch (field) {
553 chandransh 15849
      case USER_ID:
15850
        return new Long(getUserId());
48 ashish 15851
 
15852
      }
15853
      throw new IllegalStateException();
15854
    }
15855
 
15856
    public Object getFieldValue(int fieldId) {
15857
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15858
    }
15859
 
15860
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15861
    public boolean isSet(_Fields field) {
15862
      switch (field) {
553 chandransh 15863
      case USER_ID:
15864
        return isSetUserId();
48 ashish 15865
      }
15866
      throw new IllegalStateException();
15867
    }
15868
 
15869
    public boolean isSet(int fieldID) {
15870
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15871
    }
15872
 
15873
    @Override
15874
    public boolean equals(Object that) {
15875
      if (that == null)
15876
        return false;
553 chandransh 15877
      if (that instanceof createCart_args)
15878
        return this.equals((createCart_args)that);
48 ashish 15879
      return false;
15880
    }
15881
 
553 chandransh 15882
    public boolean equals(createCart_args that) {
48 ashish 15883
      if (that == null)
15884
        return false;
15885
 
553 chandransh 15886
      boolean this_present_userId = true;
15887
      boolean that_present_userId = true;
15888
      if (this_present_userId || that_present_userId) {
15889
        if (!(this_present_userId && that_present_userId))
48 ashish 15890
          return false;
553 chandransh 15891
        if (this.userId != that.userId)
48 ashish 15892
          return false;
15893
      }
15894
 
15895
      return true;
15896
    }
15897
 
15898
    @Override
15899
    public int hashCode() {
15900
      return 0;
15901
    }
15902
 
553 chandransh 15903
    public int compareTo(createCart_args other) {
48 ashish 15904
      if (!getClass().equals(other.getClass())) {
15905
        return getClass().getName().compareTo(other.getClass().getName());
15906
      }
15907
 
15908
      int lastComparison = 0;
553 chandransh 15909
      createCart_args typedOther = (createCart_args)other;
48 ashish 15910
 
553 chandransh 15911
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 15912
      if (lastComparison != 0) {
15913
        return lastComparison;
15914
      }
553 chandransh 15915
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 15916
      if (lastComparison != 0) {
15917
        return lastComparison;
15918
      }
15919
      return 0;
15920
    }
15921
 
15922
    public void read(TProtocol iprot) throws TException {
15923
      TField field;
15924
      iprot.readStructBegin();
15925
      while (true)
15926
      {
15927
        field = iprot.readFieldBegin();
15928
        if (field.type == TType.STOP) { 
15929
          break;
15930
        }
15931
        _Fields fieldId = _Fields.findByThriftId(field.id);
15932
        if (fieldId == null) {
15933
          TProtocolUtil.skip(iprot, field.type);
15934
        } else {
15935
          switch (fieldId) {
553 chandransh 15936
            case USER_ID:
48 ashish 15937
              if (field.type == TType.I64) {
553 chandransh 15938
                this.userId = iprot.readI64();
15939
                setUserIdIsSet(true);
48 ashish 15940
              } else { 
15941
                TProtocolUtil.skip(iprot, field.type);
15942
              }
15943
              break;
15944
          }
15945
          iprot.readFieldEnd();
15946
        }
15947
      }
15948
      iprot.readStructEnd();
15949
      validate();
15950
    }
15951
 
15952
    public void write(TProtocol oprot) throws TException {
15953
      validate();
15954
 
15955
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 15956
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15957
      oprot.writeI64(this.userId);
48 ashish 15958
      oprot.writeFieldEnd();
15959
      oprot.writeFieldStop();
15960
      oprot.writeStructEnd();
15961
    }
15962
 
15963
    @Override
15964
    public String toString() {
553 chandransh 15965
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 15966
      boolean first = true;
15967
 
553 chandransh 15968
      sb.append("userId:");
15969
      sb.append(this.userId);
48 ashish 15970
      first = false;
15971
      sb.append(")");
15972
      return sb.toString();
15973
    }
15974
 
15975
    public void validate() throws TException {
15976
      // check for required fields
15977
    }
15978
 
15979
  }
15980
 
553 chandransh 15981
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
15982
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 15983
 
553 chandransh 15984
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15985
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 15986
 
553 chandransh 15987
    private long success;
15988
    private ShoppingCartException scx;
48 ashish 15989
 
15990
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15991
    public enum _Fields implements TFieldIdEnum {
15992
      SUCCESS((short)0, "success"),
553 chandransh 15993
      SCX((short)1, "scx");
48 ashish 15994
 
15995
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15996
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15997
 
15998
      static {
15999
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16000
          byId.put((int)field._thriftId, field);
16001
          byName.put(field.getFieldName(), field);
16002
        }
16003
      }
16004
 
16005
      /**
16006
       * Find the _Fields constant that matches fieldId, or null if its not found.
16007
       */
16008
      public static _Fields findByThriftId(int fieldId) {
16009
        return byId.get(fieldId);
16010
      }
16011
 
16012
      /**
16013
       * Find the _Fields constant that matches fieldId, throwing an exception
16014
       * if it is not found.
16015
       */
16016
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16017
        _Fields fields = findByThriftId(fieldId);
16018
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16019
        return fields;
16020
      }
16021
 
16022
      /**
16023
       * Find the _Fields constant that matches name, or null if its not found.
16024
       */
16025
      public static _Fields findByName(String name) {
16026
        return byName.get(name);
16027
      }
16028
 
16029
      private final short _thriftId;
16030
      private final String _fieldName;
16031
 
16032
      _Fields(short thriftId, String fieldName) {
16033
        _thriftId = thriftId;
16034
        _fieldName = fieldName;
16035
      }
16036
 
16037
      public short getThriftFieldId() {
16038
        return _thriftId;
16039
      }
16040
 
16041
      public String getFieldName() {
16042
        return _fieldName;
16043
      }
16044
    }
16045
 
16046
    // isset id assignments
16047
    private static final int __SUCCESS_ISSET_ID = 0;
16048
    private BitSet __isset_bit_vector = new BitSet(1);
16049
 
16050
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16051
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 16052
          new FieldValueMetaData(TType.I64)));
16053
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 16054
          new FieldValueMetaData(TType.STRUCT)));
16055
    }});
16056
 
16057
    static {
553 chandransh 16058
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 16059
    }
16060
 
553 chandransh 16061
    public createCart_result() {
48 ashish 16062
    }
16063
 
553 chandransh 16064
    public createCart_result(
16065
      long success,
16066
      ShoppingCartException scx)
48 ashish 16067
    {
16068
      this();
16069
      this.success = success;
16070
      setSuccessIsSet(true);
553 chandransh 16071
      this.scx = scx;
48 ashish 16072
    }
16073
 
16074
    /**
16075
     * Performs a deep copy on <i>other</i>.
16076
     */
553 chandransh 16077
    public createCart_result(createCart_result other) {
48 ashish 16078
      __isset_bit_vector.clear();
16079
      __isset_bit_vector.or(other.__isset_bit_vector);
16080
      this.success = other.success;
553 chandransh 16081
      if (other.isSetScx()) {
16082
        this.scx = new ShoppingCartException(other.scx);
48 ashish 16083
      }
16084
    }
16085
 
553 chandransh 16086
    public createCart_result deepCopy() {
16087
      return new createCart_result(this);
48 ashish 16088
    }
16089
 
16090
    @Deprecated
553 chandransh 16091
    public createCart_result clone() {
16092
      return new createCart_result(this);
48 ashish 16093
    }
16094
 
553 chandransh 16095
    public long getSuccess() {
48 ashish 16096
      return this.success;
16097
    }
16098
 
553 chandransh 16099
    public createCart_result setSuccess(long success) {
48 ashish 16100
      this.success = success;
16101
      setSuccessIsSet(true);
16102
      return this;
16103
    }
16104
 
16105
    public void unsetSuccess() {
16106
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16107
    }
16108
 
16109
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16110
    public boolean isSetSuccess() {
16111
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16112
    }
16113
 
16114
    public void setSuccessIsSet(boolean value) {
16115
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16116
    }
16117
 
553 chandransh 16118
    public ShoppingCartException getScx() {
16119
      return this.scx;
48 ashish 16120
    }
16121
 
553 chandransh 16122
    public createCart_result setScx(ShoppingCartException scx) {
16123
      this.scx = scx;
48 ashish 16124
      return this;
16125
    }
16126
 
553 chandransh 16127
    public void unsetScx() {
16128
      this.scx = null;
48 ashish 16129
    }
16130
 
553 chandransh 16131
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16132
    public boolean isSetScx() {
16133
      return this.scx != null;
48 ashish 16134
    }
16135
 
553 chandransh 16136
    public void setScxIsSet(boolean value) {
48 ashish 16137
      if (!value) {
553 chandransh 16138
        this.scx = null;
48 ashish 16139
      }
16140
    }
16141
 
16142
    public void setFieldValue(_Fields field, Object value) {
16143
      switch (field) {
16144
      case SUCCESS:
16145
        if (value == null) {
16146
          unsetSuccess();
16147
        } else {
553 chandransh 16148
          setSuccess((Long)value);
48 ashish 16149
        }
16150
        break;
16151
 
553 chandransh 16152
      case SCX:
48 ashish 16153
        if (value == null) {
553 chandransh 16154
          unsetScx();
48 ashish 16155
        } else {
553 chandransh 16156
          setScx((ShoppingCartException)value);
48 ashish 16157
        }
16158
        break;
16159
 
16160
      }
16161
    }
16162
 
16163
    public void setFieldValue(int fieldID, Object value) {
16164
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16165
    }
16166
 
16167
    public Object getFieldValue(_Fields field) {
16168
      switch (field) {
16169
      case SUCCESS:
553 chandransh 16170
        return new Long(getSuccess());
48 ashish 16171
 
553 chandransh 16172
      case SCX:
16173
        return getScx();
48 ashish 16174
 
16175
      }
16176
      throw new IllegalStateException();
16177
    }
16178
 
16179
    public Object getFieldValue(int fieldId) {
16180
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16181
    }
16182
 
16183
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16184
    public boolean isSet(_Fields field) {
16185
      switch (field) {
16186
      case SUCCESS:
16187
        return isSetSuccess();
553 chandransh 16188
      case SCX:
16189
        return isSetScx();
48 ashish 16190
      }
16191
      throw new IllegalStateException();
16192
    }
16193
 
16194
    public boolean isSet(int fieldID) {
16195
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16196
    }
16197
 
16198
    @Override
16199
    public boolean equals(Object that) {
16200
      if (that == null)
16201
        return false;
553 chandransh 16202
      if (that instanceof createCart_result)
16203
        return this.equals((createCart_result)that);
48 ashish 16204
      return false;
16205
    }
16206
 
553 chandransh 16207
    public boolean equals(createCart_result that) {
48 ashish 16208
      if (that == null)
16209
        return false;
16210
 
16211
      boolean this_present_success = true;
16212
      boolean that_present_success = true;
16213
      if (this_present_success || that_present_success) {
16214
        if (!(this_present_success && that_present_success))
16215
          return false;
16216
        if (this.success != that.success)
16217
          return false;
16218
      }
16219
 
553 chandransh 16220
      boolean this_present_scx = true && this.isSetScx();
16221
      boolean that_present_scx = true && that.isSetScx();
16222
      if (this_present_scx || that_present_scx) {
16223
        if (!(this_present_scx && that_present_scx))
48 ashish 16224
          return false;
553 chandransh 16225
        if (!this.scx.equals(that.scx))
48 ashish 16226
          return false;
16227
      }
16228
 
16229
      return true;
16230
    }
16231
 
16232
    @Override
16233
    public int hashCode() {
16234
      return 0;
16235
    }
16236
 
553 chandransh 16237
    public int compareTo(createCart_result other) {
48 ashish 16238
      if (!getClass().equals(other.getClass())) {
16239
        return getClass().getName().compareTo(other.getClass().getName());
16240
      }
16241
 
16242
      int lastComparison = 0;
553 chandransh 16243
      createCart_result typedOther = (createCart_result)other;
48 ashish 16244
 
16245
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16246
      if (lastComparison != 0) {
16247
        return lastComparison;
16248
      }
16249
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16250
      if (lastComparison != 0) {
16251
        return lastComparison;
16252
      }
553 chandransh 16253
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 16254
      if (lastComparison != 0) {
16255
        return lastComparison;
16256
      }
553 chandransh 16257
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 16258
      if (lastComparison != 0) {
16259
        return lastComparison;
16260
      }
16261
      return 0;
16262
    }
16263
 
16264
    public void read(TProtocol iprot) throws TException {
16265
      TField field;
16266
      iprot.readStructBegin();
16267
      while (true)
16268
      {
16269
        field = iprot.readFieldBegin();
16270
        if (field.type == TType.STOP) { 
16271
          break;
16272
        }
16273
        _Fields fieldId = _Fields.findByThriftId(field.id);
16274
        if (fieldId == null) {
16275
          TProtocolUtil.skip(iprot, field.type);
16276
        } else {
16277
          switch (fieldId) {
16278
            case SUCCESS:
553 chandransh 16279
              if (field.type == TType.I64) {
16280
                this.success = iprot.readI64();
48 ashish 16281
                setSuccessIsSet(true);
16282
              } else { 
16283
                TProtocolUtil.skip(iprot, field.type);
16284
              }
16285
              break;
553 chandransh 16286
            case SCX:
48 ashish 16287
              if (field.type == TType.STRUCT) {
553 chandransh 16288
                this.scx = new ShoppingCartException();
16289
                this.scx.read(iprot);
48 ashish 16290
              } else { 
16291
                TProtocolUtil.skip(iprot, field.type);
16292
              }
16293
              break;
16294
          }
16295
          iprot.readFieldEnd();
16296
        }
16297
      }
16298
      iprot.readStructEnd();
16299
      validate();
16300
    }
16301
 
16302
    public void write(TProtocol oprot) throws TException {
16303
      oprot.writeStructBegin(STRUCT_DESC);
16304
 
16305
      if (this.isSetSuccess()) {
16306
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 16307
        oprot.writeI64(this.success);
48 ashish 16308
        oprot.writeFieldEnd();
553 chandransh 16309
      } else if (this.isSetScx()) {
16310
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16311
        this.scx.write(oprot);
48 ashish 16312
        oprot.writeFieldEnd();
16313
      }
16314
      oprot.writeFieldStop();
16315
      oprot.writeStructEnd();
16316
    }
16317
 
16318
    @Override
16319
    public String toString() {
553 chandransh 16320
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 16321
      boolean first = true;
16322
 
16323
      sb.append("success:");
16324
      sb.append(this.success);
16325
      first = false;
16326
      if (!first) sb.append(", ");
553 chandransh 16327
      sb.append("scx:");
16328
      if (this.scx == null) {
48 ashish 16329
        sb.append("null");
16330
      } else {
553 chandransh 16331
        sb.append(this.scx);
48 ashish 16332
      }
16333
      first = false;
16334
      sb.append(")");
16335
      return sb.toString();
16336
    }
16337
 
16338
    public void validate() throws TException {
16339
      // check for required fields
16340
    }
16341
 
16342
  }
16343
 
553 chandransh 16344
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
16345
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 16346
 
553 chandransh 16347
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 16348
 
553 chandransh 16349
    private long userId;
506 rajveer 16350
 
16351
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16352
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16353
      USER_ID((short)1, "userId");
506 rajveer 16354
 
16355
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16356
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16357
 
16358
      static {
16359
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16360
          byId.put((int)field._thriftId, field);
16361
          byName.put(field.getFieldName(), field);
16362
        }
16363
      }
16364
 
16365
      /**
16366
       * Find the _Fields constant that matches fieldId, or null if its not found.
16367
       */
16368
      public static _Fields findByThriftId(int fieldId) {
16369
        return byId.get(fieldId);
16370
      }
16371
 
16372
      /**
16373
       * Find the _Fields constant that matches fieldId, throwing an exception
16374
       * if it is not found.
16375
       */
16376
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16377
        _Fields fields = findByThriftId(fieldId);
16378
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16379
        return fields;
16380
      }
16381
 
16382
      /**
16383
       * Find the _Fields constant that matches name, or null if its not found.
16384
       */
16385
      public static _Fields findByName(String name) {
16386
        return byName.get(name);
16387
      }
16388
 
16389
      private final short _thriftId;
16390
      private final String _fieldName;
16391
 
16392
      _Fields(short thriftId, String fieldName) {
16393
        _thriftId = thriftId;
16394
        _fieldName = fieldName;
16395
      }
16396
 
16397
      public short getThriftFieldId() {
16398
        return _thriftId;
16399
      }
16400
 
16401
      public String getFieldName() {
16402
        return _fieldName;
16403
      }
16404
    }
16405
 
16406
    // isset id assignments
16407
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 16408
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 16409
 
16410
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16411
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 16412
          new FieldValueMetaData(TType.I64)));
16413
    }});
16414
 
16415
    static {
553 chandransh 16416
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 16417
    }
16418
 
553 chandransh 16419
    public getCurrentCart_args() {
506 rajveer 16420
    }
16421
 
553 chandransh 16422
    public getCurrentCart_args(
16423
      long userId)
506 rajveer 16424
    {
16425
      this();
553 chandransh 16426
      this.userId = userId;
16427
      setUserIdIsSet(true);
506 rajveer 16428
    }
16429
 
16430
    /**
16431
     * Performs a deep copy on <i>other</i>.
16432
     */
553 chandransh 16433
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 16434
      __isset_bit_vector.clear();
16435
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16436
      this.userId = other.userId;
506 rajveer 16437
    }
16438
 
553 chandransh 16439
    public getCurrentCart_args deepCopy() {
16440
      return new getCurrentCart_args(this);
506 rajveer 16441
    }
16442
 
16443
    @Deprecated
553 chandransh 16444
    public getCurrentCart_args clone() {
16445
      return new getCurrentCart_args(this);
506 rajveer 16446
    }
16447
 
553 chandransh 16448
    public long getUserId() {
16449
      return this.userId;
506 rajveer 16450
    }
16451
 
553 chandransh 16452
    public getCurrentCart_args setUserId(long userId) {
16453
      this.userId = userId;
16454
      setUserIdIsSet(true);
506 rajveer 16455
      return this;
16456
    }
16457
 
553 chandransh 16458
    public void unsetUserId() {
506 rajveer 16459
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16460
    }
16461
 
553 chandransh 16462
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16463
    public boolean isSetUserId() {
506 rajveer 16464
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16465
    }
16466
 
553 chandransh 16467
    public void setUserIdIsSet(boolean value) {
506 rajveer 16468
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16469
    }
16470
 
553 chandransh 16471
    public void setFieldValue(_Fields field, Object value) {
16472
      switch (field) {
16473
      case USER_ID:
16474
        if (value == null) {
16475
          unsetUserId();
16476
        } else {
16477
          setUserId((Long)value);
16478
        }
16479
        break;
16480
 
16481
      }
506 rajveer 16482
    }
16483
 
553 chandransh 16484
    public void setFieldValue(int fieldID, Object value) {
16485
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16486
    }
16487
 
16488
    public Object getFieldValue(_Fields field) {
16489
      switch (field) {
16490
      case USER_ID:
16491
        return new Long(getUserId());
16492
 
16493
      }
16494
      throw new IllegalStateException();
16495
    }
16496
 
16497
    public Object getFieldValue(int fieldId) {
16498
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16499
    }
16500
 
16501
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16502
    public boolean isSet(_Fields field) {
16503
      switch (field) {
16504
      case USER_ID:
16505
        return isSetUserId();
16506
      }
16507
      throw new IllegalStateException();
16508
    }
16509
 
16510
    public boolean isSet(int fieldID) {
16511
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16512
    }
16513
 
16514
    @Override
16515
    public boolean equals(Object that) {
16516
      if (that == null)
16517
        return false;
16518
      if (that instanceof getCurrentCart_args)
16519
        return this.equals((getCurrentCart_args)that);
16520
      return false;
16521
    }
16522
 
16523
    public boolean equals(getCurrentCart_args that) {
16524
      if (that == null)
16525
        return false;
16526
 
16527
      boolean this_present_userId = true;
16528
      boolean that_present_userId = true;
16529
      if (this_present_userId || that_present_userId) {
16530
        if (!(this_present_userId && that_present_userId))
16531
          return false;
16532
        if (this.userId != that.userId)
16533
          return false;
16534
      }
16535
 
16536
      return true;
16537
    }
16538
 
16539
    @Override
16540
    public int hashCode() {
16541
      return 0;
16542
    }
16543
 
16544
    public int compareTo(getCurrentCart_args other) {
16545
      if (!getClass().equals(other.getClass())) {
16546
        return getClass().getName().compareTo(other.getClass().getName());
16547
      }
16548
 
16549
      int lastComparison = 0;
16550
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
16551
 
16552
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16553
      if (lastComparison != 0) {
16554
        return lastComparison;
16555
      }
16556
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16557
      if (lastComparison != 0) {
16558
        return lastComparison;
16559
      }
16560
      return 0;
16561
    }
16562
 
16563
    public void read(TProtocol iprot) throws TException {
16564
      TField field;
16565
      iprot.readStructBegin();
16566
      while (true)
16567
      {
16568
        field = iprot.readFieldBegin();
16569
        if (field.type == TType.STOP) { 
16570
          break;
16571
        }
16572
        _Fields fieldId = _Fields.findByThriftId(field.id);
16573
        if (fieldId == null) {
16574
          TProtocolUtil.skip(iprot, field.type);
16575
        } else {
16576
          switch (fieldId) {
16577
            case USER_ID:
16578
              if (field.type == TType.I64) {
16579
                this.userId = iprot.readI64();
16580
                setUserIdIsSet(true);
16581
              } else { 
16582
                TProtocolUtil.skip(iprot, field.type);
16583
              }
16584
              break;
16585
          }
16586
          iprot.readFieldEnd();
16587
        }
16588
      }
16589
      iprot.readStructEnd();
16590
      validate();
16591
    }
16592
 
16593
    public void write(TProtocol oprot) throws TException {
16594
      validate();
16595
 
16596
      oprot.writeStructBegin(STRUCT_DESC);
16597
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16598
      oprot.writeI64(this.userId);
16599
      oprot.writeFieldEnd();
16600
      oprot.writeFieldStop();
16601
      oprot.writeStructEnd();
16602
    }
16603
 
16604
    @Override
16605
    public String toString() {
16606
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
16607
      boolean first = true;
16608
 
16609
      sb.append("userId:");
16610
      sb.append(this.userId);
16611
      first = false;
16612
      sb.append(")");
16613
      return sb.toString();
16614
    }
16615
 
16616
    public void validate() throws TException {
16617
      // check for required fields
16618
    }
16619
 
16620
  }
16621
 
16622
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
16623
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
16624
 
16625
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16626
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
16627
 
16628
    private Cart success;
16629
    private ShoppingCartException scx;
16630
 
16631
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16632
    public enum _Fields implements TFieldIdEnum {
16633
      SUCCESS((short)0, "success"),
16634
      SCX((short)1, "scx");
16635
 
16636
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16637
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16638
 
16639
      static {
16640
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16641
          byId.put((int)field._thriftId, field);
16642
          byName.put(field.getFieldName(), field);
16643
        }
16644
      }
16645
 
16646
      /**
16647
       * Find the _Fields constant that matches fieldId, or null if its not found.
16648
       */
16649
      public static _Fields findByThriftId(int fieldId) {
16650
        return byId.get(fieldId);
16651
      }
16652
 
16653
      /**
16654
       * Find the _Fields constant that matches fieldId, throwing an exception
16655
       * if it is not found.
16656
       */
16657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16658
        _Fields fields = findByThriftId(fieldId);
16659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16660
        return fields;
16661
      }
16662
 
16663
      /**
16664
       * Find the _Fields constant that matches name, or null if its not found.
16665
       */
16666
      public static _Fields findByName(String name) {
16667
        return byName.get(name);
16668
      }
16669
 
16670
      private final short _thriftId;
16671
      private final String _fieldName;
16672
 
16673
      _Fields(short thriftId, String fieldName) {
16674
        _thriftId = thriftId;
16675
        _fieldName = fieldName;
16676
      }
16677
 
16678
      public short getThriftFieldId() {
16679
        return _thriftId;
16680
      }
16681
 
16682
      public String getFieldName() {
16683
        return _fieldName;
16684
      }
16685
    }
16686
 
16687
    // isset id assignments
16688
 
16689
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16690
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16691
          new StructMetaData(TType.STRUCT, Cart.class)));
16692
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
16693
          new FieldValueMetaData(TType.STRUCT)));
16694
    }});
16695
 
16696
    static {
16697
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
16698
    }
16699
 
16700
    public getCurrentCart_result() {
16701
    }
16702
 
16703
    public getCurrentCart_result(
16704
      Cart success,
16705
      ShoppingCartException scx)
16706
    {
16707
      this();
16708
      this.success = success;
16709
      this.scx = scx;
16710
    }
16711
 
16712
    /**
16713
     * Performs a deep copy on <i>other</i>.
16714
     */
16715
    public getCurrentCart_result(getCurrentCart_result other) {
16716
      if (other.isSetSuccess()) {
16717
        this.success = new Cart(other.success);
16718
      }
16719
      if (other.isSetScx()) {
16720
        this.scx = new ShoppingCartException(other.scx);
16721
      }
16722
    }
16723
 
16724
    public getCurrentCart_result deepCopy() {
16725
      return new getCurrentCart_result(this);
16726
    }
16727
 
16728
    @Deprecated
16729
    public getCurrentCart_result clone() {
16730
      return new getCurrentCart_result(this);
16731
    }
16732
 
16733
    public Cart getSuccess() {
16734
      return this.success;
16735
    }
16736
 
16737
    public getCurrentCart_result setSuccess(Cart success) {
16738
      this.success = success;
506 rajveer 16739
      return this;
16740
    }
16741
 
553 chandransh 16742
    public void unsetSuccess() {
16743
      this.success = null;
506 rajveer 16744
    }
16745
 
553 chandransh 16746
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16747
    public boolean isSetSuccess() {
16748
      return this.success != null;
506 rajveer 16749
    }
16750
 
553 chandransh 16751
    public void setSuccessIsSet(boolean value) {
16752
      if (!value) {
16753
        this.success = null;
16754
      }
506 rajveer 16755
    }
16756
 
553 chandransh 16757
    public ShoppingCartException getScx() {
16758
      return this.scx;
16759
    }
16760
 
16761
    public getCurrentCart_result setScx(ShoppingCartException scx) {
16762
      this.scx = scx;
16763
      return this;
16764
    }
16765
 
16766
    public void unsetScx() {
16767
      this.scx = null;
16768
    }
16769
 
16770
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16771
    public boolean isSetScx() {
16772
      return this.scx != null;
16773
    }
16774
 
16775
    public void setScxIsSet(boolean value) {
16776
      if (!value) {
16777
        this.scx = null;
16778
      }
16779
    }
16780
 
506 rajveer 16781
    public void setFieldValue(_Fields field, Object value) {
16782
      switch (field) {
553 chandransh 16783
      case SUCCESS:
506 rajveer 16784
        if (value == null) {
553 chandransh 16785
          unsetSuccess();
506 rajveer 16786
        } else {
553 chandransh 16787
          setSuccess((Cart)value);
506 rajveer 16788
        }
16789
        break;
16790
 
553 chandransh 16791
      case SCX:
506 rajveer 16792
        if (value == null) {
553 chandransh 16793
          unsetScx();
506 rajveer 16794
        } else {
553 chandransh 16795
          setScx((ShoppingCartException)value);
506 rajveer 16796
        }
16797
        break;
16798
 
16799
      }
16800
    }
16801
 
16802
    public void setFieldValue(int fieldID, Object value) {
16803
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16804
    }
16805
 
16806
    public Object getFieldValue(_Fields field) {
16807
      switch (field) {
553 chandransh 16808
      case SUCCESS:
16809
        return getSuccess();
506 rajveer 16810
 
553 chandransh 16811
      case SCX:
16812
        return getScx();
506 rajveer 16813
 
16814
      }
16815
      throw new IllegalStateException();
16816
    }
16817
 
16818
    public Object getFieldValue(int fieldId) {
16819
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16820
    }
16821
 
16822
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16823
    public boolean isSet(_Fields field) {
16824
      switch (field) {
553 chandransh 16825
      case SUCCESS:
16826
        return isSetSuccess();
16827
      case SCX:
16828
        return isSetScx();
506 rajveer 16829
      }
16830
      throw new IllegalStateException();
16831
    }
16832
 
16833
    public boolean isSet(int fieldID) {
16834
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16835
    }
16836
 
16837
    @Override
16838
    public boolean equals(Object that) {
16839
      if (that == null)
16840
        return false;
553 chandransh 16841
      if (that instanceof getCurrentCart_result)
16842
        return this.equals((getCurrentCart_result)that);
506 rajveer 16843
      return false;
16844
    }
16845
 
553 chandransh 16846
    public boolean equals(getCurrentCart_result that) {
506 rajveer 16847
      if (that == null)
16848
        return false;
16849
 
553 chandransh 16850
      boolean this_present_success = true && this.isSetSuccess();
16851
      boolean that_present_success = true && that.isSetSuccess();
16852
      if (this_present_success || that_present_success) {
16853
        if (!(this_present_success && that_present_success))
506 rajveer 16854
          return false;
553 chandransh 16855
        if (!this.success.equals(that.success))
506 rajveer 16856
          return false;
16857
      }
16858
 
553 chandransh 16859
      boolean this_present_scx = true && this.isSetScx();
16860
      boolean that_present_scx = true && that.isSetScx();
16861
      if (this_present_scx || that_present_scx) {
16862
        if (!(this_present_scx && that_present_scx))
506 rajveer 16863
          return false;
553 chandransh 16864
        if (!this.scx.equals(that.scx))
506 rajveer 16865
          return false;
16866
      }
16867
 
16868
      return true;
16869
    }
16870
 
16871
    @Override
16872
    public int hashCode() {
16873
      return 0;
16874
    }
16875
 
553 chandransh 16876
    public int compareTo(getCurrentCart_result other) {
506 rajveer 16877
      if (!getClass().equals(other.getClass())) {
16878
        return getClass().getName().compareTo(other.getClass().getName());
16879
      }
16880
 
16881
      int lastComparison = 0;
553 chandransh 16882
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 16883
 
553 chandransh 16884
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 16885
      if (lastComparison != 0) {
16886
        return lastComparison;
16887
      }
553 chandransh 16888
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 16889
      if (lastComparison != 0) {
16890
        return lastComparison;
16891
      }
553 chandransh 16892
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16893
      if (lastComparison != 0) {
16894
        return lastComparison;
16895
      }
553 chandransh 16896
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16897
      if (lastComparison != 0) {
16898
        return lastComparison;
16899
      }
16900
      return 0;
16901
    }
16902
 
16903
    public void read(TProtocol iprot) throws TException {
16904
      TField field;
16905
      iprot.readStructBegin();
16906
      while (true)
16907
      {
16908
        field = iprot.readFieldBegin();
16909
        if (field.type == TType.STOP) { 
16910
          break;
16911
        }
16912
        _Fields fieldId = _Fields.findByThriftId(field.id);
16913
        if (fieldId == null) {
16914
          TProtocolUtil.skip(iprot, field.type);
16915
        } else {
16916
          switch (fieldId) {
553 chandransh 16917
            case SUCCESS:
16918
              if (field.type == TType.STRUCT) {
16919
                this.success = new Cart();
16920
                this.success.read(iprot);
506 rajveer 16921
              } else { 
16922
                TProtocolUtil.skip(iprot, field.type);
16923
              }
16924
              break;
553 chandransh 16925
            case SCX:
16926
              if (field.type == TType.STRUCT) {
16927
                this.scx = new ShoppingCartException();
16928
                this.scx.read(iprot);
16929
              } else { 
16930
                TProtocolUtil.skip(iprot, field.type);
16931
              }
16932
              break;
16933
          }
16934
          iprot.readFieldEnd();
16935
        }
16936
      }
16937
      iprot.readStructEnd();
16938
      validate();
16939
    }
16940
 
16941
    public void write(TProtocol oprot) throws TException {
16942
      oprot.writeStructBegin(STRUCT_DESC);
16943
 
16944
      if (this.isSetSuccess()) {
16945
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16946
        this.success.write(oprot);
16947
        oprot.writeFieldEnd();
16948
      } else if (this.isSetScx()) {
16949
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16950
        this.scx.write(oprot);
16951
        oprot.writeFieldEnd();
16952
      }
16953
      oprot.writeFieldStop();
16954
      oprot.writeStructEnd();
16955
    }
16956
 
16957
    @Override
16958
    public String toString() {
16959
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
16960
      boolean first = true;
16961
 
16962
      sb.append("success:");
16963
      if (this.success == null) {
16964
        sb.append("null");
16965
      } else {
16966
        sb.append(this.success);
16967
      }
16968
      first = false;
16969
      if (!first) sb.append(", ");
16970
      sb.append("scx:");
16971
      if (this.scx == null) {
16972
        sb.append("null");
16973
      } else {
16974
        sb.append(this.scx);
16975
      }
16976
      first = false;
16977
      sb.append(")");
16978
      return sb.toString();
16979
    }
16980
 
16981
    public void validate() throws TException {
16982
      // check for required fields
16983
    }
16984
 
16985
  }
16986
 
16987
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
16988
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
16989
 
16990
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16991
 
16992
    private long cartId;
16993
 
16994
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16995
    public enum _Fields implements TFieldIdEnum {
16996
      CART_ID((short)1, "cartId");
16997
 
16998
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16999
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17000
 
17001
      static {
17002
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17003
          byId.put((int)field._thriftId, field);
17004
          byName.put(field.getFieldName(), field);
17005
        }
17006
      }
17007
 
17008
      /**
17009
       * Find the _Fields constant that matches fieldId, or null if its not found.
17010
       */
17011
      public static _Fields findByThriftId(int fieldId) {
17012
        return byId.get(fieldId);
17013
      }
17014
 
17015
      /**
17016
       * Find the _Fields constant that matches fieldId, throwing an exception
17017
       * if it is not found.
17018
       */
17019
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17020
        _Fields fields = findByThriftId(fieldId);
17021
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17022
        return fields;
17023
      }
17024
 
17025
      /**
17026
       * Find the _Fields constant that matches name, or null if its not found.
17027
       */
17028
      public static _Fields findByName(String name) {
17029
        return byName.get(name);
17030
      }
17031
 
17032
      private final short _thriftId;
17033
      private final String _fieldName;
17034
 
17035
      _Fields(short thriftId, String fieldName) {
17036
        _thriftId = thriftId;
17037
        _fieldName = fieldName;
17038
      }
17039
 
17040
      public short getThriftFieldId() {
17041
        return _thriftId;
17042
      }
17043
 
17044
      public String getFieldName() {
17045
        return _fieldName;
17046
      }
17047
    }
17048
 
17049
    // isset id assignments
17050
    private static final int __CARTID_ISSET_ID = 0;
17051
    private BitSet __isset_bit_vector = new BitSet(1);
17052
 
17053
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17054
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
17055
          new FieldValueMetaData(TType.I64)));
17056
    }});
17057
 
17058
    static {
17059
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
17060
    }
17061
 
17062
    public getCart_args() {
17063
    }
17064
 
17065
    public getCart_args(
17066
      long cartId)
17067
    {
17068
      this();
17069
      this.cartId = cartId;
17070
      setCartIdIsSet(true);
17071
    }
17072
 
17073
    /**
17074
     * Performs a deep copy on <i>other</i>.
17075
     */
17076
    public getCart_args(getCart_args other) {
17077
      __isset_bit_vector.clear();
17078
      __isset_bit_vector.or(other.__isset_bit_vector);
17079
      this.cartId = other.cartId;
17080
    }
17081
 
17082
    public getCart_args deepCopy() {
17083
      return new getCart_args(this);
17084
    }
17085
 
17086
    @Deprecated
17087
    public getCart_args clone() {
17088
      return new getCart_args(this);
17089
    }
17090
 
17091
    public long getCartId() {
17092
      return this.cartId;
17093
    }
17094
 
17095
    public getCart_args setCartId(long cartId) {
17096
      this.cartId = cartId;
17097
      setCartIdIsSet(true);
17098
      return this;
17099
    }
17100
 
17101
    public void unsetCartId() {
17102
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
17103
    }
17104
 
17105
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
17106
    public boolean isSetCartId() {
17107
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
17108
    }
17109
 
17110
    public void setCartIdIsSet(boolean value) {
17111
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
17112
    }
17113
 
17114
    public void setFieldValue(_Fields field, Object value) {
17115
      switch (field) {
17116
      case CART_ID:
17117
        if (value == null) {
17118
          unsetCartId();
17119
        } else {
17120
          setCartId((Long)value);
17121
        }
17122
        break;
17123
 
17124
      }
17125
    }
17126
 
17127
    public void setFieldValue(int fieldID, Object value) {
17128
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17129
    }
17130
 
17131
    public Object getFieldValue(_Fields field) {
17132
      switch (field) {
17133
      case CART_ID:
17134
        return new Long(getCartId());
17135
 
17136
      }
17137
      throw new IllegalStateException();
17138
    }
17139
 
17140
    public Object getFieldValue(int fieldId) {
17141
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17142
    }
17143
 
17144
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17145
    public boolean isSet(_Fields field) {
17146
      switch (field) {
17147
      case CART_ID:
17148
        return isSetCartId();
17149
      }
17150
      throw new IllegalStateException();
17151
    }
17152
 
17153
    public boolean isSet(int fieldID) {
17154
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17155
    }
17156
 
17157
    @Override
17158
    public boolean equals(Object that) {
17159
      if (that == null)
17160
        return false;
17161
      if (that instanceof getCart_args)
17162
        return this.equals((getCart_args)that);
17163
      return false;
17164
    }
17165
 
17166
    public boolean equals(getCart_args that) {
17167
      if (that == null)
17168
        return false;
17169
 
17170
      boolean this_present_cartId = true;
17171
      boolean that_present_cartId = true;
17172
      if (this_present_cartId || that_present_cartId) {
17173
        if (!(this_present_cartId && that_present_cartId))
17174
          return false;
17175
        if (this.cartId != that.cartId)
17176
          return false;
17177
      }
17178
 
17179
      return true;
17180
    }
17181
 
17182
    @Override
17183
    public int hashCode() {
17184
      return 0;
17185
    }
17186
 
17187
    public int compareTo(getCart_args other) {
17188
      if (!getClass().equals(other.getClass())) {
17189
        return getClass().getName().compareTo(other.getClass().getName());
17190
      }
17191
 
17192
      int lastComparison = 0;
17193
      getCart_args typedOther = (getCart_args)other;
17194
 
17195
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
17196
      if (lastComparison != 0) {
17197
        return lastComparison;
17198
      }
17199
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
17200
      if (lastComparison != 0) {
17201
        return lastComparison;
17202
      }
17203
      return 0;
17204
    }
17205
 
17206
    public void read(TProtocol iprot) throws TException {
17207
      TField field;
17208
      iprot.readStructBegin();
17209
      while (true)
17210
      {
17211
        field = iprot.readFieldBegin();
17212
        if (field.type == TType.STOP) { 
17213
          break;
17214
        }
17215
        _Fields fieldId = _Fields.findByThriftId(field.id);
17216
        if (fieldId == null) {
17217
          TProtocolUtil.skip(iprot, field.type);
17218
        } else {
17219
          switch (fieldId) {
17220
            case CART_ID:
506 rajveer 17221
              if (field.type == TType.I64) {
553 chandransh 17222
                this.cartId = iprot.readI64();
17223
                setCartIdIsSet(true);
506 rajveer 17224
              } else { 
17225
                TProtocolUtil.skip(iprot, field.type);
17226
              }
17227
              break;
17228
          }
17229
          iprot.readFieldEnd();
17230
        }
17231
      }
17232
      iprot.readStructEnd();
17233
      validate();
17234
    }
17235
 
17236
    public void write(TProtocol oprot) throws TException {
17237
      validate();
17238
 
17239
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17240
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
17241
      oprot.writeI64(this.cartId);
506 rajveer 17242
      oprot.writeFieldEnd();
17243
      oprot.writeFieldStop();
17244
      oprot.writeStructEnd();
17245
    }
17246
 
17247
    @Override
17248
    public String toString() {
553 chandransh 17249
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 17250
      boolean first = true;
17251
 
553 chandransh 17252
      sb.append("cartId:");
17253
      sb.append(this.cartId);
506 rajveer 17254
      first = false;
17255
      sb.append(")");
17256
      return sb.toString();
17257
    }
17258
 
17259
    public void validate() throws TException {
17260
      // check for required fields
17261
    }
17262
 
17263
  }
17264
 
553 chandransh 17265
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
17266
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 17267
 
553 chandransh 17268
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
17269
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 17270
 
553 chandransh 17271
    private Cart success;
17272
    private ShoppingCartException scx;
506 rajveer 17273
 
17274
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17275
    public enum _Fields implements TFieldIdEnum {
17276
      SUCCESS((short)0, "success"),
553 chandransh 17277
      SCX((short)1, "scx");
506 rajveer 17278
 
17279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17281
 
17282
      static {
17283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17284
          byId.put((int)field._thriftId, field);
17285
          byName.put(field.getFieldName(), field);
17286
        }
17287
      }
17288
 
17289
      /**
17290
       * Find the _Fields constant that matches fieldId, or null if its not found.
17291
       */
17292
      public static _Fields findByThriftId(int fieldId) {
17293
        return byId.get(fieldId);
17294
      }
17295
 
17296
      /**
17297
       * Find the _Fields constant that matches fieldId, throwing an exception
17298
       * if it is not found.
17299
       */
17300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17301
        _Fields fields = findByThriftId(fieldId);
17302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17303
        return fields;
17304
      }
17305
 
17306
      /**
17307
       * Find the _Fields constant that matches name, or null if its not found.
17308
       */
17309
      public static _Fields findByName(String name) {
17310
        return byName.get(name);
17311
      }
17312
 
17313
      private final short _thriftId;
17314
      private final String _fieldName;
17315
 
17316
      _Fields(short thriftId, String fieldName) {
17317
        _thriftId = thriftId;
17318
        _fieldName = fieldName;
17319
      }
17320
 
17321
      public short getThriftFieldId() {
17322
        return _thriftId;
17323
      }
17324
 
17325
      public String getFieldName() {
17326
        return _fieldName;
17327
      }
17328
    }
17329
 
17330
    // isset id assignments
17331
 
17332
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17333
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17334
          new StructMetaData(TType.STRUCT, Cart.class)));
17335
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 17336
          new FieldValueMetaData(TType.STRUCT)));
17337
    }});
17338
 
17339
    static {
553 chandransh 17340
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 17341
    }
17342
 
553 chandransh 17343
    public getCart_result() {
506 rajveer 17344
    }
17345
 
553 chandransh 17346
    public getCart_result(
17347
      Cart success,
17348
      ShoppingCartException scx)
506 rajveer 17349
    {
17350
      this();
17351
      this.success = success;
553 chandransh 17352
      this.scx = scx;
506 rajveer 17353
    }
17354
 
17355
    /**
17356
     * Performs a deep copy on <i>other</i>.
17357
     */
553 chandransh 17358
    public getCart_result(getCart_result other) {
17359
      if (other.isSetSuccess()) {
17360
        this.success = new Cart(other.success);
506 rajveer 17361
      }
553 chandransh 17362
      if (other.isSetScx()) {
17363
        this.scx = new ShoppingCartException(other.scx);
17364
      }
506 rajveer 17365
    }
17366
 
553 chandransh 17367
    public getCart_result deepCopy() {
17368
      return new getCart_result(this);
506 rajveer 17369
    }
17370
 
17371
    @Deprecated
553 chandransh 17372
    public getCart_result clone() {
17373
      return new getCart_result(this);
506 rajveer 17374
    }
17375
 
553 chandransh 17376
    public Cart getSuccess() {
506 rajveer 17377
      return this.success;
17378
    }
17379
 
553 chandransh 17380
    public getCart_result setSuccess(Cart success) {
506 rajveer 17381
      this.success = success;
17382
      return this;
17383
    }
17384
 
17385
    public void unsetSuccess() {
553 chandransh 17386
      this.success = null;
506 rajveer 17387
    }
17388
 
17389
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17390
    public boolean isSetSuccess() {
553 chandransh 17391
      return this.success != null;
506 rajveer 17392
    }
17393
 
17394
    public void setSuccessIsSet(boolean value) {
553 chandransh 17395
      if (!value) {
17396
        this.success = null;
17397
      }
506 rajveer 17398
    }
17399
 
553 chandransh 17400
    public ShoppingCartException getScx() {
17401
      return this.scx;
506 rajveer 17402
    }
17403
 
553 chandransh 17404
    public getCart_result setScx(ShoppingCartException scx) {
17405
      this.scx = scx;
506 rajveer 17406
      return this;
17407
    }
17408
 
553 chandransh 17409
    public void unsetScx() {
17410
      this.scx = null;
506 rajveer 17411
    }
17412
 
553 chandransh 17413
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17414
    public boolean isSetScx() {
17415
      return this.scx != null;
506 rajveer 17416
    }
17417
 
553 chandransh 17418
    public void setScxIsSet(boolean value) {
506 rajveer 17419
      if (!value) {
553 chandransh 17420
        this.scx = null;
506 rajveer 17421
      }
17422
    }
17423
 
17424
    public void setFieldValue(_Fields field, Object value) {
17425
      switch (field) {
17426
      case SUCCESS:
17427
        if (value == null) {
17428
          unsetSuccess();
17429
        } else {
553 chandransh 17430
          setSuccess((Cart)value);
506 rajveer 17431
        }
17432
        break;
17433
 
553 chandransh 17434
      case SCX:
506 rajveer 17435
        if (value == null) {
553 chandransh 17436
          unsetScx();
506 rajveer 17437
        } else {
553 chandransh 17438
          setScx((ShoppingCartException)value);
506 rajveer 17439
        }
17440
        break;
17441
 
17442
      }
17443
    }
17444
 
17445
    public void setFieldValue(int fieldID, Object value) {
17446
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17447
    }
17448
 
17449
    public Object getFieldValue(_Fields field) {
17450
      switch (field) {
17451
      case SUCCESS:
553 chandransh 17452
        return getSuccess();
506 rajveer 17453
 
553 chandransh 17454
      case SCX:
17455
        return getScx();
506 rajveer 17456
 
17457
      }
17458
      throw new IllegalStateException();
17459
    }
17460
 
17461
    public Object getFieldValue(int fieldId) {
17462
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17463
    }
17464
 
17465
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17466
    public boolean isSet(_Fields field) {
17467
      switch (field) {
17468
      case SUCCESS:
17469
        return isSetSuccess();
553 chandransh 17470
      case SCX:
17471
        return isSetScx();
506 rajveer 17472
      }
17473
      throw new IllegalStateException();
17474
    }
17475
 
17476
    public boolean isSet(int fieldID) {
17477
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17478
    }
17479
 
17480
    @Override
17481
    public boolean equals(Object that) {
17482
      if (that == null)
17483
        return false;
553 chandransh 17484
      if (that instanceof getCart_result)
17485
        return this.equals((getCart_result)that);
506 rajveer 17486
      return false;
17487
    }
17488
 
553 chandransh 17489
    public boolean equals(getCart_result that) {
506 rajveer 17490
      if (that == null)
17491
        return false;
17492
 
553 chandransh 17493
      boolean this_present_success = true && this.isSetSuccess();
17494
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 17495
      if (this_present_success || that_present_success) {
17496
        if (!(this_present_success && that_present_success))
17497
          return false;
553 chandransh 17498
        if (!this.success.equals(that.success))
506 rajveer 17499
          return false;
17500
      }
17501
 
553 chandransh 17502
      boolean this_present_scx = true && this.isSetScx();
17503
      boolean that_present_scx = true && that.isSetScx();
17504
      if (this_present_scx || that_present_scx) {
17505
        if (!(this_present_scx && that_present_scx))
506 rajveer 17506
          return false;
553 chandransh 17507
        if (!this.scx.equals(that.scx))
506 rajveer 17508
          return false;
17509
      }
17510
 
17511
      return true;
17512
    }
17513
 
17514
    @Override
17515
    public int hashCode() {
17516
      return 0;
17517
    }
17518
 
553 chandransh 17519
    public int compareTo(getCart_result other) {
506 rajveer 17520
      if (!getClass().equals(other.getClass())) {
17521
        return getClass().getName().compareTo(other.getClass().getName());
17522
      }
17523
 
17524
      int lastComparison = 0;
553 chandransh 17525
      getCart_result typedOther = (getCart_result)other;
506 rajveer 17526
 
17527
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17528
      if (lastComparison != 0) {
17529
        return lastComparison;
17530
      }
17531
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17532
      if (lastComparison != 0) {
17533
        return lastComparison;
17534
      }
553 chandransh 17535
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 17536
      if (lastComparison != 0) {
17537
        return lastComparison;
17538
      }
553 chandransh 17539
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 17540
      if (lastComparison != 0) {
17541
        return lastComparison;
17542
      }
17543
      return 0;
17544
    }
17545
 
17546
    public void read(TProtocol iprot) throws TException {
17547
      TField field;
17548
      iprot.readStructBegin();
17549
      while (true)
17550
      {
17551
        field = iprot.readFieldBegin();
17552
        if (field.type == TType.STOP) { 
17553
          break;
17554
        }
17555
        _Fields fieldId = _Fields.findByThriftId(field.id);
17556
        if (fieldId == null) {
17557
          TProtocolUtil.skip(iprot, field.type);
17558
        } else {
17559
          switch (fieldId) {
17560
            case SUCCESS:
553 chandransh 17561
              if (field.type == TType.STRUCT) {
17562
                this.success = new Cart();
17563
                this.success.read(iprot);
506 rajveer 17564
              } else { 
17565
                TProtocolUtil.skip(iprot, field.type);
17566
              }
17567
              break;
553 chandransh 17568
            case SCX:
506 rajveer 17569
              if (field.type == TType.STRUCT) {
553 chandransh 17570
                this.scx = new ShoppingCartException();
17571
                this.scx.read(iprot);
506 rajveer 17572
              } else { 
17573
                TProtocolUtil.skip(iprot, field.type);
17574
              }
17575
              break;
17576
          }
17577
          iprot.readFieldEnd();
17578
        }
17579
      }
17580
      iprot.readStructEnd();
17581
      validate();
17582
    }
17583
 
17584
    public void write(TProtocol oprot) throws TException {
17585
      oprot.writeStructBegin(STRUCT_DESC);
17586
 
17587
      if (this.isSetSuccess()) {
17588
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17589
        this.success.write(oprot);
506 rajveer 17590
        oprot.writeFieldEnd();
553 chandransh 17591
      } else if (this.isSetScx()) {
17592
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17593
        this.scx.write(oprot);
506 rajveer 17594
        oprot.writeFieldEnd();
17595
      }
17596
      oprot.writeFieldStop();
17597
      oprot.writeStructEnd();
17598
    }
17599
 
17600
    @Override
17601
    public String toString() {
553 chandransh 17602
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 17603
      boolean first = true;
17604
 
17605
      sb.append("success:");
553 chandransh 17606
      if (this.success == null) {
17607
        sb.append("null");
17608
      } else {
17609
        sb.append(this.success);
17610
      }
506 rajveer 17611
      first = false;
17612
      if (!first) sb.append(", ");
553 chandransh 17613
      sb.append("scx:");
17614
      if (this.scx == null) {
506 rajveer 17615
        sb.append("null");
17616
      } else {
553 chandransh 17617
        sb.append(this.scx);
506 rajveer 17618
      }
17619
      first = false;
17620
      sb.append(")");
17621
      return sb.toString();
17622
    }
17623
 
17624
    public void validate() throws TException {
17625
      // check for required fields
17626
    }
17627
 
17628
  }
17629
 
553 chandransh 17630
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
17631
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 17632
 
553 chandransh 17633
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
17634
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 17635
 
553 chandransh 17636
    private long userId;
17637
    private CartStatus status;
48 ashish 17638
 
17639
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17640
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17641
      USER_ID((short)1, "userId"),
17642
      /**
17643
       * 
17644
       * @see CartStatus
17645
       */
17646
      STATUS((short)2, "status");
48 ashish 17647
 
17648
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17649
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17650
 
17651
      static {
17652
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17653
          byId.put((int)field._thriftId, field);
17654
          byName.put(field.getFieldName(), field);
17655
        }
17656
      }
17657
 
17658
      /**
17659
       * Find the _Fields constant that matches fieldId, or null if its not found.
17660
       */
17661
      public static _Fields findByThriftId(int fieldId) {
17662
        return byId.get(fieldId);
17663
      }
17664
 
17665
      /**
17666
       * Find the _Fields constant that matches fieldId, throwing an exception
17667
       * if it is not found.
17668
       */
17669
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17670
        _Fields fields = findByThriftId(fieldId);
17671
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17672
        return fields;
17673
      }
17674
 
17675
      /**
17676
       * Find the _Fields constant that matches name, or null if its not found.
17677
       */
17678
      public static _Fields findByName(String name) {
17679
        return byName.get(name);
17680
      }
17681
 
17682
      private final short _thriftId;
17683
      private final String _fieldName;
17684
 
17685
      _Fields(short thriftId, String fieldName) {
17686
        _thriftId = thriftId;
17687
        _fieldName = fieldName;
17688
      }
17689
 
17690
      public short getThriftFieldId() {
17691
        return _thriftId;
17692
      }
17693
 
17694
      public String getFieldName() {
17695
        return _fieldName;
17696
      }
17697
    }
17698
 
17699
    // isset id assignments
17700
    private static final int __USERID_ISSET_ID = 0;
17701
    private BitSet __isset_bit_vector = new BitSet(1);
17702
 
17703
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17704
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 17705
          new FieldValueMetaData(TType.I64)));
553 chandransh 17706
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17707
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 17708
    }});
17709
 
17710
    static {
553 chandransh 17711
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 17712
    }
17713
 
553 chandransh 17714
    public getCartsForUser_args() {
48 ashish 17715
    }
17716
 
553 chandransh 17717
    public getCartsForUser_args(
17718
      long userId,
17719
      CartStatus status)
48 ashish 17720
    {
17721
      this();
553 chandransh 17722
      this.userId = userId;
17723
      setUserIdIsSet(true);
17724
      this.status = status;
48 ashish 17725
    }
17726
 
17727
    /**
17728
     * Performs a deep copy on <i>other</i>.
17729
     */
553 chandransh 17730
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 17731
      __isset_bit_vector.clear();
17732
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17733
      this.userId = other.userId;
17734
      if (other.isSetStatus()) {
17735
        this.status = other.status;
48 ashish 17736
      }
17737
    }
17738
 
553 chandransh 17739
    public getCartsForUser_args deepCopy() {
17740
      return new getCartsForUser_args(this);
48 ashish 17741
    }
17742
 
17743
    @Deprecated
553 chandransh 17744
    public getCartsForUser_args clone() {
17745
      return new getCartsForUser_args(this);
48 ashish 17746
    }
17747
 
553 chandransh 17748
    public long getUserId() {
17749
      return this.userId;
48 ashish 17750
    }
17751
 
553 chandransh 17752
    public getCartsForUser_args setUserId(long userId) {
17753
      this.userId = userId;
17754
      setUserIdIsSet(true);
48 ashish 17755
      return this;
17756
    }
17757
 
553 chandransh 17758
    public void unsetUserId() {
48 ashish 17759
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17760
    }
17761
 
553 chandransh 17762
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17763
    public boolean isSetUserId() {
48 ashish 17764
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17765
    }
17766
 
553 chandransh 17767
    public void setUserIdIsSet(boolean value) {
48 ashish 17768
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17769
    }
17770
 
553 chandransh 17771
    /**
17772
     * 
17773
     * @see CartStatus
17774
     */
17775
    public CartStatus getStatus() {
17776
      return this.status;
48 ashish 17777
    }
17778
 
553 chandransh 17779
    /**
17780
     * 
17781
     * @see CartStatus
17782
     */
17783
    public getCartsForUser_args setStatus(CartStatus status) {
17784
      this.status = status;
48 ashish 17785
      return this;
17786
    }
17787
 
553 chandransh 17788
    public void unsetStatus() {
17789
      this.status = null;
48 ashish 17790
    }
17791
 
553 chandransh 17792
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17793
    public boolean isSetStatus() {
17794
      return this.status != null;
48 ashish 17795
    }
17796
 
553 chandransh 17797
    public void setStatusIsSet(boolean value) {
48 ashish 17798
      if (!value) {
553 chandransh 17799
        this.status = null;
48 ashish 17800
      }
17801
    }
17802
 
17803
    public void setFieldValue(_Fields field, Object value) {
17804
      switch (field) {
553 chandransh 17805
      case USER_ID:
48 ashish 17806
        if (value == null) {
553 chandransh 17807
          unsetUserId();
48 ashish 17808
        } else {
553 chandransh 17809
          setUserId((Long)value);
48 ashish 17810
        }
17811
        break;
17812
 
553 chandransh 17813
      case STATUS:
48 ashish 17814
        if (value == null) {
553 chandransh 17815
          unsetStatus();
48 ashish 17816
        } else {
553 chandransh 17817
          setStatus((CartStatus)value);
48 ashish 17818
        }
17819
        break;
17820
 
17821
      }
17822
    }
17823
 
17824
    public void setFieldValue(int fieldID, Object value) {
17825
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17826
    }
17827
 
17828
    public Object getFieldValue(_Fields field) {
17829
      switch (field) {
553 chandransh 17830
      case USER_ID:
17831
        return new Long(getUserId());
48 ashish 17832
 
553 chandransh 17833
      case STATUS:
17834
        return getStatus();
48 ashish 17835
 
17836
      }
17837
      throw new IllegalStateException();
17838
    }
17839
 
17840
    public Object getFieldValue(int fieldId) {
17841
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17842
    }
17843
 
17844
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17845
    public boolean isSet(_Fields field) {
17846
      switch (field) {
553 chandransh 17847
      case USER_ID:
17848
        return isSetUserId();
17849
      case STATUS:
17850
        return isSetStatus();
48 ashish 17851
      }
17852
      throw new IllegalStateException();
17853
    }
17854
 
17855
    public boolean isSet(int fieldID) {
17856
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17857
    }
17858
 
17859
    @Override
17860
    public boolean equals(Object that) {
17861
      if (that == null)
17862
        return false;
553 chandransh 17863
      if (that instanceof getCartsForUser_args)
17864
        return this.equals((getCartsForUser_args)that);
48 ashish 17865
      return false;
17866
    }
17867
 
553 chandransh 17868
    public boolean equals(getCartsForUser_args that) {
48 ashish 17869
      if (that == null)
17870
        return false;
17871
 
553 chandransh 17872
      boolean this_present_userId = true;
17873
      boolean that_present_userId = true;
17874
      if (this_present_userId || that_present_userId) {
17875
        if (!(this_present_userId && that_present_userId))
48 ashish 17876
          return false;
553 chandransh 17877
        if (this.userId != that.userId)
48 ashish 17878
          return false;
17879
      }
17880
 
553 chandransh 17881
      boolean this_present_status = true && this.isSetStatus();
17882
      boolean that_present_status = true && that.isSetStatus();
17883
      if (this_present_status || that_present_status) {
17884
        if (!(this_present_status && that_present_status))
48 ashish 17885
          return false;
553 chandransh 17886
        if (!this.status.equals(that.status))
48 ashish 17887
          return false;
17888
      }
17889
 
17890
      return true;
17891
    }
17892
 
17893
    @Override
17894
    public int hashCode() {
17895
      return 0;
17896
    }
17897
 
553 chandransh 17898
    public int compareTo(getCartsForUser_args other) {
48 ashish 17899
      if (!getClass().equals(other.getClass())) {
17900
        return getClass().getName().compareTo(other.getClass().getName());
17901
      }
17902
 
17903
      int lastComparison = 0;
553 chandransh 17904
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 17905
 
553 chandransh 17906
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17907
      if (lastComparison != 0) {
17908
        return lastComparison;
17909
      }
553 chandransh 17910
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17911
      if (lastComparison != 0) {
17912
        return lastComparison;
17913
      }
553 chandransh 17914
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 17915
      if (lastComparison != 0) {
17916
        return lastComparison;
17917
      }
553 chandransh 17918
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 17919
      if (lastComparison != 0) {
17920
        return lastComparison;
17921
      }
17922
      return 0;
17923
    }
17924
 
17925
    public void read(TProtocol iprot) throws TException {
17926
      TField field;
17927
      iprot.readStructBegin();
17928
      while (true)
17929
      {
17930
        field = iprot.readFieldBegin();
17931
        if (field.type == TType.STOP) { 
17932
          break;
17933
        }
17934
        _Fields fieldId = _Fields.findByThriftId(field.id);
17935
        if (fieldId == null) {
17936
          TProtocolUtil.skip(iprot, field.type);
17937
        } else {
17938
          switch (fieldId) {
553 chandransh 17939
            case USER_ID:
48 ashish 17940
              if (field.type == TType.I64) {
553 chandransh 17941
                this.userId = iprot.readI64();
17942
                setUserIdIsSet(true);
48 ashish 17943
              } else { 
17944
                TProtocolUtil.skip(iprot, field.type);
17945
              }
17946
              break;
553 chandransh 17947
            case STATUS:
17948
              if (field.type == TType.I32) {
17949
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 17950
              } else { 
17951
                TProtocolUtil.skip(iprot, field.type);
17952
              }
17953
              break;
17954
          }
17955
          iprot.readFieldEnd();
17956
        }
17957
      }
17958
      iprot.readStructEnd();
17959
      validate();
17960
    }
17961
 
17962
    public void write(TProtocol oprot) throws TException {
17963
      validate();
17964
 
17965
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17966
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17967
      oprot.writeI64(this.userId);
48 ashish 17968
      oprot.writeFieldEnd();
553 chandransh 17969
      if (this.status != null) {
17970
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17971
        oprot.writeI32(this.status.getValue());
48 ashish 17972
        oprot.writeFieldEnd();
17973
      }
17974
      oprot.writeFieldStop();
17975
      oprot.writeStructEnd();
17976
    }
17977
 
17978
    @Override
17979
    public String toString() {
553 chandransh 17980
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 17981
      boolean first = true;
17982
 
553 chandransh 17983
      sb.append("userId:");
17984
      sb.append(this.userId);
48 ashish 17985
      first = false;
17986
      if (!first) sb.append(", ");
553 chandransh 17987
      sb.append("status:");
17988
      if (this.status == null) {
48 ashish 17989
        sb.append("null");
17990
      } else {
553 chandransh 17991
        String status_name = status.name();
17992
        if (status_name != null) {
17993
          sb.append(status_name);
17994
          sb.append(" (");
17995
        }
17996
        sb.append(this.status);
17997
        if (status_name != null) {
17998
          sb.append(")");
17999
        }
48 ashish 18000
      }
18001
      first = false;
18002
      sb.append(")");
18003
      return sb.toString();
18004
    }
18005
 
18006
    public void validate() throws TException {
18007
      // check for required fields
18008
    }
18009
 
18010
  }
18011
 
553 chandransh 18012
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
18013
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 18014
 
553 chandransh 18015
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18016
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 18017
 
553 chandransh 18018
    private List<Cart> success;
18019
    private ShoppingCartException scx;
48 ashish 18020
 
18021
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18022
    public enum _Fields implements TFieldIdEnum {
18023
      SUCCESS((short)0, "success"),
553 chandransh 18024
      SCX((short)1, "scx");
48 ashish 18025
 
18026
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18027
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18028
 
18029
      static {
18030
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18031
          byId.put((int)field._thriftId, field);
18032
          byName.put(field.getFieldName(), field);
18033
        }
18034
      }
18035
 
18036
      /**
18037
       * Find the _Fields constant that matches fieldId, or null if its not found.
18038
       */
18039
      public static _Fields findByThriftId(int fieldId) {
18040
        return byId.get(fieldId);
18041
      }
18042
 
18043
      /**
18044
       * Find the _Fields constant that matches fieldId, throwing an exception
18045
       * if it is not found.
18046
       */
18047
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18048
        _Fields fields = findByThriftId(fieldId);
18049
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18050
        return fields;
18051
      }
18052
 
18053
      /**
18054
       * Find the _Fields constant that matches name, or null if its not found.
18055
       */
18056
      public static _Fields findByName(String name) {
18057
        return byName.get(name);
18058
      }
18059
 
18060
      private final short _thriftId;
18061
      private final String _fieldName;
18062
 
18063
      _Fields(short thriftId, String fieldName) {
18064
        _thriftId = thriftId;
18065
        _fieldName = fieldName;
18066
      }
18067
 
18068
      public short getThriftFieldId() {
18069
        return _thriftId;
18070
      }
18071
 
18072
      public String getFieldName() {
18073
        return _fieldName;
18074
      }
18075
    }
18076
 
18077
    // isset id assignments
18078
 
18079
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18080
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 18081
          new ListMetaData(TType.LIST, 
18082
              new StructMetaData(TType.STRUCT, Cart.class))));
18083
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 18084
          new FieldValueMetaData(TType.STRUCT)));
18085
    }});
18086
 
18087
    static {
553 chandransh 18088
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 18089
    }
18090
 
553 chandransh 18091
    public getCartsForUser_result() {
48 ashish 18092
    }
18093
 
553 chandransh 18094
    public getCartsForUser_result(
18095
      List<Cart> success,
18096
      ShoppingCartException scx)
48 ashish 18097
    {
18098
      this();
18099
      this.success = success;
553 chandransh 18100
      this.scx = scx;
48 ashish 18101
    }
18102
 
18103
    /**
18104
     * Performs a deep copy on <i>other</i>.
18105
     */
553 chandransh 18106
    public getCartsForUser_result(getCartsForUser_result other) {
18107
      if (other.isSetSuccess()) {
18108
        List<Cart> __this__success = new ArrayList<Cart>();
18109
        for (Cart other_element : other.success) {
18110
          __this__success.add(new Cart(other_element));
18111
        }
18112
        this.success = __this__success;
48 ashish 18113
      }
553 chandransh 18114
      if (other.isSetScx()) {
18115
        this.scx = new ShoppingCartException(other.scx);
18116
      }
48 ashish 18117
    }
18118
 
553 chandransh 18119
    public getCartsForUser_result deepCopy() {
18120
      return new getCartsForUser_result(this);
48 ashish 18121
    }
18122
 
18123
    @Deprecated
553 chandransh 18124
    public getCartsForUser_result clone() {
18125
      return new getCartsForUser_result(this);
48 ashish 18126
    }
18127
 
553 chandransh 18128
    public int getSuccessSize() {
18129
      return (this.success == null) ? 0 : this.success.size();
18130
    }
18131
 
18132
    public java.util.Iterator<Cart> getSuccessIterator() {
18133
      return (this.success == null) ? null : this.success.iterator();
18134
    }
18135
 
18136
    public void addToSuccess(Cart elem) {
18137
      if (this.success == null) {
18138
        this.success = new ArrayList<Cart>();
18139
      }
18140
      this.success.add(elem);
18141
    }
18142
 
18143
    public List<Cart> getSuccess() {
48 ashish 18144
      return this.success;
18145
    }
18146
 
553 chandransh 18147
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 18148
      this.success = success;
18149
      return this;
18150
    }
18151
 
18152
    public void unsetSuccess() {
553 chandransh 18153
      this.success = null;
48 ashish 18154
    }
18155
 
18156
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18157
    public boolean isSetSuccess() {
553 chandransh 18158
      return this.success != null;
48 ashish 18159
    }
18160
 
18161
    public void setSuccessIsSet(boolean value) {
553 chandransh 18162
      if (!value) {
18163
        this.success = null;
18164
      }
48 ashish 18165
    }
18166
 
553 chandransh 18167
    public ShoppingCartException getScx() {
18168
      return this.scx;
48 ashish 18169
    }
18170
 
553 chandransh 18171
    public getCartsForUser_result setScx(ShoppingCartException scx) {
18172
      this.scx = scx;
48 ashish 18173
      return this;
18174
    }
18175
 
553 chandransh 18176
    public void unsetScx() {
18177
      this.scx = null;
48 ashish 18178
    }
18179
 
553 chandransh 18180
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18181
    public boolean isSetScx() {
18182
      return this.scx != null;
48 ashish 18183
    }
18184
 
553 chandransh 18185
    public void setScxIsSet(boolean value) {
48 ashish 18186
      if (!value) {
553 chandransh 18187
        this.scx = null;
48 ashish 18188
      }
18189
    }
18190
 
18191
    public void setFieldValue(_Fields field, Object value) {
18192
      switch (field) {
18193
      case SUCCESS:
18194
        if (value == null) {
18195
          unsetSuccess();
18196
        } else {
553 chandransh 18197
          setSuccess((List<Cart>)value);
48 ashish 18198
        }
18199
        break;
18200
 
553 chandransh 18201
      case SCX:
48 ashish 18202
        if (value == null) {
553 chandransh 18203
          unsetScx();
48 ashish 18204
        } else {
553 chandransh 18205
          setScx((ShoppingCartException)value);
48 ashish 18206
        }
18207
        break;
18208
 
18209
      }
18210
    }
18211
 
18212
    public void setFieldValue(int fieldID, Object value) {
18213
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18214
    }
18215
 
18216
    public Object getFieldValue(_Fields field) {
18217
      switch (field) {
18218
      case SUCCESS:
553 chandransh 18219
        return getSuccess();
48 ashish 18220
 
553 chandransh 18221
      case SCX:
18222
        return getScx();
48 ashish 18223
 
18224
      }
18225
      throw new IllegalStateException();
18226
    }
18227
 
18228
    public Object getFieldValue(int fieldId) {
18229
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18230
    }
18231
 
18232
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18233
    public boolean isSet(_Fields field) {
18234
      switch (field) {
18235
      case SUCCESS:
18236
        return isSetSuccess();
553 chandransh 18237
      case SCX:
18238
        return isSetScx();
48 ashish 18239
      }
18240
      throw new IllegalStateException();
18241
    }
18242
 
18243
    public boolean isSet(int fieldID) {
18244
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18245
    }
18246
 
18247
    @Override
18248
    public boolean equals(Object that) {
18249
      if (that == null)
18250
        return false;
553 chandransh 18251
      if (that instanceof getCartsForUser_result)
18252
        return this.equals((getCartsForUser_result)that);
48 ashish 18253
      return false;
18254
    }
18255
 
553 chandransh 18256
    public boolean equals(getCartsForUser_result that) {
48 ashish 18257
      if (that == null)
18258
        return false;
18259
 
553 chandransh 18260
      boolean this_present_success = true && this.isSetSuccess();
18261
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 18262
      if (this_present_success || that_present_success) {
18263
        if (!(this_present_success && that_present_success))
18264
          return false;
553 chandransh 18265
        if (!this.success.equals(that.success))
48 ashish 18266
          return false;
18267
      }
18268
 
553 chandransh 18269
      boolean this_present_scx = true && this.isSetScx();
18270
      boolean that_present_scx = true && that.isSetScx();
18271
      if (this_present_scx || that_present_scx) {
18272
        if (!(this_present_scx && that_present_scx))
48 ashish 18273
          return false;
553 chandransh 18274
        if (!this.scx.equals(that.scx))
48 ashish 18275
          return false;
18276
      }
18277
 
18278
      return true;
18279
    }
18280
 
18281
    @Override
18282
    public int hashCode() {
18283
      return 0;
18284
    }
18285
 
553 chandransh 18286
    public int compareTo(getCartsForUser_result other) {
48 ashish 18287
      if (!getClass().equals(other.getClass())) {
18288
        return getClass().getName().compareTo(other.getClass().getName());
18289
      }
18290
 
18291
      int lastComparison = 0;
553 chandransh 18292
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 18293
 
18294
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18295
      if (lastComparison != 0) {
18296
        return lastComparison;
18297
      }
18298
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18299
      if (lastComparison != 0) {
18300
        return lastComparison;
18301
      }
553 chandransh 18302
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 18303
      if (lastComparison != 0) {
18304
        return lastComparison;
18305
      }
553 chandransh 18306
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 18307
      if (lastComparison != 0) {
18308
        return lastComparison;
18309
      }
18310
      return 0;
18311
    }
18312
 
18313
    public void read(TProtocol iprot) throws TException {
18314
      TField field;
18315
      iprot.readStructBegin();
18316
      while (true)
18317
      {
18318
        field = iprot.readFieldBegin();
18319
        if (field.type == TType.STOP) { 
18320
          break;
18321
        }
18322
        _Fields fieldId = _Fields.findByThriftId(field.id);
18323
        if (fieldId == null) {
18324
          TProtocolUtil.skip(iprot, field.type);
18325
        } else {
18326
          switch (fieldId) {
18327
            case SUCCESS:
553 chandransh 18328
              if (field.type == TType.LIST) {
18329
                {
771 rajveer 18330
                  TList _list20 = iprot.readListBegin();
18331
                  this.success = new ArrayList<Cart>(_list20.size);
18332
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
553 chandransh 18333
                  {
771 rajveer 18334
                    Cart _elem22;
18335
                    _elem22 = new Cart();
18336
                    _elem22.read(iprot);
18337
                    this.success.add(_elem22);
553 chandransh 18338
                  }
18339
                  iprot.readListEnd();
18340
                }
48 ashish 18341
              } else { 
18342
                TProtocolUtil.skip(iprot, field.type);
18343
              }
18344
              break;
553 chandransh 18345
            case SCX:
48 ashish 18346
              if (field.type == TType.STRUCT) {
553 chandransh 18347
                this.scx = new ShoppingCartException();
18348
                this.scx.read(iprot);
48 ashish 18349
              } else { 
18350
                TProtocolUtil.skip(iprot, field.type);
18351
              }
18352
              break;
18353
          }
18354
          iprot.readFieldEnd();
18355
        }
18356
      }
18357
      iprot.readStructEnd();
18358
      validate();
18359
    }
18360
 
18361
    public void write(TProtocol oprot) throws TException {
18362
      oprot.writeStructBegin(STRUCT_DESC);
18363
 
18364
      if (this.isSetSuccess()) {
18365
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 18366
        {
18367
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 18368
          for (Cart _iter23 : this.success)
553 chandransh 18369
          {
771 rajveer 18370
            _iter23.write(oprot);
553 chandransh 18371
          }
18372
          oprot.writeListEnd();
18373
        }
48 ashish 18374
        oprot.writeFieldEnd();
553 chandransh 18375
      } else if (this.isSetScx()) {
18376
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18377
        this.scx.write(oprot);
48 ashish 18378
        oprot.writeFieldEnd();
18379
      }
18380
      oprot.writeFieldStop();
18381
      oprot.writeStructEnd();
18382
    }
18383
 
18384
    @Override
18385
    public String toString() {
553 chandransh 18386
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 18387
      boolean first = true;
18388
 
18389
      sb.append("success:");
553 chandransh 18390
      if (this.success == null) {
18391
        sb.append("null");
18392
      } else {
18393
        sb.append(this.success);
18394
      }
48 ashish 18395
      first = false;
18396
      if (!first) sb.append(", ");
553 chandransh 18397
      sb.append("scx:");
18398
      if (this.scx == null) {
48 ashish 18399
        sb.append("null");
18400
      } else {
553 chandransh 18401
        sb.append(this.scx);
48 ashish 18402
      }
18403
      first = false;
18404
      sb.append(")");
18405
      return sb.toString();
18406
    }
18407
 
18408
    public void validate() throws TException {
18409
      // check for required fields
18410
    }
18411
 
18412
  }
18413
 
553 chandransh 18414
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
18415
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 18416
 
553 chandransh 18417
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 18418
 
553 chandransh 18419
    private CartStatus status;
48 ashish 18420
 
18421
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18422
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18423
      /**
18424
       * 
18425
       * @see CartStatus
18426
       */
18427
      STATUS((short)1, "status");
48 ashish 18428
 
18429
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18431
 
18432
      static {
18433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18434
          byId.put((int)field._thriftId, field);
18435
          byName.put(field.getFieldName(), field);
18436
        }
18437
      }
18438
 
18439
      /**
18440
       * Find the _Fields constant that matches fieldId, or null if its not found.
18441
       */
18442
      public static _Fields findByThriftId(int fieldId) {
18443
        return byId.get(fieldId);
18444
      }
18445
 
18446
      /**
18447
       * Find the _Fields constant that matches fieldId, throwing an exception
18448
       * if it is not found.
18449
       */
18450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18451
        _Fields fields = findByThriftId(fieldId);
18452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18453
        return fields;
18454
      }
18455
 
18456
      /**
18457
       * Find the _Fields constant that matches name, or null if its not found.
18458
       */
18459
      public static _Fields findByName(String name) {
18460
        return byName.get(name);
18461
      }
18462
 
18463
      private final short _thriftId;
18464
      private final String _fieldName;
18465
 
18466
      _Fields(short thriftId, String fieldName) {
18467
        _thriftId = thriftId;
18468
        _fieldName = fieldName;
18469
      }
18470
 
18471
      public short getThriftFieldId() {
18472
        return _thriftId;
18473
      }
18474
 
18475
      public String getFieldName() {
18476
        return _fieldName;
18477
      }
18478
    }
18479
 
18480
    // isset id assignments
553 chandransh 18481
 
18482
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18483
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18484
          new EnumMetaData(TType.ENUM, CartStatus.class)));
18485
    }});
18486
 
18487
    static {
18488
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
18489
    }
18490
 
18491
    public getCartsByStatus_args() {
18492
    }
18493
 
18494
    public getCartsByStatus_args(
18495
      CartStatus status)
18496
    {
18497
      this();
18498
      this.status = status;
18499
    }
18500
 
18501
    /**
18502
     * Performs a deep copy on <i>other</i>.
18503
     */
18504
    public getCartsByStatus_args(getCartsByStatus_args other) {
18505
      if (other.isSetStatus()) {
18506
        this.status = other.status;
18507
      }
18508
    }
18509
 
18510
    public getCartsByStatus_args deepCopy() {
18511
      return new getCartsByStatus_args(this);
18512
    }
18513
 
18514
    @Deprecated
18515
    public getCartsByStatus_args clone() {
18516
      return new getCartsByStatus_args(this);
18517
    }
18518
 
18519
    /**
18520
     * 
18521
     * @see CartStatus
18522
     */
18523
    public CartStatus getStatus() {
18524
      return this.status;
18525
    }
18526
 
18527
    /**
18528
     * 
18529
     * @see CartStatus
18530
     */
18531
    public getCartsByStatus_args setStatus(CartStatus status) {
18532
      this.status = status;
18533
      return this;
18534
    }
18535
 
18536
    public void unsetStatus() {
18537
      this.status = null;
18538
    }
18539
 
18540
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
18541
    public boolean isSetStatus() {
18542
      return this.status != null;
18543
    }
18544
 
18545
    public void setStatusIsSet(boolean value) {
18546
      if (!value) {
18547
        this.status = null;
18548
      }
18549
    }
18550
 
18551
    public void setFieldValue(_Fields field, Object value) {
18552
      switch (field) {
18553
      case STATUS:
18554
        if (value == null) {
18555
          unsetStatus();
18556
        } else {
18557
          setStatus((CartStatus)value);
18558
        }
18559
        break;
18560
 
18561
      }
18562
    }
18563
 
18564
    public void setFieldValue(int fieldID, Object value) {
18565
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18566
    }
18567
 
18568
    public Object getFieldValue(_Fields field) {
18569
      switch (field) {
18570
      case STATUS:
18571
        return getStatus();
18572
 
18573
      }
18574
      throw new IllegalStateException();
18575
    }
18576
 
18577
    public Object getFieldValue(int fieldId) {
18578
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18579
    }
18580
 
18581
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18582
    public boolean isSet(_Fields field) {
18583
      switch (field) {
18584
      case STATUS:
18585
        return isSetStatus();
18586
      }
18587
      throw new IllegalStateException();
18588
    }
18589
 
18590
    public boolean isSet(int fieldID) {
18591
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18592
    }
18593
 
18594
    @Override
18595
    public boolean equals(Object that) {
18596
      if (that == null)
18597
        return false;
18598
      if (that instanceof getCartsByStatus_args)
18599
        return this.equals((getCartsByStatus_args)that);
18600
      return false;
18601
    }
18602
 
18603
    public boolean equals(getCartsByStatus_args that) {
18604
      if (that == null)
18605
        return false;
18606
 
18607
      boolean this_present_status = true && this.isSetStatus();
18608
      boolean that_present_status = true && that.isSetStatus();
18609
      if (this_present_status || that_present_status) {
18610
        if (!(this_present_status && that_present_status))
18611
          return false;
18612
        if (!this.status.equals(that.status))
18613
          return false;
18614
      }
18615
 
18616
      return true;
18617
    }
18618
 
18619
    @Override
18620
    public int hashCode() {
18621
      return 0;
18622
    }
18623
 
18624
    public int compareTo(getCartsByStatus_args other) {
18625
      if (!getClass().equals(other.getClass())) {
18626
        return getClass().getName().compareTo(other.getClass().getName());
18627
      }
18628
 
18629
      int lastComparison = 0;
18630
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
18631
 
18632
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
18633
      if (lastComparison != 0) {
18634
        return lastComparison;
18635
      }
18636
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
18637
      if (lastComparison != 0) {
18638
        return lastComparison;
18639
      }
18640
      return 0;
18641
    }
18642
 
18643
    public void read(TProtocol iprot) throws TException {
18644
      TField field;
18645
      iprot.readStructBegin();
18646
      while (true)
18647
      {
18648
        field = iprot.readFieldBegin();
18649
        if (field.type == TType.STOP) { 
18650
          break;
18651
        }
18652
        _Fields fieldId = _Fields.findByThriftId(field.id);
18653
        if (fieldId == null) {
18654
          TProtocolUtil.skip(iprot, field.type);
18655
        } else {
18656
          switch (fieldId) {
18657
            case STATUS:
18658
              if (field.type == TType.I32) {
18659
                this.status = CartStatus.findByValue(iprot.readI32());
18660
              } else { 
18661
                TProtocolUtil.skip(iprot, field.type);
18662
              }
18663
              break;
18664
          }
18665
          iprot.readFieldEnd();
18666
        }
18667
      }
18668
      iprot.readStructEnd();
18669
      validate();
18670
    }
18671
 
18672
    public void write(TProtocol oprot) throws TException {
18673
      validate();
18674
 
18675
      oprot.writeStructBegin(STRUCT_DESC);
18676
      if (this.status != null) {
18677
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
18678
        oprot.writeI32(this.status.getValue());
18679
        oprot.writeFieldEnd();
18680
      }
18681
      oprot.writeFieldStop();
18682
      oprot.writeStructEnd();
18683
    }
18684
 
18685
    @Override
18686
    public String toString() {
18687
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
18688
      boolean first = true;
18689
 
18690
      sb.append("status:");
18691
      if (this.status == null) {
18692
        sb.append("null");
18693
      } else {
18694
        String status_name = status.name();
18695
        if (status_name != null) {
18696
          sb.append(status_name);
18697
          sb.append(" (");
18698
        }
18699
        sb.append(this.status);
18700
        if (status_name != null) {
18701
          sb.append(")");
18702
        }
18703
      }
18704
      first = false;
18705
      sb.append(")");
18706
      return sb.toString();
18707
    }
18708
 
18709
    public void validate() throws TException {
18710
      // check for required fields
18711
    }
18712
 
18713
  }
18714
 
18715
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
18716
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
18717
 
18718
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18719
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
18720
 
18721
    private List<Cart> success;
18722
    private ShoppingCartException scx;
18723
 
18724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18725
    public enum _Fields implements TFieldIdEnum {
18726
      SUCCESS((short)0, "success"),
18727
      SCX((short)1, "scx");
18728
 
18729
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18730
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18731
 
18732
      static {
18733
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18734
          byId.put((int)field._thriftId, field);
18735
          byName.put(field.getFieldName(), field);
18736
        }
18737
      }
18738
 
18739
      /**
18740
       * Find the _Fields constant that matches fieldId, or null if its not found.
18741
       */
18742
      public static _Fields findByThriftId(int fieldId) {
18743
        return byId.get(fieldId);
18744
      }
18745
 
18746
      /**
18747
       * Find the _Fields constant that matches fieldId, throwing an exception
18748
       * if it is not found.
18749
       */
18750
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18751
        _Fields fields = findByThriftId(fieldId);
18752
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18753
        return fields;
18754
      }
18755
 
18756
      /**
18757
       * Find the _Fields constant that matches name, or null if its not found.
18758
       */
18759
      public static _Fields findByName(String name) {
18760
        return byName.get(name);
18761
      }
18762
 
18763
      private final short _thriftId;
18764
      private final String _fieldName;
18765
 
18766
      _Fields(short thriftId, String fieldName) {
18767
        _thriftId = thriftId;
18768
        _fieldName = fieldName;
18769
      }
18770
 
18771
      public short getThriftFieldId() {
18772
        return _thriftId;
18773
      }
18774
 
18775
      public String getFieldName() {
18776
        return _fieldName;
18777
      }
18778
    }
18779
 
18780
    // isset id assignments
18781
 
18782
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18783
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18784
          new ListMetaData(TType.LIST, 
18785
              new StructMetaData(TType.STRUCT, Cart.class))));
18786
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18787
          new FieldValueMetaData(TType.STRUCT)));
18788
    }});
18789
 
18790
    static {
18791
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
18792
    }
18793
 
18794
    public getCartsByStatus_result() {
18795
    }
18796
 
18797
    public getCartsByStatus_result(
18798
      List<Cart> success,
18799
      ShoppingCartException scx)
18800
    {
18801
      this();
18802
      this.success = success;
18803
      this.scx = scx;
18804
    }
18805
 
18806
    /**
18807
     * Performs a deep copy on <i>other</i>.
18808
     */
18809
    public getCartsByStatus_result(getCartsByStatus_result other) {
18810
      if (other.isSetSuccess()) {
18811
        List<Cart> __this__success = new ArrayList<Cart>();
18812
        for (Cart other_element : other.success) {
18813
          __this__success.add(new Cart(other_element));
18814
        }
18815
        this.success = __this__success;
18816
      }
18817
      if (other.isSetScx()) {
18818
        this.scx = new ShoppingCartException(other.scx);
18819
      }
18820
    }
18821
 
18822
    public getCartsByStatus_result deepCopy() {
18823
      return new getCartsByStatus_result(this);
18824
    }
18825
 
18826
    @Deprecated
18827
    public getCartsByStatus_result clone() {
18828
      return new getCartsByStatus_result(this);
18829
    }
18830
 
18831
    public int getSuccessSize() {
18832
      return (this.success == null) ? 0 : this.success.size();
18833
    }
18834
 
18835
    public java.util.Iterator<Cart> getSuccessIterator() {
18836
      return (this.success == null) ? null : this.success.iterator();
18837
    }
18838
 
18839
    public void addToSuccess(Cart elem) {
18840
      if (this.success == null) {
18841
        this.success = new ArrayList<Cart>();
18842
      }
18843
      this.success.add(elem);
18844
    }
18845
 
18846
    public List<Cart> getSuccess() {
18847
      return this.success;
18848
    }
18849
 
18850
    public getCartsByStatus_result setSuccess(List<Cart> success) {
18851
      this.success = success;
18852
      return this;
18853
    }
18854
 
18855
    public void unsetSuccess() {
18856
      this.success = null;
18857
    }
18858
 
18859
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18860
    public boolean isSetSuccess() {
18861
      return this.success != null;
18862
    }
18863
 
18864
    public void setSuccessIsSet(boolean value) {
18865
      if (!value) {
18866
        this.success = null;
18867
      }
18868
    }
18869
 
18870
    public ShoppingCartException getScx() {
18871
      return this.scx;
18872
    }
18873
 
18874
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
18875
      this.scx = scx;
18876
      return this;
18877
    }
18878
 
18879
    public void unsetScx() {
18880
      this.scx = null;
18881
    }
18882
 
18883
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18884
    public boolean isSetScx() {
18885
      return this.scx != null;
18886
    }
18887
 
18888
    public void setScxIsSet(boolean value) {
18889
      if (!value) {
18890
        this.scx = null;
18891
      }
18892
    }
18893
 
18894
    public void setFieldValue(_Fields field, Object value) {
18895
      switch (field) {
18896
      case SUCCESS:
18897
        if (value == null) {
18898
          unsetSuccess();
18899
        } else {
18900
          setSuccess((List<Cart>)value);
18901
        }
18902
        break;
18903
 
18904
      case SCX:
18905
        if (value == null) {
18906
          unsetScx();
18907
        } else {
18908
          setScx((ShoppingCartException)value);
18909
        }
18910
        break;
18911
 
18912
      }
18913
    }
18914
 
18915
    public void setFieldValue(int fieldID, Object value) {
18916
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18917
    }
18918
 
18919
    public Object getFieldValue(_Fields field) {
18920
      switch (field) {
18921
      case SUCCESS:
18922
        return getSuccess();
18923
 
18924
      case SCX:
18925
        return getScx();
18926
 
18927
      }
18928
      throw new IllegalStateException();
18929
    }
18930
 
18931
    public Object getFieldValue(int fieldId) {
18932
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18933
    }
18934
 
18935
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18936
    public boolean isSet(_Fields field) {
18937
      switch (field) {
18938
      case SUCCESS:
18939
        return isSetSuccess();
18940
      case SCX:
18941
        return isSetScx();
18942
      }
18943
      throw new IllegalStateException();
18944
    }
18945
 
18946
    public boolean isSet(int fieldID) {
18947
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18948
    }
18949
 
18950
    @Override
18951
    public boolean equals(Object that) {
18952
      if (that == null)
18953
        return false;
18954
      if (that instanceof getCartsByStatus_result)
18955
        return this.equals((getCartsByStatus_result)that);
18956
      return false;
18957
    }
18958
 
18959
    public boolean equals(getCartsByStatus_result that) {
18960
      if (that == null)
18961
        return false;
18962
 
18963
      boolean this_present_success = true && this.isSetSuccess();
18964
      boolean that_present_success = true && that.isSetSuccess();
18965
      if (this_present_success || that_present_success) {
18966
        if (!(this_present_success && that_present_success))
18967
          return false;
18968
        if (!this.success.equals(that.success))
18969
          return false;
18970
      }
18971
 
18972
      boolean this_present_scx = true && this.isSetScx();
18973
      boolean that_present_scx = true && that.isSetScx();
18974
      if (this_present_scx || that_present_scx) {
18975
        if (!(this_present_scx && that_present_scx))
18976
          return false;
18977
        if (!this.scx.equals(that.scx))
18978
          return false;
18979
      }
18980
 
18981
      return true;
18982
    }
18983
 
18984
    @Override
18985
    public int hashCode() {
18986
      return 0;
18987
    }
18988
 
18989
    public int compareTo(getCartsByStatus_result other) {
18990
      if (!getClass().equals(other.getClass())) {
18991
        return getClass().getName().compareTo(other.getClass().getName());
18992
      }
18993
 
18994
      int lastComparison = 0;
18995
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
18996
 
18997
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18998
      if (lastComparison != 0) {
18999
        return lastComparison;
19000
      }
19001
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19002
      if (lastComparison != 0) {
19003
        return lastComparison;
19004
      }
19005
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
19006
      if (lastComparison != 0) {
19007
        return lastComparison;
19008
      }
19009
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
19010
      if (lastComparison != 0) {
19011
        return lastComparison;
19012
      }
19013
      return 0;
19014
    }
19015
 
19016
    public void read(TProtocol iprot) throws TException {
19017
      TField field;
19018
      iprot.readStructBegin();
19019
      while (true)
19020
      {
19021
        field = iprot.readFieldBegin();
19022
        if (field.type == TType.STOP) { 
19023
          break;
19024
        }
19025
        _Fields fieldId = _Fields.findByThriftId(field.id);
19026
        if (fieldId == null) {
19027
          TProtocolUtil.skip(iprot, field.type);
19028
        } else {
19029
          switch (fieldId) {
19030
            case SUCCESS:
19031
              if (field.type == TType.LIST) {
19032
                {
771 rajveer 19033
                  TList _list24 = iprot.readListBegin();
19034
                  this.success = new ArrayList<Cart>(_list24.size);
19035
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
553 chandransh 19036
                  {
771 rajveer 19037
                    Cart _elem26;
19038
                    _elem26 = new Cart();
19039
                    _elem26.read(iprot);
19040
                    this.success.add(_elem26);
553 chandransh 19041
                  }
19042
                  iprot.readListEnd();
19043
                }
19044
              } else { 
19045
                TProtocolUtil.skip(iprot, field.type);
19046
              }
19047
              break;
19048
            case SCX:
19049
              if (field.type == TType.STRUCT) {
19050
                this.scx = new ShoppingCartException();
19051
                this.scx.read(iprot);
19052
              } else { 
19053
                TProtocolUtil.skip(iprot, field.type);
19054
              }
19055
              break;
19056
          }
19057
          iprot.readFieldEnd();
19058
        }
19059
      }
19060
      iprot.readStructEnd();
19061
      validate();
19062
    }
19063
 
19064
    public void write(TProtocol oprot) throws TException {
19065
      oprot.writeStructBegin(STRUCT_DESC);
19066
 
19067
      if (this.isSetSuccess()) {
19068
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19069
        {
19070
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 19071
          for (Cart _iter27 : this.success)
553 chandransh 19072
          {
771 rajveer 19073
            _iter27.write(oprot);
553 chandransh 19074
          }
19075
          oprot.writeListEnd();
19076
        }
19077
        oprot.writeFieldEnd();
19078
      } else if (this.isSetScx()) {
19079
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19080
        this.scx.write(oprot);
19081
        oprot.writeFieldEnd();
19082
      }
19083
      oprot.writeFieldStop();
19084
      oprot.writeStructEnd();
19085
    }
19086
 
19087
    @Override
19088
    public String toString() {
19089
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
19090
      boolean first = true;
19091
 
19092
      sb.append("success:");
19093
      if (this.success == null) {
19094
        sb.append("null");
19095
      } else {
19096
        sb.append(this.success);
19097
      }
19098
      first = false;
19099
      if (!first) sb.append(", ");
19100
      sb.append("scx:");
19101
      if (this.scx == null) {
19102
        sb.append("null");
19103
      } else {
19104
        sb.append(this.scx);
19105
      }
19106
      first = false;
19107
      sb.append(")");
19108
      return sb.toString();
19109
    }
19110
 
19111
    public void validate() throws TException {
19112
      // check for required fields
19113
    }
19114
 
19115
  }
19116
 
19117
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
19118
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
19119
 
19120
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
19121
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
19122
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
19123
 
19124
    private long from_time;
19125
    private long to_time;
19126
    private CartStatus status;
19127
 
19128
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19129
    public enum _Fields implements TFieldIdEnum {
19130
      FROM_TIME((short)1, "from_time"),
19131
      TO_TIME((short)2, "to_time"),
19132
      /**
19133
       * 
19134
       * @see CartStatus
19135
       */
19136
      STATUS((short)3, "status");
19137
 
19138
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19139
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19140
 
19141
      static {
19142
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19143
          byId.put((int)field._thriftId, field);
19144
          byName.put(field.getFieldName(), field);
19145
        }
19146
      }
19147
 
19148
      /**
19149
       * Find the _Fields constant that matches fieldId, or null if its not found.
19150
       */
19151
      public static _Fields findByThriftId(int fieldId) {
19152
        return byId.get(fieldId);
19153
      }
19154
 
19155
      /**
19156
       * Find the _Fields constant that matches fieldId, throwing an exception
19157
       * if it is not found.
19158
       */
19159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19160
        _Fields fields = findByThriftId(fieldId);
19161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19162
        return fields;
19163
      }
19164
 
19165
      /**
19166
       * Find the _Fields constant that matches name, or null if its not found.
19167
       */
19168
      public static _Fields findByName(String name) {
19169
        return byName.get(name);
19170
      }
19171
 
19172
      private final short _thriftId;
19173
      private final String _fieldName;
19174
 
19175
      _Fields(short thriftId, String fieldName) {
19176
        _thriftId = thriftId;
19177
        _fieldName = fieldName;
19178
      }
19179
 
19180
      public short getThriftFieldId() {
19181
        return _thriftId;
19182
      }
19183
 
19184
      public String getFieldName() {
19185
        return _fieldName;
19186
      }
19187
    }
19188
 
19189
    // isset id assignments
19190
    private static final int __FROM_TIME_ISSET_ID = 0;
19191
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 19192
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 19193
 
19194
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19195
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 19196
          new FieldValueMetaData(TType.I64)));
553 chandransh 19197
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
19198
          new FieldValueMetaData(TType.I64)));
19199
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19200
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19201
    }});
19202
 
19203
    static {
553 chandransh 19204
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 19205
    }
19206
 
553 chandransh 19207
    public getCartsByTime_args() {
48 ashish 19208
    }
19209
 
553 chandransh 19210
    public getCartsByTime_args(
19211
      long from_time,
19212
      long to_time,
19213
      CartStatus status)
48 ashish 19214
    {
19215
      this();
553 chandransh 19216
      this.from_time = from_time;
19217
      setFrom_timeIsSet(true);
19218
      this.to_time = to_time;
19219
      setTo_timeIsSet(true);
19220
      this.status = status;
48 ashish 19221
    }
19222
 
19223
    /**
19224
     * Performs a deep copy on <i>other</i>.
19225
     */
553 chandransh 19226
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 19227
      __isset_bit_vector.clear();
19228
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19229
      this.from_time = other.from_time;
19230
      this.to_time = other.to_time;
19231
      if (other.isSetStatus()) {
19232
        this.status = other.status;
19233
      }
48 ashish 19234
    }
19235
 
553 chandransh 19236
    public getCartsByTime_args deepCopy() {
19237
      return new getCartsByTime_args(this);
48 ashish 19238
    }
19239
 
19240
    @Deprecated
553 chandransh 19241
    public getCartsByTime_args clone() {
19242
      return new getCartsByTime_args(this);
48 ashish 19243
    }
19244
 
553 chandransh 19245
    public long getFrom_time() {
19246
      return this.from_time;
48 ashish 19247
    }
19248
 
553 chandransh 19249
    public getCartsByTime_args setFrom_time(long from_time) {
19250
      this.from_time = from_time;
19251
      setFrom_timeIsSet(true);
48 ashish 19252
      return this;
19253
    }
19254
 
553 chandransh 19255
    public void unsetFrom_time() {
19256
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 19257
    }
19258
 
553 chandransh 19259
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
19260
    public boolean isSetFrom_time() {
19261
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 19262
    }
19263
 
553 chandransh 19264
    public void setFrom_timeIsSet(boolean value) {
19265
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 19266
    }
19267
 
553 chandransh 19268
    public long getTo_time() {
19269
      return this.to_time;
123 ashish 19270
    }
19271
 
553 chandransh 19272
    public getCartsByTime_args setTo_time(long to_time) {
19273
      this.to_time = to_time;
19274
      setTo_timeIsSet(true);
123 ashish 19275
      return this;
19276
    }
19277
 
553 chandransh 19278
    public void unsetTo_time() {
19279
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 19280
    }
19281
 
553 chandransh 19282
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
19283
    public boolean isSetTo_time() {
19284
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 19285
    }
19286
 
553 chandransh 19287
    public void setTo_timeIsSet(boolean value) {
19288
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 19289
    }
19290
 
553 chandransh 19291
    /**
19292
     * 
19293
     * @see CartStatus
19294
     */
19295
    public CartStatus getStatus() {
19296
      return this.status;
19297
    }
19298
 
19299
    /**
19300
     * 
19301
     * @see CartStatus
19302
     */
19303
    public getCartsByTime_args setStatus(CartStatus status) {
19304
      this.status = status;
19305
      return this;
19306
    }
19307
 
19308
    public void unsetStatus() {
19309
      this.status = null;
19310
    }
19311
 
19312
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19313
    public boolean isSetStatus() {
19314
      return this.status != null;
19315
    }
19316
 
19317
    public void setStatusIsSet(boolean value) {
19318
      if (!value) {
19319
        this.status = null;
19320
      }
19321
    }
19322
 
48 ashish 19323
    public void setFieldValue(_Fields field, Object value) {
19324
      switch (field) {
553 chandransh 19325
      case FROM_TIME:
48 ashish 19326
        if (value == null) {
553 chandransh 19327
          unsetFrom_time();
48 ashish 19328
        } else {
553 chandransh 19329
          setFrom_time((Long)value);
48 ashish 19330
        }
19331
        break;
19332
 
553 chandransh 19333
      case TO_TIME:
123 ashish 19334
        if (value == null) {
553 chandransh 19335
          unsetTo_time();
123 ashish 19336
        } else {
553 chandransh 19337
          setTo_time((Long)value);
123 ashish 19338
        }
19339
        break;
19340
 
553 chandransh 19341
      case STATUS:
19342
        if (value == null) {
19343
          unsetStatus();
19344
        } else {
19345
          setStatus((CartStatus)value);
19346
        }
19347
        break;
19348
 
48 ashish 19349
      }
19350
    }
19351
 
19352
    public void setFieldValue(int fieldID, Object value) {
19353
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19354
    }
19355
 
19356
    public Object getFieldValue(_Fields field) {
19357
      switch (field) {
553 chandransh 19358
      case FROM_TIME:
19359
        return new Long(getFrom_time());
48 ashish 19360
 
553 chandransh 19361
      case TO_TIME:
19362
        return new Long(getTo_time());
123 ashish 19363
 
553 chandransh 19364
      case STATUS:
19365
        return getStatus();
19366
 
48 ashish 19367
      }
19368
      throw new IllegalStateException();
19369
    }
19370
 
19371
    public Object getFieldValue(int fieldId) {
19372
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19373
    }
19374
 
19375
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19376
    public boolean isSet(_Fields field) {
19377
      switch (field) {
553 chandransh 19378
      case FROM_TIME:
19379
        return isSetFrom_time();
19380
      case TO_TIME:
19381
        return isSetTo_time();
19382
      case STATUS:
19383
        return isSetStatus();
48 ashish 19384
      }
19385
      throw new IllegalStateException();
19386
    }
19387
 
19388
    public boolean isSet(int fieldID) {
19389
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19390
    }
19391
 
19392
    @Override
19393
    public boolean equals(Object that) {
19394
      if (that == null)
19395
        return false;
553 chandransh 19396
      if (that instanceof getCartsByTime_args)
19397
        return this.equals((getCartsByTime_args)that);
48 ashish 19398
      return false;
19399
    }
19400
 
553 chandransh 19401
    public boolean equals(getCartsByTime_args that) {
48 ashish 19402
      if (that == null)
19403
        return false;
19404
 
553 chandransh 19405
      boolean this_present_from_time = true;
19406
      boolean that_present_from_time = true;
19407
      if (this_present_from_time || that_present_from_time) {
19408
        if (!(this_present_from_time && that_present_from_time))
48 ashish 19409
          return false;
553 chandransh 19410
        if (this.from_time != that.from_time)
48 ashish 19411
          return false;
19412
      }
19413
 
553 chandransh 19414
      boolean this_present_to_time = true;
19415
      boolean that_present_to_time = true;
19416
      if (this_present_to_time || that_present_to_time) {
19417
        if (!(this_present_to_time && that_present_to_time))
123 ashish 19418
          return false;
553 chandransh 19419
        if (this.to_time != that.to_time)
123 ashish 19420
          return false;
19421
      }
19422
 
553 chandransh 19423
      boolean this_present_status = true && this.isSetStatus();
19424
      boolean that_present_status = true && that.isSetStatus();
19425
      if (this_present_status || that_present_status) {
19426
        if (!(this_present_status && that_present_status))
19427
          return false;
19428
        if (!this.status.equals(that.status))
19429
          return false;
19430
      }
19431
 
48 ashish 19432
      return true;
19433
    }
19434
 
19435
    @Override
19436
    public int hashCode() {
19437
      return 0;
19438
    }
19439
 
553 chandransh 19440
    public int compareTo(getCartsByTime_args other) {
48 ashish 19441
      if (!getClass().equals(other.getClass())) {
19442
        return getClass().getName().compareTo(other.getClass().getName());
19443
      }
19444
 
19445
      int lastComparison = 0;
553 chandransh 19446
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 19447
 
553 chandransh 19448
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 19449
      if (lastComparison != 0) {
19450
        return lastComparison;
19451
      }
553 chandransh 19452
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 19453
      if (lastComparison != 0) {
19454
        return lastComparison;
19455
      }
553 chandransh 19456
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 19457
      if (lastComparison != 0) {
19458
        return lastComparison;
19459
      }
553 chandransh 19460
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 19461
      if (lastComparison != 0) {
19462
        return lastComparison;
19463
      }
553 chandransh 19464
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19465
      if (lastComparison != 0) {
19466
        return lastComparison;
19467
      }
19468
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19469
      if (lastComparison != 0) {
19470
        return lastComparison;
19471
      }
48 ashish 19472
      return 0;
19473
    }
19474
 
19475
    public void read(TProtocol iprot) throws TException {
19476
      TField field;
19477
      iprot.readStructBegin();
19478
      while (true)
19479
      {
19480
        field = iprot.readFieldBegin();
19481
        if (field.type == TType.STOP) { 
19482
          break;
19483
        }
19484
        _Fields fieldId = _Fields.findByThriftId(field.id);
19485
        if (fieldId == null) {
19486
          TProtocolUtil.skip(iprot, field.type);
19487
        } else {
19488
          switch (fieldId) {
553 chandransh 19489
            case FROM_TIME:
48 ashish 19490
              if (field.type == TType.I64) {
553 chandransh 19491
                this.from_time = iprot.readI64();
19492
                setFrom_timeIsSet(true);
48 ashish 19493
              } else { 
19494
                TProtocolUtil.skip(iprot, field.type);
19495
              }
19496
              break;
553 chandransh 19497
            case TO_TIME:
19498
              if (field.type == TType.I64) {
19499
                this.to_time = iprot.readI64();
19500
                setTo_timeIsSet(true);
123 ashish 19501
              } else { 
19502
                TProtocolUtil.skip(iprot, field.type);
19503
              }
19504
              break;
553 chandransh 19505
            case STATUS:
19506
              if (field.type == TType.I32) {
19507
                this.status = CartStatus.findByValue(iprot.readI32());
19508
              } else { 
19509
                TProtocolUtil.skip(iprot, field.type);
19510
              }
19511
              break;
48 ashish 19512
          }
19513
          iprot.readFieldEnd();
19514
        }
19515
      }
19516
      iprot.readStructEnd();
19517
      validate();
19518
    }
19519
 
19520
    public void write(TProtocol oprot) throws TException {
19521
      validate();
19522
 
19523
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19524
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
19525
      oprot.writeI64(this.from_time);
48 ashish 19526
      oprot.writeFieldEnd();
553 chandransh 19527
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
19528
      oprot.writeI64(this.to_time);
123 ashish 19529
      oprot.writeFieldEnd();
553 chandransh 19530
      if (this.status != null) {
19531
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19532
        oprot.writeI32(this.status.getValue());
19533
        oprot.writeFieldEnd();
19534
      }
48 ashish 19535
      oprot.writeFieldStop();
19536
      oprot.writeStructEnd();
19537
    }
19538
 
19539
    @Override
19540
    public String toString() {
553 chandransh 19541
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 19542
      boolean first = true;
19543
 
553 chandransh 19544
      sb.append("from_time:");
19545
      sb.append(this.from_time);
48 ashish 19546
      first = false;
123 ashish 19547
      if (!first) sb.append(", ");
553 chandransh 19548
      sb.append("to_time:");
19549
      sb.append(this.to_time);
123 ashish 19550
      first = false;
553 chandransh 19551
      if (!first) sb.append(", ");
19552
      sb.append("status:");
19553
      if (this.status == null) {
19554
        sb.append("null");
19555
      } else {
19556
        String status_name = status.name();
19557
        if (status_name != null) {
19558
          sb.append(status_name);
19559
          sb.append(" (");
19560
        }
19561
        sb.append(this.status);
19562
        if (status_name != null) {
19563
          sb.append(")");
19564
        }
19565
      }
19566
      first = false;
48 ashish 19567
      sb.append(")");
19568
      return sb.toString();
19569
    }
19570
 
19571
    public void validate() throws TException {
19572
      // check for required fields
19573
    }
19574
 
19575
  }
19576
 
553 chandransh 19577
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
19578
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 19579
 
553 chandransh 19580
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19581
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19582
 
553 chandransh 19583
    private List<Cart> success;
19584
    private ShoppingCartException scx;
48 ashish 19585
 
19586
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19587
    public enum _Fields implements TFieldIdEnum {
19588
      SUCCESS((short)0, "success"),
553 chandransh 19589
      SCX((short)1, "scx");
48 ashish 19590
 
19591
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19592
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19593
 
19594
      static {
19595
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19596
          byId.put((int)field._thriftId, field);
19597
          byName.put(field.getFieldName(), field);
19598
        }
19599
      }
19600
 
19601
      /**
19602
       * Find the _Fields constant that matches fieldId, or null if its not found.
19603
       */
19604
      public static _Fields findByThriftId(int fieldId) {
19605
        return byId.get(fieldId);
19606
      }
19607
 
19608
      /**
19609
       * Find the _Fields constant that matches fieldId, throwing an exception
19610
       * if it is not found.
19611
       */
19612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19613
        _Fields fields = findByThriftId(fieldId);
19614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19615
        return fields;
19616
      }
19617
 
19618
      /**
19619
       * Find the _Fields constant that matches name, or null if its not found.
19620
       */
19621
      public static _Fields findByName(String name) {
19622
        return byName.get(name);
19623
      }
19624
 
19625
      private final short _thriftId;
19626
      private final String _fieldName;
19627
 
19628
      _Fields(short thriftId, String fieldName) {
19629
        _thriftId = thriftId;
19630
        _fieldName = fieldName;
19631
      }
19632
 
19633
      public short getThriftFieldId() {
19634
        return _thriftId;
19635
      }
19636
 
19637
      public String getFieldName() {
19638
        return _fieldName;
19639
      }
19640
    }
19641
 
19642
    // isset id assignments
19643
 
19644
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19645
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 19646
          new ListMetaData(TType.LIST, 
19647
              new StructMetaData(TType.STRUCT, Cart.class))));
19648
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19649
          new FieldValueMetaData(TType.STRUCT)));
19650
    }});
19651
 
19652
    static {
553 chandransh 19653
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 19654
    }
19655
 
553 chandransh 19656
    public getCartsByTime_result() {
48 ashish 19657
    }
19658
 
553 chandransh 19659
    public getCartsByTime_result(
19660
      List<Cart> success,
19661
      ShoppingCartException scx)
48 ashish 19662
    {
19663
      this();
19664
      this.success = success;
553 chandransh 19665
      this.scx = scx;
48 ashish 19666
    }
19667
 
19668
    /**
19669
     * Performs a deep copy on <i>other</i>.
19670
     */
553 chandransh 19671
    public getCartsByTime_result(getCartsByTime_result other) {
19672
      if (other.isSetSuccess()) {
19673
        List<Cart> __this__success = new ArrayList<Cart>();
19674
        for (Cart other_element : other.success) {
19675
          __this__success.add(new Cart(other_element));
19676
        }
19677
        this.success = __this__success;
48 ashish 19678
      }
553 chandransh 19679
      if (other.isSetScx()) {
19680
        this.scx = new ShoppingCartException(other.scx);
19681
      }
48 ashish 19682
    }
19683
 
553 chandransh 19684
    public getCartsByTime_result deepCopy() {
19685
      return new getCartsByTime_result(this);
48 ashish 19686
    }
19687
 
19688
    @Deprecated
553 chandransh 19689
    public getCartsByTime_result clone() {
19690
      return new getCartsByTime_result(this);
48 ashish 19691
    }
19692
 
553 chandransh 19693
    public int getSuccessSize() {
19694
      return (this.success == null) ? 0 : this.success.size();
19695
    }
19696
 
19697
    public java.util.Iterator<Cart> getSuccessIterator() {
19698
      return (this.success == null) ? null : this.success.iterator();
19699
    }
19700
 
19701
    public void addToSuccess(Cart elem) {
19702
      if (this.success == null) {
19703
        this.success = new ArrayList<Cart>();
19704
      }
19705
      this.success.add(elem);
19706
    }
19707
 
19708
    public List<Cart> getSuccess() {
48 ashish 19709
      return this.success;
19710
    }
19711
 
553 chandransh 19712
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 19713
      this.success = success;
19714
      return this;
19715
    }
19716
 
19717
    public void unsetSuccess() {
553 chandransh 19718
      this.success = null;
48 ashish 19719
    }
19720
 
19721
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19722
    public boolean isSetSuccess() {
553 chandransh 19723
      return this.success != null;
48 ashish 19724
    }
19725
 
19726
    public void setSuccessIsSet(boolean value) {
553 chandransh 19727
      if (!value) {
19728
        this.success = null;
19729
      }
48 ashish 19730
    }
19731
 
553 chandransh 19732
    public ShoppingCartException getScx() {
19733
      return this.scx;
48 ashish 19734
    }
19735
 
553 chandransh 19736
    public getCartsByTime_result setScx(ShoppingCartException scx) {
19737
      this.scx = scx;
48 ashish 19738
      return this;
19739
    }
19740
 
553 chandransh 19741
    public void unsetScx() {
19742
      this.scx = null;
48 ashish 19743
    }
19744
 
553 chandransh 19745
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19746
    public boolean isSetScx() {
19747
      return this.scx != null;
48 ashish 19748
    }
19749
 
553 chandransh 19750
    public void setScxIsSet(boolean value) {
48 ashish 19751
      if (!value) {
553 chandransh 19752
        this.scx = null;
48 ashish 19753
      }
19754
    }
19755
 
19756
    public void setFieldValue(_Fields field, Object value) {
19757
      switch (field) {
19758
      case SUCCESS:
19759
        if (value == null) {
19760
          unsetSuccess();
19761
        } else {
553 chandransh 19762
          setSuccess((List<Cart>)value);
48 ashish 19763
        }
19764
        break;
19765
 
553 chandransh 19766
      case SCX:
48 ashish 19767
        if (value == null) {
553 chandransh 19768
          unsetScx();
48 ashish 19769
        } else {
553 chandransh 19770
          setScx((ShoppingCartException)value);
48 ashish 19771
        }
19772
        break;
19773
 
19774
      }
19775
    }
19776
 
19777
    public void setFieldValue(int fieldID, Object value) {
19778
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19779
    }
19780
 
19781
    public Object getFieldValue(_Fields field) {
19782
      switch (field) {
19783
      case SUCCESS:
553 chandransh 19784
        return getSuccess();
48 ashish 19785
 
553 chandransh 19786
      case SCX:
19787
        return getScx();
48 ashish 19788
 
19789
      }
19790
      throw new IllegalStateException();
19791
    }
19792
 
19793
    public Object getFieldValue(int fieldId) {
19794
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19795
    }
19796
 
19797
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19798
    public boolean isSet(_Fields field) {
19799
      switch (field) {
19800
      case SUCCESS:
19801
        return isSetSuccess();
553 chandransh 19802
      case SCX:
19803
        return isSetScx();
48 ashish 19804
      }
19805
      throw new IllegalStateException();
19806
    }
19807
 
19808
    public boolean isSet(int fieldID) {
19809
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19810
    }
19811
 
19812
    @Override
19813
    public boolean equals(Object that) {
19814
      if (that == null)
19815
        return false;
553 chandransh 19816
      if (that instanceof getCartsByTime_result)
19817
        return this.equals((getCartsByTime_result)that);
48 ashish 19818
      return false;
19819
    }
19820
 
553 chandransh 19821
    public boolean equals(getCartsByTime_result that) {
48 ashish 19822
      if (that == null)
19823
        return false;
19824
 
553 chandransh 19825
      boolean this_present_success = true && this.isSetSuccess();
19826
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 19827
      if (this_present_success || that_present_success) {
19828
        if (!(this_present_success && that_present_success))
19829
          return false;
553 chandransh 19830
        if (!this.success.equals(that.success))
48 ashish 19831
          return false;
19832
      }
19833
 
553 chandransh 19834
      boolean this_present_scx = true && this.isSetScx();
19835
      boolean that_present_scx = true && that.isSetScx();
19836
      if (this_present_scx || that_present_scx) {
19837
        if (!(this_present_scx && that_present_scx))
48 ashish 19838
          return false;
553 chandransh 19839
        if (!this.scx.equals(that.scx))
48 ashish 19840
          return false;
19841
      }
19842
 
19843
      return true;
19844
    }
19845
 
19846
    @Override
19847
    public int hashCode() {
19848
      return 0;
19849
    }
19850
 
553 chandransh 19851
    public int compareTo(getCartsByTime_result other) {
48 ashish 19852
      if (!getClass().equals(other.getClass())) {
19853
        return getClass().getName().compareTo(other.getClass().getName());
19854
      }
19855
 
19856
      int lastComparison = 0;
553 chandransh 19857
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 19858
 
19859
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19860
      if (lastComparison != 0) {
19861
        return lastComparison;
19862
      }
19863
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19864
      if (lastComparison != 0) {
19865
        return lastComparison;
19866
      }
553 chandransh 19867
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19868
      if (lastComparison != 0) {
19869
        return lastComparison;
19870
      }
553 chandransh 19871
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19872
      if (lastComparison != 0) {
19873
        return lastComparison;
19874
      }
19875
      return 0;
19876
    }
19877
 
19878
    public void read(TProtocol iprot) throws TException {
19879
      TField field;
19880
      iprot.readStructBegin();
19881
      while (true)
19882
      {
19883
        field = iprot.readFieldBegin();
19884
        if (field.type == TType.STOP) { 
19885
          break;
19886
        }
19887
        _Fields fieldId = _Fields.findByThriftId(field.id);
19888
        if (fieldId == null) {
19889
          TProtocolUtil.skip(iprot, field.type);
19890
        } else {
19891
          switch (fieldId) {
19892
            case SUCCESS:
553 chandransh 19893
              if (field.type == TType.LIST) {
19894
                {
771 rajveer 19895
                  TList _list28 = iprot.readListBegin();
19896
                  this.success = new ArrayList<Cart>(_list28.size);
19897
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 19898
                  {
771 rajveer 19899
                    Cart _elem30;
19900
                    _elem30 = new Cart();
19901
                    _elem30.read(iprot);
19902
                    this.success.add(_elem30);
553 chandransh 19903
                  }
19904
                  iprot.readListEnd();
19905
                }
48 ashish 19906
              } else { 
19907
                TProtocolUtil.skip(iprot, field.type);
19908
              }
19909
              break;
553 chandransh 19910
            case SCX:
48 ashish 19911
              if (field.type == TType.STRUCT) {
553 chandransh 19912
                this.scx = new ShoppingCartException();
19913
                this.scx.read(iprot);
48 ashish 19914
              } else { 
19915
                TProtocolUtil.skip(iprot, field.type);
19916
              }
19917
              break;
19918
          }
19919
          iprot.readFieldEnd();
19920
        }
19921
      }
19922
      iprot.readStructEnd();
19923
      validate();
19924
    }
19925
 
19926
    public void write(TProtocol oprot) throws TException {
19927
      oprot.writeStructBegin(STRUCT_DESC);
19928
 
19929
      if (this.isSetSuccess()) {
19930
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19931
        {
19932
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 19933
          for (Cart _iter31 : this.success)
553 chandransh 19934
          {
771 rajveer 19935
            _iter31.write(oprot);
553 chandransh 19936
          }
19937
          oprot.writeListEnd();
19938
        }
48 ashish 19939
        oprot.writeFieldEnd();
553 chandransh 19940
      } else if (this.isSetScx()) {
19941
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19942
        this.scx.write(oprot);
48 ashish 19943
        oprot.writeFieldEnd();
19944
      }
19945
      oprot.writeFieldStop();
19946
      oprot.writeStructEnd();
19947
    }
19948
 
19949
    @Override
19950
    public String toString() {
553 chandransh 19951
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 19952
      boolean first = true;
19953
 
19954
      sb.append("success:");
553 chandransh 19955
      if (this.success == null) {
19956
        sb.append("null");
19957
      } else {
19958
        sb.append(this.success);
19959
      }
48 ashish 19960
      first = false;
19961
      if (!first) sb.append(", ");
553 chandransh 19962
      sb.append("scx:");
19963
      if (this.scx == null) {
48 ashish 19964
        sb.append("null");
19965
      } else {
553 chandransh 19966
        sb.append(this.scx);
48 ashish 19967
      }
19968
      first = false;
19969
      sb.append(")");
19970
      return sb.toString();
19971
    }
19972
 
19973
    public void validate() throws TException {
19974
      // check for required fields
19975
    }
19976
 
19977
  }
19978
 
553 chandransh 19979
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
19980
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 19981
 
553 chandransh 19982
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19983
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 19984
 
553 chandransh 19985
    private long cartId;
19986
    private CartStatus status;
48 ashish 19987
 
19988
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19989
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19990
      CART_ID((short)1, "cartId"),
19991
      /**
19992
       * 
19993
       * @see CartStatus
19994
       */
19995
      STATUS((short)2, "status");
48 ashish 19996
 
19997
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19998
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19999
 
20000
      static {
20001
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20002
          byId.put((int)field._thriftId, field);
20003
          byName.put(field.getFieldName(), field);
20004
        }
20005
      }
20006
 
20007
      /**
20008
       * Find the _Fields constant that matches fieldId, or null if its not found.
20009
       */
20010
      public static _Fields findByThriftId(int fieldId) {
20011
        return byId.get(fieldId);
20012
      }
20013
 
20014
      /**
20015
       * Find the _Fields constant that matches fieldId, throwing an exception
20016
       * if it is not found.
20017
       */
20018
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20019
        _Fields fields = findByThriftId(fieldId);
20020
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20021
        return fields;
20022
      }
20023
 
20024
      /**
20025
       * Find the _Fields constant that matches name, or null if its not found.
20026
       */
20027
      public static _Fields findByName(String name) {
20028
        return byName.get(name);
20029
      }
20030
 
20031
      private final short _thriftId;
20032
      private final String _fieldName;
20033
 
20034
      _Fields(short thriftId, String fieldName) {
20035
        _thriftId = thriftId;
20036
        _fieldName = fieldName;
20037
      }
20038
 
20039
      public short getThriftFieldId() {
20040
        return _thriftId;
20041
      }
20042
 
20043
      public String getFieldName() {
20044
        return _fieldName;
20045
      }
20046
    }
20047
 
20048
    // isset id assignments
553 chandransh 20049
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 20050
    private BitSet __isset_bit_vector = new BitSet(1);
20051
 
20052
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20053
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 20054
          new FieldValueMetaData(TType.I64)));
553 chandransh 20055
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
20056
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 20057
    }});
20058
 
20059
    static {
553 chandransh 20060
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 20061
    }
20062
 
553 chandransh 20063
    public changeCartStatus_args() {
48 ashish 20064
    }
20065
 
553 chandransh 20066
    public changeCartStatus_args(
20067
      long cartId,
20068
      CartStatus status)
48 ashish 20069
    {
20070
      this();
553 chandransh 20071
      this.cartId = cartId;
20072
      setCartIdIsSet(true);
20073
      this.status = status;
48 ashish 20074
    }
20075
 
20076
    /**
20077
     * Performs a deep copy on <i>other</i>.
20078
     */
553 chandransh 20079
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 20080
      __isset_bit_vector.clear();
20081
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20082
      this.cartId = other.cartId;
20083
      if (other.isSetStatus()) {
20084
        this.status = other.status;
20085
      }
48 ashish 20086
    }
20087
 
553 chandransh 20088
    public changeCartStatus_args deepCopy() {
20089
      return new changeCartStatus_args(this);
48 ashish 20090
    }
20091
 
20092
    @Deprecated
553 chandransh 20093
    public changeCartStatus_args clone() {
20094
      return new changeCartStatus_args(this);
48 ashish 20095
    }
20096
 
553 chandransh 20097
    public long getCartId() {
20098
      return this.cartId;
48 ashish 20099
    }
20100
 
553 chandransh 20101
    public changeCartStatus_args setCartId(long cartId) {
20102
      this.cartId = cartId;
20103
      setCartIdIsSet(true);
48 ashish 20104
      return this;
20105
    }
20106
 
553 chandransh 20107
    public void unsetCartId() {
20108
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20109
    }
20110
 
553 chandransh 20111
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20112
    public boolean isSetCartId() {
20113
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20114
    }
20115
 
553 chandransh 20116
    public void setCartIdIsSet(boolean value) {
20117
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20118
    }
20119
 
553 chandransh 20120
    /**
20121
     * 
20122
     * @see CartStatus
20123
     */
20124
    public CartStatus getStatus() {
20125
      return this.status;
20126
    }
20127
 
20128
    /**
20129
     * 
20130
     * @see CartStatus
20131
     */
20132
    public changeCartStatus_args setStatus(CartStatus status) {
20133
      this.status = status;
20134
      return this;
20135
    }
20136
 
20137
    public void unsetStatus() {
20138
      this.status = null;
20139
    }
20140
 
20141
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
20142
    public boolean isSetStatus() {
20143
      return this.status != null;
20144
    }
20145
 
20146
    public void setStatusIsSet(boolean value) {
20147
      if (!value) {
20148
        this.status = null;
20149
      }
20150
    }
20151
 
48 ashish 20152
    public void setFieldValue(_Fields field, Object value) {
20153
      switch (field) {
553 chandransh 20154
      case CART_ID:
48 ashish 20155
        if (value == null) {
553 chandransh 20156
          unsetCartId();
48 ashish 20157
        } else {
553 chandransh 20158
          setCartId((Long)value);
48 ashish 20159
        }
20160
        break;
20161
 
553 chandransh 20162
      case STATUS:
20163
        if (value == null) {
20164
          unsetStatus();
20165
        } else {
20166
          setStatus((CartStatus)value);
20167
        }
20168
        break;
20169
 
48 ashish 20170
      }
20171
    }
20172
 
20173
    public void setFieldValue(int fieldID, Object value) {
20174
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20175
    }
20176
 
20177
    public Object getFieldValue(_Fields field) {
20178
      switch (field) {
553 chandransh 20179
      case CART_ID:
20180
        return new Long(getCartId());
48 ashish 20181
 
553 chandransh 20182
      case STATUS:
20183
        return getStatus();
20184
 
48 ashish 20185
      }
20186
      throw new IllegalStateException();
20187
    }
20188
 
20189
    public Object getFieldValue(int fieldId) {
20190
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20191
    }
20192
 
20193
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20194
    public boolean isSet(_Fields field) {
20195
      switch (field) {
553 chandransh 20196
      case CART_ID:
20197
        return isSetCartId();
20198
      case STATUS:
20199
        return isSetStatus();
48 ashish 20200
      }
20201
      throw new IllegalStateException();
20202
    }
20203
 
20204
    public boolean isSet(int fieldID) {
20205
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20206
    }
20207
 
20208
    @Override
20209
    public boolean equals(Object that) {
20210
      if (that == null)
20211
        return false;
553 chandransh 20212
      if (that instanceof changeCartStatus_args)
20213
        return this.equals((changeCartStatus_args)that);
48 ashish 20214
      return false;
20215
    }
20216
 
553 chandransh 20217
    public boolean equals(changeCartStatus_args that) {
48 ashish 20218
      if (that == null)
20219
        return false;
20220
 
553 chandransh 20221
      boolean this_present_cartId = true;
20222
      boolean that_present_cartId = true;
20223
      if (this_present_cartId || that_present_cartId) {
20224
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20225
          return false;
553 chandransh 20226
        if (this.cartId != that.cartId)
48 ashish 20227
          return false;
20228
      }
20229
 
553 chandransh 20230
      boolean this_present_status = true && this.isSetStatus();
20231
      boolean that_present_status = true && that.isSetStatus();
20232
      if (this_present_status || that_present_status) {
20233
        if (!(this_present_status && that_present_status))
20234
          return false;
20235
        if (!this.status.equals(that.status))
20236
          return false;
20237
      }
20238
 
48 ashish 20239
      return true;
20240
    }
20241
 
20242
    @Override
20243
    public int hashCode() {
20244
      return 0;
20245
    }
20246
 
553 chandransh 20247
    public int compareTo(changeCartStatus_args other) {
48 ashish 20248
      if (!getClass().equals(other.getClass())) {
20249
        return getClass().getName().compareTo(other.getClass().getName());
20250
      }
20251
 
20252
      int lastComparison = 0;
553 chandransh 20253
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 20254
 
553 chandransh 20255
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20256
      if (lastComparison != 0) {
20257
        return lastComparison;
20258
      }
553 chandransh 20259
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20260
      if (lastComparison != 0) {
20261
        return lastComparison;
20262
      }
553 chandransh 20263
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
20264
      if (lastComparison != 0) {
20265
        return lastComparison;
20266
      }
20267
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
20268
      if (lastComparison != 0) {
20269
        return lastComparison;
20270
      }
48 ashish 20271
      return 0;
20272
    }
20273
 
20274
    public void read(TProtocol iprot) throws TException {
20275
      TField field;
20276
      iprot.readStructBegin();
20277
      while (true)
20278
      {
20279
        field = iprot.readFieldBegin();
20280
        if (field.type == TType.STOP) { 
20281
          break;
20282
        }
20283
        _Fields fieldId = _Fields.findByThriftId(field.id);
20284
        if (fieldId == null) {
20285
          TProtocolUtil.skip(iprot, field.type);
20286
        } else {
20287
          switch (fieldId) {
553 chandransh 20288
            case CART_ID:
48 ashish 20289
              if (field.type == TType.I64) {
553 chandransh 20290
                this.cartId = iprot.readI64();
20291
                setCartIdIsSet(true);
48 ashish 20292
              } else { 
20293
                TProtocolUtil.skip(iprot, field.type);
20294
              }
20295
              break;
553 chandransh 20296
            case STATUS:
20297
              if (field.type == TType.I32) {
20298
                this.status = CartStatus.findByValue(iprot.readI32());
20299
              } else { 
20300
                TProtocolUtil.skip(iprot, field.type);
20301
              }
20302
              break;
48 ashish 20303
          }
20304
          iprot.readFieldEnd();
20305
        }
20306
      }
20307
      iprot.readStructEnd();
20308
      validate();
20309
    }
20310
 
20311
    public void write(TProtocol oprot) throws TException {
20312
      validate();
20313
 
20314
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20315
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20316
      oprot.writeI64(this.cartId);
48 ashish 20317
      oprot.writeFieldEnd();
553 chandransh 20318
      if (this.status != null) {
20319
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
20320
        oprot.writeI32(this.status.getValue());
20321
        oprot.writeFieldEnd();
20322
      }
48 ashish 20323
      oprot.writeFieldStop();
20324
      oprot.writeStructEnd();
20325
    }
20326
 
20327
    @Override
20328
    public String toString() {
553 chandransh 20329
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 20330
      boolean first = true;
20331
 
553 chandransh 20332
      sb.append("cartId:");
20333
      sb.append(this.cartId);
48 ashish 20334
      first = false;
553 chandransh 20335
      if (!first) sb.append(", ");
20336
      sb.append("status:");
20337
      if (this.status == null) {
20338
        sb.append("null");
20339
      } else {
20340
        String status_name = status.name();
20341
        if (status_name != null) {
20342
          sb.append(status_name);
20343
          sb.append(" (");
20344
        }
20345
        sb.append(this.status);
20346
        if (status_name != null) {
20347
          sb.append(")");
20348
        }
20349
      }
20350
      first = false;
48 ashish 20351
      sb.append(")");
20352
      return sb.toString();
20353
    }
20354
 
20355
    public void validate() throws TException {
20356
      // check for required fields
20357
    }
20358
 
20359
  }
20360
 
553 chandransh 20361
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
20362
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 20363
 
553 chandransh 20364
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20365
 
553 chandransh 20366
    private ShoppingCartException scx;
48 ashish 20367
 
20368
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20369
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20370
      SCX((short)1, "scx");
48 ashish 20371
 
20372
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20373
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20374
 
20375
      static {
20376
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20377
          byId.put((int)field._thriftId, field);
20378
          byName.put(field.getFieldName(), field);
20379
        }
20380
      }
20381
 
20382
      /**
20383
       * Find the _Fields constant that matches fieldId, or null if its not found.
20384
       */
20385
      public static _Fields findByThriftId(int fieldId) {
20386
        return byId.get(fieldId);
20387
      }
20388
 
20389
      /**
20390
       * Find the _Fields constant that matches fieldId, throwing an exception
20391
       * if it is not found.
20392
       */
20393
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20394
        _Fields fields = findByThriftId(fieldId);
20395
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20396
        return fields;
20397
      }
20398
 
20399
      /**
20400
       * Find the _Fields constant that matches name, or null if its not found.
20401
       */
20402
      public static _Fields findByName(String name) {
20403
        return byName.get(name);
20404
      }
20405
 
20406
      private final short _thriftId;
20407
      private final String _fieldName;
20408
 
20409
      _Fields(short thriftId, String fieldName) {
20410
        _thriftId = thriftId;
20411
        _fieldName = fieldName;
20412
      }
20413
 
20414
      public short getThriftFieldId() {
20415
        return _thriftId;
20416
      }
20417
 
20418
      public String getFieldName() {
20419
        return _fieldName;
20420
      }
20421
    }
20422
 
20423
    // isset id assignments
20424
 
20425
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20426
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20427
          new FieldValueMetaData(TType.STRUCT)));
20428
    }});
20429
 
20430
    static {
553 chandransh 20431
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 20432
    }
20433
 
553 chandransh 20434
    public changeCartStatus_result() {
48 ashish 20435
    }
20436
 
553 chandransh 20437
    public changeCartStatus_result(
20438
      ShoppingCartException scx)
48 ashish 20439
    {
20440
      this();
553 chandransh 20441
      this.scx = scx;
48 ashish 20442
    }
20443
 
20444
    /**
20445
     * Performs a deep copy on <i>other</i>.
20446
     */
553 chandransh 20447
    public changeCartStatus_result(changeCartStatus_result other) {
20448
      if (other.isSetScx()) {
20449
        this.scx = new ShoppingCartException(other.scx);
20450
      }
20451
    }
20452
 
20453
    public changeCartStatus_result deepCopy() {
20454
      return new changeCartStatus_result(this);
20455
    }
20456
 
20457
    @Deprecated
20458
    public changeCartStatus_result clone() {
20459
      return new changeCartStatus_result(this);
20460
    }
20461
 
20462
    public ShoppingCartException getScx() {
20463
      return this.scx;
20464
    }
20465
 
20466
    public changeCartStatus_result setScx(ShoppingCartException scx) {
20467
      this.scx = scx;
20468
      return this;
20469
    }
20470
 
20471
    public void unsetScx() {
20472
      this.scx = null;
20473
    }
20474
 
20475
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20476
    public boolean isSetScx() {
20477
      return this.scx != null;
20478
    }
20479
 
20480
    public void setScxIsSet(boolean value) {
20481
      if (!value) {
20482
        this.scx = null;
20483
      }
20484
    }
20485
 
20486
    public void setFieldValue(_Fields field, Object value) {
20487
      switch (field) {
20488
      case SCX:
20489
        if (value == null) {
20490
          unsetScx();
20491
        } else {
20492
          setScx((ShoppingCartException)value);
20493
        }
20494
        break;
20495
 
20496
      }
20497
    }
20498
 
20499
    public void setFieldValue(int fieldID, Object value) {
20500
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20501
    }
20502
 
20503
    public Object getFieldValue(_Fields field) {
20504
      switch (field) {
20505
      case SCX:
20506
        return getScx();
20507
 
20508
      }
20509
      throw new IllegalStateException();
20510
    }
20511
 
20512
    public Object getFieldValue(int fieldId) {
20513
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20514
    }
20515
 
20516
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20517
    public boolean isSet(_Fields field) {
20518
      switch (field) {
20519
      case SCX:
20520
        return isSetScx();
20521
      }
20522
      throw new IllegalStateException();
20523
    }
20524
 
20525
    public boolean isSet(int fieldID) {
20526
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20527
    }
20528
 
20529
    @Override
20530
    public boolean equals(Object that) {
20531
      if (that == null)
20532
        return false;
20533
      if (that instanceof changeCartStatus_result)
20534
        return this.equals((changeCartStatus_result)that);
20535
      return false;
20536
    }
20537
 
20538
    public boolean equals(changeCartStatus_result that) {
20539
      if (that == null)
20540
        return false;
20541
 
20542
      boolean this_present_scx = true && this.isSetScx();
20543
      boolean that_present_scx = true && that.isSetScx();
20544
      if (this_present_scx || that_present_scx) {
20545
        if (!(this_present_scx && that_present_scx))
20546
          return false;
20547
        if (!this.scx.equals(that.scx))
20548
          return false;
20549
      }
20550
 
20551
      return true;
20552
    }
20553
 
20554
    @Override
20555
    public int hashCode() {
20556
      return 0;
20557
    }
20558
 
20559
    public int compareTo(changeCartStatus_result other) {
20560
      if (!getClass().equals(other.getClass())) {
20561
        return getClass().getName().compareTo(other.getClass().getName());
20562
      }
20563
 
20564
      int lastComparison = 0;
20565
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
20566
 
20567
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20568
      if (lastComparison != 0) {
20569
        return lastComparison;
20570
      }
20571
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20572
      if (lastComparison != 0) {
20573
        return lastComparison;
20574
      }
20575
      return 0;
20576
    }
20577
 
20578
    public void read(TProtocol iprot) throws TException {
20579
      TField field;
20580
      iprot.readStructBegin();
20581
      while (true)
20582
      {
20583
        field = iprot.readFieldBegin();
20584
        if (field.type == TType.STOP) { 
20585
          break;
20586
        }
20587
        _Fields fieldId = _Fields.findByThriftId(field.id);
20588
        if (fieldId == null) {
20589
          TProtocolUtil.skip(iprot, field.type);
20590
        } else {
20591
          switch (fieldId) {
20592
            case SCX:
20593
              if (field.type == TType.STRUCT) {
20594
                this.scx = new ShoppingCartException();
20595
                this.scx.read(iprot);
20596
              } else { 
20597
                TProtocolUtil.skip(iprot, field.type);
20598
              }
20599
              break;
20600
          }
20601
          iprot.readFieldEnd();
20602
        }
20603
      }
20604
      iprot.readStructEnd();
20605
      validate();
20606
    }
20607
 
20608
    public void write(TProtocol oprot) throws TException {
20609
      oprot.writeStructBegin(STRUCT_DESC);
20610
 
20611
      if (this.isSetScx()) {
20612
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20613
        this.scx.write(oprot);
20614
        oprot.writeFieldEnd();
20615
      }
20616
      oprot.writeFieldStop();
20617
      oprot.writeStructEnd();
20618
    }
20619
 
20620
    @Override
20621
    public String toString() {
20622
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
20623
      boolean first = true;
20624
 
20625
      sb.append("scx:");
20626
      if (this.scx == null) {
20627
        sb.append("null");
20628
      } else {
20629
        sb.append(this.scx);
20630
      }
20631
      first = false;
20632
      sb.append(")");
20633
      return sb.toString();
20634
    }
20635
 
20636
    public void validate() throws TException {
20637
      // check for required fields
20638
    }
20639
 
20640
  }
20641
 
20642
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
20643
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
20644
 
20645
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20646
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
20647
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
20648
 
20649
    private long cartId;
20650
    private long itemId;
20651
    private long quantity;
20652
 
20653
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20654
    public enum _Fields implements TFieldIdEnum {
20655
      CART_ID((short)1, "cartId"),
20656
      ITEM_ID((short)2, "itemId"),
20657
      QUANTITY((short)3, "quantity");
20658
 
20659
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20660
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20661
 
20662
      static {
20663
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20664
          byId.put((int)field._thriftId, field);
20665
          byName.put(field.getFieldName(), field);
20666
        }
20667
      }
20668
 
20669
      /**
20670
       * Find the _Fields constant that matches fieldId, or null if its not found.
20671
       */
20672
      public static _Fields findByThriftId(int fieldId) {
20673
        return byId.get(fieldId);
20674
      }
20675
 
20676
      /**
20677
       * Find the _Fields constant that matches fieldId, throwing an exception
20678
       * if it is not found.
20679
       */
20680
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20681
        _Fields fields = findByThriftId(fieldId);
20682
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20683
        return fields;
20684
      }
20685
 
20686
      /**
20687
       * Find the _Fields constant that matches name, or null if its not found.
20688
       */
20689
      public static _Fields findByName(String name) {
20690
        return byName.get(name);
20691
      }
20692
 
20693
      private final short _thriftId;
20694
      private final String _fieldName;
20695
 
20696
      _Fields(short thriftId, String fieldName) {
20697
        _thriftId = thriftId;
20698
        _fieldName = fieldName;
20699
      }
20700
 
20701
      public short getThriftFieldId() {
20702
        return _thriftId;
20703
      }
20704
 
20705
      public String getFieldName() {
20706
        return _fieldName;
20707
      }
20708
    }
20709
 
20710
    // isset id assignments
20711
    private static final int __CARTID_ISSET_ID = 0;
20712
    private static final int __ITEMID_ISSET_ID = 1;
20713
    private static final int __QUANTITY_ISSET_ID = 2;
20714
    private BitSet __isset_bit_vector = new BitSet(3);
20715
 
20716
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20717
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20718
          new FieldValueMetaData(TType.I64)));
20719
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
20720
          new FieldValueMetaData(TType.I64)));
20721
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
20722
          new FieldValueMetaData(TType.I64)));
20723
    }});
20724
 
20725
    static {
20726
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
20727
    }
20728
 
20729
    public addItemToCart_args() {
20730
    }
20731
 
20732
    public addItemToCart_args(
20733
      long cartId,
20734
      long itemId,
20735
      long quantity)
20736
    {
20737
      this();
20738
      this.cartId = cartId;
20739
      setCartIdIsSet(true);
20740
      this.itemId = itemId;
20741
      setItemIdIsSet(true);
20742
      this.quantity = quantity;
20743
      setQuantityIsSet(true);
20744
    }
20745
 
20746
    /**
20747
     * Performs a deep copy on <i>other</i>.
20748
     */
20749
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 20750
      __isset_bit_vector.clear();
20751
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20752
      this.cartId = other.cartId;
20753
      this.itemId = other.itemId;
20754
      this.quantity = other.quantity;
48 ashish 20755
    }
20756
 
553 chandransh 20757
    public addItemToCart_args deepCopy() {
20758
      return new addItemToCart_args(this);
48 ashish 20759
    }
20760
 
20761
    @Deprecated
553 chandransh 20762
    public addItemToCart_args clone() {
20763
      return new addItemToCart_args(this);
48 ashish 20764
    }
20765
 
553 chandransh 20766
    public long getCartId() {
20767
      return this.cartId;
48 ashish 20768
    }
20769
 
553 chandransh 20770
    public addItemToCart_args setCartId(long cartId) {
20771
      this.cartId = cartId;
20772
      setCartIdIsSet(true);
48 ashish 20773
      return this;
20774
    }
20775
 
553 chandransh 20776
    public void unsetCartId() {
20777
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20778
    }
20779
 
553 chandransh 20780
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20781
    public boolean isSetCartId() {
20782
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20783
    }
20784
 
553 chandransh 20785
    public void setCartIdIsSet(boolean value) {
20786
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20787
    }
20788
 
553 chandransh 20789
    public long getItemId() {
20790
      return this.itemId;
48 ashish 20791
    }
20792
 
553 chandransh 20793
    public addItemToCart_args setItemId(long itemId) {
20794
      this.itemId = itemId;
20795
      setItemIdIsSet(true);
48 ashish 20796
      return this;
20797
    }
20798
 
553 chandransh 20799
    public void unsetItemId() {
20800
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 20801
    }
20802
 
553 chandransh 20803
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20804
    public boolean isSetItemId() {
20805
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 20806
    }
20807
 
553 chandransh 20808
    public void setItemIdIsSet(boolean value) {
20809
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20810
    }
20811
 
20812
    public long getQuantity() {
20813
      return this.quantity;
20814
    }
20815
 
20816
    public addItemToCart_args setQuantity(long quantity) {
20817
      this.quantity = quantity;
20818
      setQuantityIsSet(true);
20819
      return this;
20820
    }
20821
 
20822
    public void unsetQuantity() {
20823
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
20824
    }
20825
 
20826
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
20827
    public boolean isSetQuantity() {
20828
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
20829
    }
20830
 
20831
    public void setQuantityIsSet(boolean value) {
20832
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
20833
    }
20834
 
20835
    public void setFieldValue(_Fields field, Object value) {
20836
      switch (field) {
20837
      case CART_ID:
20838
        if (value == null) {
20839
          unsetCartId();
20840
        } else {
20841
          setCartId((Long)value);
20842
        }
20843
        break;
20844
 
20845
      case ITEM_ID:
20846
        if (value == null) {
20847
          unsetItemId();
20848
        } else {
20849
          setItemId((Long)value);
20850
        }
20851
        break;
20852
 
20853
      case QUANTITY:
20854
        if (value == null) {
20855
          unsetQuantity();
20856
        } else {
20857
          setQuantity((Long)value);
20858
        }
20859
        break;
20860
 
20861
      }
20862
    }
20863
 
20864
    public void setFieldValue(int fieldID, Object value) {
20865
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20866
    }
20867
 
20868
    public Object getFieldValue(_Fields field) {
20869
      switch (field) {
20870
      case CART_ID:
20871
        return new Long(getCartId());
20872
 
20873
      case ITEM_ID:
20874
        return new Long(getItemId());
20875
 
20876
      case QUANTITY:
20877
        return new Long(getQuantity());
20878
 
20879
      }
20880
      throw new IllegalStateException();
20881
    }
20882
 
20883
    public Object getFieldValue(int fieldId) {
20884
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20885
    }
20886
 
20887
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20888
    public boolean isSet(_Fields field) {
20889
      switch (field) {
20890
      case CART_ID:
20891
        return isSetCartId();
20892
      case ITEM_ID:
20893
        return isSetItemId();
20894
      case QUANTITY:
20895
        return isSetQuantity();
20896
      }
20897
      throw new IllegalStateException();
20898
    }
20899
 
20900
    public boolean isSet(int fieldID) {
20901
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20902
    }
20903
 
20904
    @Override
20905
    public boolean equals(Object that) {
20906
      if (that == null)
20907
        return false;
20908
      if (that instanceof addItemToCart_args)
20909
        return this.equals((addItemToCart_args)that);
20910
      return false;
20911
    }
20912
 
20913
    public boolean equals(addItemToCart_args that) {
20914
      if (that == null)
20915
        return false;
20916
 
20917
      boolean this_present_cartId = true;
20918
      boolean that_present_cartId = true;
20919
      if (this_present_cartId || that_present_cartId) {
20920
        if (!(this_present_cartId && that_present_cartId))
20921
          return false;
20922
        if (this.cartId != that.cartId)
20923
          return false;
20924
      }
20925
 
20926
      boolean this_present_itemId = true;
20927
      boolean that_present_itemId = true;
20928
      if (this_present_itemId || that_present_itemId) {
20929
        if (!(this_present_itemId && that_present_itemId))
20930
          return false;
20931
        if (this.itemId != that.itemId)
20932
          return false;
20933
      }
20934
 
20935
      boolean this_present_quantity = true;
20936
      boolean that_present_quantity = true;
20937
      if (this_present_quantity || that_present_quantity) {
20938
        if (!(this_present_quantity && that_present_quantity))
20939
          return false;
20940
        if (this.quantity != that.quantity)
20941
          return false;
20942
      }
20943
 
20944
      return true;
20945
    }
20946
 
20947
    @Override
20948
    public int hashCode() {
20949
      return 0;
20950
    }
20951
 
20952
    public int compareTo(addItemToCart_args other) {
20953
      if (!getClass().equals(other.getClass())) {
20954
        return getClass().getName().compareTo(other.getClass().getName());
20955
      }
20956
 
20957
      int lastComparison = 0;
20958
      addItemToCart_args typedOther = (addItemToCart_args)other;
20959
 
20960
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20961
      if (lastComparison != 0) {
20962
        return lastComparison;
20963
      }
20964
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20965
      if (lastComparison != 0) {
20966
        return lastComparison;
20967
      }
20968
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
20969
      if (lastComparison != 0) {
20970
        return lastComparison;
20971
      }
20972
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
20973
      if (lastComparison != 0) {
20974
        return lastComparison;
20975
      }
20976
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
20977
      if (lastComparison != 0) {
20978
        return lastComparison;
20979
      }
20980
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
20981
      if (lastComparison != 0) {
20982
        return lastComparison;
20983
      }
20984
      return 0;
20985
    }
20986
 
20987
    public void read(TProtocol iprot) throws TException {
20988
      TField field;
20989
      iprot.readStructBegin();
20990
      while (true)
20991
      {
20992
        field = iprot.readFieldBegin();
20993
        if (field.type == TType.STOP) { 
20994
          break;
20995
        }
20996
        _Fields fieldId = _Fields.findByThriftId(field.id);
20997
        if (fieldId == null) {
20998
          TProtocolUtil.skip(iprot, field.type);
20999
        } else {
21000
          switch (fieldId) {
21001
            case CART_ID:
21002
              if (field.type == TType.I64) {
21003
                this.cartId = iprot.readI64();
21004
                setCartIdIsSet(true);
21005
              } else { 
21006
                TProtocolUtil.skip(iprot, field.type);
21007
              }
21008
              break;
21009
            case ITEM_ID:
21010
              if (field.type == TType.I64) {
21011
                this.itemId = iprot.readI64();
21012
                setItemIdIsSet(true);
21013
              } else { 
21014
                TProtocolUtil.skip(iprot, field.type);
21015
              }
21016
              break;
21017
            case QUANTITY:
21018
              if (field.type == TType.I64) {
21019
                this.quantity = iprot.readI64();
21020
                setQuantityIsSet(true);
21021
              } else { 
21022
                TProtocolUtil.skip(iprot, field.type);
21023
              }
21024
              break;
21025
          }
21026
          iprot.readFieldEnd();
21027
        }
21028
      }
21029
      iprot.readStructEnd();
21030
      validate();
21031
    }
21032
 
21033
    public void write(TProtocol oprot) throws TException {
21034
      validate();
21035
 
21036
      oprot.writeStructBegin(STRUCT_DESC);
21037
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21038
      oprot.writeI64(this.cartId);
21039
      oprot.writeFieldEnd();
21040
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
21041
      oprot.writeI64(this.itemId);
21042
      oprot.writeFieldEnd();
21043
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
21044
      oprot.writeI64(this.quantity);
21045
      oprot.writeFieldEnd();
21046
      oprot.writeFieldStop();
21047
      oprot.writeStructEnd();
21048
    }
21049
 
21050
    @Override
21051
    public String toString() {
21052
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
21053
      boolean first = true;
21054
 
21055
      sb.append("cartId:");
21056
      sb.append(this.cartId);
21057
      first = false;
21058
      if (!first) sb.append(", ");
21059
      sb.append("itemId:");
21060
      sb.append(this.itemId);
21061
      first = false;
21062
      if (!first) sb.append(", ");
21063
      sb.append("quantity:");
21064
      sb.append(this.quantity);
21065
      first = false;
21066
      sb.append(")");
21067
      return sb.toString();
21068
    }
21069
 
21070
    public void validate() throws TException {
21071
      // check for required fields
21072
    }
21073
 
21074
  }
21075
 
21076
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
21077
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
21078
 
21079
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
21080
 
21081
    private ShoppingCartException scx;
21082
 
21083
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21084
    public enum _Fields implements TFieldIdEnum {
21085
      SCX((short)1, "scx");
21086
 
21087
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21088
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21089
 
21090
      static {
21091
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21092
          byId.put((int)field._thriftId, field);
21093
          byName.put(field.getFieldName(), field);
21094
        }
21095
      }
21096
 
21097
      /**
21098
       * Find the _Fields constant that matches fieldId, or null if its not found.
21099
       */
21100
      public static _Fields findByThriftId(int fieldId) {
21101
        return byId.get(fieldId);
21102
      }
21103
 
21104
      /**
21105
       * Find the _Fields constant that matches fieldId, throwing an exception
21106
       * if it is not found.
21107
       */
21108
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21109
        _Fields fields = findByThriftId(fieldId);
21110
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21111
        return fields;
21112
      }
21113
 
21114
      /**
21115
       * Find the _Fields constant that matches name, or null if its not found.
21116
       */
21117
      public static _Fields findByName(String name) {
21118
        return byName.get(name);
21119
      }
21120
 
21121
      private final short _thriftId;
21122
      private final String _fieldName;
21123
 
21124
      _Fields(short thriftId, String fieldName) {
21125
        _thriftId = thriftId;
21126
        _fieldName = fieldName;
21127
      }
21128
 
21129
      public short getThriftFieldId() {
21130
        return _thriftId;
21131
      }
21132
 
21133
      public String getFieldName() {
21134
        return _fieldName;
21135
      }
21136
    }
21137
 
21138
    // isset id assignments
21139
 
21140
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21141
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
21142
          new FieldValueMetaData(TType.STRUCT)));
21143
    }});
21144
 
21145
    static {
21146
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
21147
    }
21148
 
21149
    public addItemToCart_result() {
21150
    }
21151
 
21152
    public addItemToCart_result(
21153
      ShoppingCartException scx)
21154
    {
21155
      this();
21156
      this.scx = scx;
21157
    }
21158
 
21159
    /**
21160
     * Performs a deep copy on <i>other</i>.
21161
     */
21162
    public addItemToCart_result(addItemToCart_result other) {
21163
      if (other.isSetScx()) {
21164
        this.scx = new ShoppingCartException(other.scx);
21165
      }
21166
    }
21167
 
21168
    public addItemToCart_result deepCopy() {
21169
      return new addItemToCart_result(this);
21170
    }
21171
 
21172
    @Deprecated
21173
    public addItemToCart_result clone() {
21174
      return new addItemToCart_result(this);
21175
    }
21176
 
21177
    public ShoppingCartException getScx() {
21178
      return this.scx;
21179
    }
21180
 
21181
    public addItemToCart_result setScx(ShoppingCartException scx) {
21182
      this.scx = scx;
21183
      return this;
21184
    }
21185
 
21186
    public void unsetScx() {
21187
      this.scx = null;
21188
    }
21189
 
21190
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21191
    public boolean isSetScx() {
21192
      return this.scx != null;
21193
    }
21194
 
21195
    public void setScxIsSet(boolean value) {
48 ashish 21196
      if (!value) {
553 chandransh 21197
        this.scx = null;
48 ashish 21198
      }
21199
    }
21200
 
21201
    public void setFieldValue(_Fields field, Object value) {
21202
      switch (field) {
553 chandransh 21203
      case SCX:
48 ashish 21204
        if (value == null) {
553 chandransh 21205
          unsetScx();
48 ashish 21206
        } else {
553 chandransh 21207
          setScx((ShoppingCartException)value);
48 ashish 21208
        }
21209
        break;
21210
 
553 chandransh 21211
      }
21212
    }
21213
 
21214
    public void setFieldValue(int fieldID, Object value) {
21215
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21216
    }
21217
 
21218
    public Object getFieldValue(_Fields field) {
21219
      switch (field) {
21220
      case SCX:
21221
        return getScx();
21222
 
21223
      }
21224
      throw new IllegalStateException();
21225
    }
21226
 
21227
    public Object getFieldValue(int fieldId) {
21228
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21229
    }
21230
 
21231
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21232
    public boolean isSet(_Fields field) {
21233
      switch (field) {
21234
      case SCX:
21235
        return isSetScx();
21236
      }
21237
      throw new IllegalStateException();
21238
    }
21239
 
21240
    public boolean isSet(int fieldID) {
21241
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21242
    }
21243
 
21244
    @Override
21245
    public boolean equals(Object that) {
21246
      if (that == null)
21247
        return false;
21248
      if (that instanceof addItemToCart_result)
21249
        return this.equals((addItemToCart_result)that);
21250
      return false;
21251
    }
21252
 
21253
    public boolean equals(addItemToCart_result that) {
21254
      if (that == null)
21255
        return false;
21256
 
21257
      boolean this_present_scx = true && this.isSetScx();
21258
      boolean that_present_scx = true && that.isSetScx();
21259
      if (this_present_scx || that_present_scx) {
21260
        if (!(this_present_scx && that_present_scx))
21261
          return false;
21262
        if (!this.scx.equals(that.scx))
21263
          return false;
21264
      }
21265
 
21266
      return true;
21267
    }
21268
 
21269
    @Override
21270
    public int hashCode() {
21271
      return 0;
21272
    }
21273
 
21274
    public int compareTo(addItemToCart_result other) {
21275
      if (!getClass().equals(other.getClass())) {
21276
        return getClass().getName().compareTo(other.getClass().getName());
21277
      }
21278
 
21279
      int lastComparison = 0;
21280
      addItemToCart_result typedOther = (addItemToCart_result)other;
21281
 
21282
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21283
      if (lastComparison != 0) {
21284
        return lastComparison;
21285
      }
21286
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21287
      if (lastComparison != 0) {
21288
        return lastComparison;
21289
      }
21290
      return 0;
21291
    }
21292
 
21293
    public void read(TProtocol iprot) throws TException {
21294
      TField field;
21295
      iprot.readStructBegin();
21296
      while (true)
21297
      {
21298
        field = iprot.readFieldBegin();
21299
        if (field.type == TType.STOP) { 
21300
          break;
21301
        }
21302
        _Fields fieldId = _Fields.findByThriftId(field.id);
21303
        if (fieldId == null) {
21304
          TProtocolUtil.skip(iprot, field.type);
21305
        } else {
21306
          switch (fieldId) {
21307
            case SCX:
21308
              if (field.type == TType.STRUCT) {
21309
                this.scx = new ShoppingCartException();
21310
                this.scx.read(iprot);
21311
              } else { 
21312
                TProtocolUtil.skip(iprot, field.type);
21313
              }
21314
              break;
21315
          }
21316
          iprot.readFieldEnd();
21317
        }
21318
      }
21319
      iprot.readStructEnd();
21320
      validate();
21321
    }
21322
 
21323
    public void write(TProtocol oprot) throws TException {
21324
      oprot.writeStructBegin(STRUCT_DESC);
21325
 
21326
      if (this.isSetScx()) {
21327
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21328
        this.scx.write(oprot);
21329
        oprot.writeFieldEnd();
21330
      }
21331
      oprot.writeFieldStop();
21332
      oprot.writeStructEnd();
21333
    }
21334
 
21335
    @Override
21336
    public String toString() {
21337
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
21338
      boolean first = true;
21339
 
21340
      sb.append("scx:");
21341
      if (this.scx == null) {
21342
        sb.append("null");
21343
      } else {
21344
        sb.append(this.scx);
21345
      }
21346
      first = false;
21347
      sb.append(")");
21348
      return sb.toString();
21349
    }
21350
 
21351
    public void validate() throws TException {
21352
      // check for required fields
21353
    }
21354
 
21355
  }
21356
 
21357
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
21358
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
21359
 
21360
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21361
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21362
 
21363
    private long cartId;
21364
    private long itemId;
21365
 
21366
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21367
    public enum _Fields implements TFieldIdEnum {
21368
      CART_ID((short)1, "cartId"),
21369
      ITEM_ID((short)2, "itemId");
21370
 
21371
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21372
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21373
 
21374
      static {
21375
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21376
          byId.put((int)field._thriftId, field);
21377
          byName.put(field.getFieldName(), field);
21378
        }
21379
      }
21380
 
21381
      /**
21382
       * Find the _Fields constant that matches fieldId, or null if its not found.
21383
       */
21384
      public static _Fields findByThriftId(int fieldId) {
21385
        return byId.get(fieldId);
21386
      }
21387
 
21388
      /**
21389
       * Find the _Fields constant that matches fieldId, throwing an exception
21390
       * if it is not found.
21391
       */
21392
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21393
        _Fields fields = findByThriftId(fieldId);
21394
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21395
        return fields;
21396
      }
21397
 
21398
      /**
21399
       * Find the _Fields constant that matches name, or null if its not found.
21400
       */
21401
      public static _Fields findByName(String name) {
21402
        return byName.get(name);
21403
      }
21404
 
21405
      private final short _thriftId;
21406
      private final String _fieldName;
21407
 
21408
      _Fields(short thriftId, String fieldName) {
21409
        _thriftId = thriftId;
21410
        _fieldName = fieldName;
21411
      }
21412
 
21413
      public short getThriftFieldId() {
21414
        return _thriftId;
21415
      }
21416
 
21417
      public String getFieldName() {
21418
        return _fieldName;
21419
      }
21420
    }
21421
 
21422
    // isset id assignments
21423
    private static final int __CARTID_ISSET_ID = 0;
21424
    private static final int __ITEMID_ISSET_ID = 1;
21425
    private BitSet __isset_bit_vector = new BitSet(2);
21426
 
21427
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21428
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21429
          new FieldValueMetaData(TType.I64)));
21430
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21431
          new FieldValueMetaData(TType.I64)));
21432
    }});
21433
 
21434
    static {
21435
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
21436
    }
21437
 
21438
    public deleteItemFromCart_args() {
21439
    }
21440
 
21441
    public deleteItemFromCart_args(
21442
      long cartId,
21443
      long itemId)
21444
    {
21445
      this();
21446
      this.cartId = cartId;
21447
      setCartIdIsSet(true);
21448
      this.itemId = itemId;
21449
      setItemIdIsSet(true);
21450
    }
21451
 
21452
    /**
21453
     * Performs a deep copy on <i>other</i>.
21454
     */
21455
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
21456
      __isset_bit_vector.clear();
21457
      __isset_bit_vector.or(other.__isset_bit_vector);
21458
      this.cartId = other.cartId;
21459
      this.itemId = other.itemId;
21460
    }
21461
 
21462
    public deleteItemFromCart_args deepCopy() {
21463
      return new deleteItemFromCart_args(this);
21464
    }
21465
 
21466
    @Deprecated
21467
    public deleteItemFromCart_args clone() {
21468
      return new deleteItemFromCart_args(this);
21469
    }
21470
 
21471
    public long getCartId() {
21472
      return this.cartId;
21473
    }
21474
 
21475
    public deleteItemFromCart_args setCartId(long cartId) {
21476
      this.cartId = cartId;
21477
      setCartIdIsSet(true);
21478
      return this;
21479
    }
21480
 
21481
    public void unsetCartId() {
21482
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
21483
    }
21484
 
21485
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21486
    public boolean isSetCartId() {
21487
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
21488
    }
21489
 
21490
    public void setCartIdIsSet(boolean value) {
21491
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
21492
    }
21493
 
21494
    public long getItemId() {
21495
      return this.itemId;
21496
    }
21497
 
21498
    public deleteItemFromCart_args setItemId(long itemId) {
21499
      this.itemId = itemId;
21500
      setItemIdIsSet(true);
21501
      return this;
21502
    }
21503
 
21504
    public void unsetItemId() {
21505
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
21506
    }
21507
 
21508
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
21509
    public boolean isSetItemId() {
21510
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
21511
    }
21512
 
21513
    public void setItemIdIsSet(boolean value) {
21514
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
21515
    }
21516
 
21517
    public void setFieldValue(_Fields field, Object value) {
21518
      switch (field) {
21519
      case CART_ID:
48 ashish 21520
        if (value == null) {
553 chandransh 21521
          unsetCartId();
48 ashish 21522
        } else {
553 chandransh 21523
          setCartId((Long)value);
48 ashish 21524
        }
21525
        break;
21526
 
553 chandransh 21527
      case ITEM_ID:
21528
        if (value == null) {
21529
          unsetItemId();
21530
        } else {
21531
          setItemId((Long)value);
21532
        }
21533
        break;
21534
 
48 ashish 21535
      }
21536
    }
21537
 
21538
    public void setFieldValue(int fieldID, Object value) {
21539
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21540
    }
21541
 
21542
    public Object getFieldValue(_Fields field) {
21543
      switch (field) {
553 chandransh 21544
      case CART_ID:
21545
        return new Long(getCartId());
48 ashish 21546
 
553 chandransh 21547
      case ITEM_ID:
21548
        return new Long(getItemId());
48 ashish 21549
 
21550
      }
21551
      throw new IllegalStateException();
21552
    }
21553
 
21554
    public Object getFieldValue(int fieldId) {
21555
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21556
    }
21557
 
21558
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21559
    public boolean isSet(_Fields field) {
21560
      switch (field) {
553 chandransh 21561
      case CART_ID:
21562
        return isSetCartId();
21563
      case ITEM_ID:
21564
        return isSetItemId();
48 ashish 21565
      }
21566
      throw new IllegalStateException();
21567
    }
21568
 
21569
    public boolean isSet(int fieldID) {
21570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21571
    }
21572
 
21573
    @Override
21574
    public boolean equals(Object that) {
21575
      if (that == null)
21576
        return false;
553 chandransh 21577
      if (that instanceof deleteItemFromCart_args)
21578
        return this.equals((deleteItemFromCart_args)that);
48 ashish 21579
      return false;
21580
    }
21581
 
553 chandransh 21582
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 21583
      if (that == null)
21584
        return false;
21585
 
553 chandransh 21586
      boolean this_present_cartId = true;
21587
      boolean that_present_cartId = true;
21588
      if (this_present_cartId || that_present_cartId) {
21589
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21590
          return false;
553 chandransh 21591
        if (this.cartId != that.cartId)
48 ashish 21592
          return false;
21593
      }
21594
 
553 chandransh 21595
      boolean this_present_itemId = true;
21596
      boolean that_present_itemId = true;
21597
      if (this_present_itemId || that_present_itemId) {
21598
        if (!(this_present_itemId && that_present_itemId))
48 ashish 21599
          return false;
553 chandransh 21600
        if (this.itemId != that.itemId)
48 ashish 21601
          return false;
21602
      }
21603
 
21604
      return true;
21605
    }
21606
 
21607
    @Override
21608
    public int hashCode() {
21609
      return 0;
21610
    }
21611
 
553 chandransh 21612
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 21613
      if (!getClass().equals(other.getClass())) {
21614
        return getClass().getName().compareTo(other.getClass().getName());
21615
      }
21616
 
21617
      int lastComparison = 0;
553 chandransh 21618
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 21619
 
553 chandransh 21620
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21621
      if (lastComparison != 0) {
21622
        return lastComparison;
21623
      }
553 chandransh 21624
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21625
      if (lastComparison != 0) {
21626
        return lastComparison;
21627
      }
553 chandransh 21628
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 21629
      if (lastComparison != 0) {
21630
        return lastComparison;
21631
      }
553 chandransh 21632
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 21633
      if (lastComparison != 0) {
21634
        return lastComparison;
21635
      }
21636
      return 0;
21637
    }
21638
 
21639
    public void read(TProtocol iprot) throws TException {
21640
      TField field;
21641
      iprot.readStructBegin();
21642
      while (true)
21643
      {
21644
        field = iprot.readFieldBegin();
21645
        if (field.type == TType.STOP) { 
21646
          break;
21647
        }
21648
        _Fields fieldId = _Fields.findByThriftId(field.id);
21649
        if (fieldId == null) {
21650
          TProtocolUtil.skip(iprot, field.type);
21651
        } else {
21652
          switch (fieldId) {
553 chandransh 21653
            case CART_ID:
21654
              if (field.type == TType.I64) {
21655
                this.cartId = iprot.readI64();
21656
                setCartIdIsSet(true);
48 ashish 21657
              } else { 
21658
                TProtocolUtil.skip(iprot, field.type);
21659
              }
21660
              break;
553 chandransh 21661
            case ITEM_ID:
21662
              if (field.type == TType.I64) {
21663
                this.itemId = iprot.readI64();
21664
                setItemIdIsSet(true);
21665
              } else { 
21666
                TProtocolUtil.skip(iprot, field.type);
21667
              }
21668
              break;
21669
          }
21670
          iprot.readFieldEnd();
21671
        }
21672
      }
21673
      iprot.readStructEnd();
21674
      validate();
21675
    }
21676
 
21677
    public void write(TProtocol oprot) throws TException {
21678
      validate();
21679
 
21680
      oprot.writeStructBegin(STRUCT_DESC);
21681
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21682
      oprot.writeI64(this.cartId);
21683
      oprot.writeFieldEnd();
21684
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
21685
      oprot.writeI64(this.itemId);
21686
      oprot.writeFieldEnd();
21687
      oprot.writeFieldStop();
21688
      oprot.writeStructEnd();
21689
    }
21690
 
21691
    @Override
21692
    public String toString() {
21693
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
21694
      boolean first = true;
21695
 
21696
      sb.append("cartId:");
21697
      sb.append(this.cartId);
21698
      first = false;
21699
      if (!first) sb.append(", ");
21700
      sb.append("itemId:");
21701
      sb.append(this.itemId);
21702
      first = false;
21703
      sb.append(")");
21704
      return sb.toString();
21705
    }
21706
 
21707
    public void validate() throws TException {
21708
      // check for required fields
21709
    }
21710
 
21711
  }
21712
 
21713
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
21714
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
21715
 
21716
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
21717
 
21718
    private ShoppingCartException scx;
21719
 
21720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21721
    public enum _Fields implements TFieldIdEnum {
21722
      SCX((short)1, "scx");
21723
 
21724
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21725
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21726
 
21727
      static {
21728
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21729
          byId.put((int)field._thriftId, field);
21730
          byName.put(field.getFieldName(), field);
21731
        }
21732
      }
21733
 
21734
      /**
21735
       * Find the _Fields constant that matches fieldId, or null if its not found.
21736
       */
21737
      public static _Fields findByThriftId(int fieldId) {
21738
        return byId.get(fieldId);
21739
      }
21740
 
21741
      /**
21742
       * Find the _Fields constant that matches fieldId, throwing an exception
21743
       * if it is not found.
21744
       */
21745
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21746
        _Fields fields = findByThriftId(fieldId);
21747
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21748
        return fields;
21749
      }
21750
 
21751
      /**
21752
       * Find the _Fields constant that matches name, or null if its not found.
21753
       */
21754
      public static _Fields findByName(String name) {
21755
        return byName.get(name);
21756
      }
21757
 
21758
      private final short _thriftId;
21759
      private final String _fieldName;
21760
 
21761
      _Fields(short thriftId, String fieldName) {
21762
        _thriftId = thriftId;
21763
        _fieldName = fieldName;
21764
      }
21765
 
21766
      public short getThriftFieldId() {
21767
        return _thriftId;
21768
      }
21769
 
21770
      public String getFieldName() {
21771
        return _fieldName;
21772
      }
21773
    }
21774
 
21775
    // isset id assignments
21776
 
21777
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21778
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
21779
          new FieldValueMetaData(TType.STRUCT)));
21780
    }});
21781
 
21782
    static {
21783
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
21784
    }
21785
 
21786
    public deleteItemFromCart_result() {
21787
    }
21788
 
21789
    public deleteItemFromCart_result(
21790
      ShoppingCartException scx)
21791
    {
21792
      this();
21793
      this.scx = scx;
21794
    }
21795
 
21796
    /**
21797
     * Performs a deep copy on <i>other</i>.
21798
     */
21799
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
21800
      if (other.isSetScx()) {
21801
        this.scx = new ShoppingCartException(other.scx);
21802
      }
21803
    }
21804
 
21805
    public deleteItemFromCart_result deepCopy() {
21806
      return new deleteItemFromCart_result(this);
21807
    }
21808
 
21809
    @Deprecated
21810
    public deleteItemFromCart_result clone() {
21811
      return new deleteItemFromCart_result(this);
21812
    }
21813
 
21814
    public ShoppingCartException getScx() {
21815
      return this.scx;
21816
    }
21817
 
21818
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
21819
      this.scx = scx;
21820
      return this;
21821
    }
21822
 
21823
    public void unsetScx() {
21824
      this.scx = null;
21825
    }
21826
 
21827
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21828
    public boolean isSetScx() {
21829
      return this.scx != null;
21830
    }
21831
 
21832
    public void setScxIsSet(boolean value) {
21833
      if (!value) {
21834
        this.scx = null;
21835
      }
21836
    }
21837
 
21838
    public void setFieldValue(_Fields field, Object value) {
21839
      switch (field) {
21840
      case SCX:
21841
        if (value == null) {
21842
          unsetScx();
21843
        } else {
21844
          setScx((ShoppingCartException)value);
21845
        }
21846
        break;
21847
 
21848
      }
21849
    }
21850
 
21851
    public void setFieldValue(int fieldID, Object value) {
21852
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21853
    }
21854
 
21855
    public Object getFieldValue(_Fields field) {
21856
      switch (field) {
21857
      case SCX:
21858
        return getScx();
21859
 
21860
      }
21861
      throw new IllegalStateException();
21862
    }
21863
 
21864
    public Object getFieldValue(int fieldId) {
21865
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21866
    }
21867
 
21868
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21869
    public boolean isSet(_Fields field) {
21870
      switch (field) {
21871
      case SCX:
21872
        return isSetScx();
21873
      }
21874
      throw new IllegalStateException();
21875
    }
21876
 
21877
    public boolean isSet(int fieldID) {
21878
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21879
    }
21880
 
21881
    @Override
21882
    public boolean equals(Object that) {
21883
      if (that == null)
21884
        return false;
21885
      if (that instanceof deleteItemFromCart_result)
21886
        return this.equals((deleteItemFromCart_result)that);
21887
      return false;
21888
    }
21889
 
21890
    public boolean equals(deleteItemFromCart_result that) {
21891
      if (that == null)
21892
        return false;
21893
 
21894
      boolean this_present_scx = true && this.isSetScx();
21895
      boolean that_present_scx = true && that.isSetScx();
21896
      if (this_present_scx || that_present_scx) {
21897
        if (!(this_present_scx && that_present_scx))
21898
          return false;
21899
        if (!this.scx.equals(that.scx))
21900
          return false;
21901
      }
21902
 
21903
      return true;
21904
    }
21905
 
21906
    @Override
21907
    public int hashCode() {
21908
      return 0;
21909
    }
21910
 
21911
    public int compareTo(deleteItemFromCart_result other) {
21912
      if (!getClass().equals(other.getClass())) {
21913
        return getClass().getName().compareTo(other.getClass().getName());
21914
      }
21915
 
21916
      int lastComparison = 0;
21917
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
21918
 
21919
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21920
      if (lastComparison != 0) {
21921
        return lastComparison;
21922
      }
21923
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21924
      if (lastComparison != 0) {
21925
        return lastComparison;
21926
      }
21927
      return 0;
21928
    }
21929
 
21930
    public void read(TProtocol iprot) throws TException {
21931
      TField field;
21932
      iprot.readStructBegin();
21933
      while (true)
21934
      {
21935
        field = iprot.readFieldBegin();
21936
        if (field.type == TType.STOP) { 
21937
          break;
21938
        }
21939
        _Fields fieldId = _Fields.findByThriftId(field.id);
21940
        if (fieldId == null) {
21941
          TProtocolUtil.skip(iprot, field.type);
21942
        } else {
21943
          switch (fieldId) {
21944
            case SCX:
48 ashish 21945
              if (field.type == TType.STRUCT) {
553 chandransh 21946
                this.scx = new ShoppingCartException();
21947
                this.scx.read(iprot);
48 ashish 21948
              } else { 
21949
                TProtocolUtil.skip(iprot, field.type);
21950
              }
21951
              break;
21952
          }
21953
          iprot.readFieldEnd();
21954
        }
21955
      }
21956
      iprot.readStructEnd();
21957
      validate();
21958
    }
21959
 
21960
    public void write(TProtocol oprot) throws TException {
21961
      oprot.writeStructBegin(STRUCT_DESC);
21962
 
553 chandransh 21963
      if (this.isSetScx()) {
21964
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21965
        this.scx.write(oprot);
48 ashish 21966
        oprot.writeFieldEnd();
21967
      }
21968
      oprot.writeFieldStop();
21969
      oprot.writeStructEnd();
21970
    }
21971
 
21972
    @Override
21973
    public String toString() {
553 chandransh 21974
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 21975
      boolean first = true;
21976
 
553 chandransh 21977
      sb.append("scx:");
21978
      if (this.scx == null) {
48 ashish 21979
        sb.append("null");
21980
      } else {
553 chandransh 21981
        sb.append(this.scx);
48 ashish 21982
      }
21983
      first = false;
21984
      sb.append(")");
21985
      return sb.toString();
21986
    }
21987
 
21988
    public void validate() throws TException {
21989
      // check for required fields
21990
    }
21991
 
21992
  }
21993
 
553 chandransh 21994
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
21995
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 21996
 
553 chandransh 21997
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21998
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21999
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 22000
 
553 chandransh 22001
    private long cartId;
22002
    private long itemId;
22003
    private long quantity;
48 ashish 22004
 
22005
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22006
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22007
      CART_ID((short)1, "cartId"),
22008
      ITEM_ID((short)2, "itemId"),
22009
      QUANTITY((short)3, "quantity");
48 ashish 22010
 
22011
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22012
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22013
 
22014
      static {
22015
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22016
          byId.put((int)field._thriftId, field);
22017
          byName.put(field.getFieldName(), field);
22018
        }
22019
      }
22020
 
22021
      /**
22022
       * Find the _Fields constant that matches fieldId, or null if its not found.
22023
       */
22024
      public static _Fields findByThriftId(int fieldId) {
22025
        return byId.get(fieldId);
22026
      }
22027
 
22028
      /**
22029
       * Find the _Fields constant that matches fieldId, throwing an exception
22030
       * if it is not found.
22031
       */
22032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22033
        _Fields fields = findByThriftId(fieldId);
22034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22035
        return fields;
22036
      }
22037
 
22038
      /**
22039
       * Find the _Fields constant that matches name, or null if its not found.
22040
       */
22041
      public static _Fields findByName(String name) {
22042
        return byName.get(name);
22043
      }
22044
 
22045
      private final short _thriftId;
22046
      private final String _fieldName;
22047
 
22048
      _Fields(short thriftId, String fieldName) {
22049
        _thriftId = thriftId;
22050
        _fieldName = fieldName;
22051
      }
22052
 
22053
      public short getThriftFieldId() {
22054
        return _thriftId;
22055
      }
22056
 
22057
      public String getFieldName() {
22058
        return _fieldName;
22059
      }
22060
    }
22061
 
22062
    // isset id assignments
553 chandransh 22063
    private static final int __CARTID_ISSET_ID = 0;
22064
    private static final int __ITEMID_ISSET_ID = 1;
22065
    private static final int __QUANTITY_ISSET_ID = 2;
22066
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 22067
 
22068
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 22069
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 22070
          new FieldValueMetaData(TType.I64)));
553 chandransh 22071
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22072
          new FieldValueMetaData(TType.I64)));
22073
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
22074
          new FieldValueMetaData(TType.I64)));
48 ashish 22075
    }});
22076
 
22077
    static {
553 chandransh 22078
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 22079
    }
22080
 
553 chandransh 22081
    public changeQuantity_args() {
48 ashish 22082
    }
22083
 
553 chandransh 22084
    public changeQuantity_args(
22085
      long cartId,
22086
      long itemId,
22087
      long quantity)
48 ashish 22088
    {
22089
      this();
553 chandransh 22090
      this.cartId = cartId;
22091
      setCartIdIsSet(true);
22092
      this.itemId = itemId;
22093
      setItemIdIsSet(true);
22094
      this.quantity = quantity;
22095
      setQuantityIsSet(true);
48 ashish 22096
    }
22097
 
22098
    /**
22099
     * Performs a deep copy on <i>other</i>.
22100
     */
553 chandransh 22101
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 22102
      __isset_bit_vector.clear();
22103
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22104
      this.cartId = other.cartId;
22105
      this.itemId = other.itemId;
22106
      this.quantity = other.quantity;
48 ashish 22107
    }
22108
 
553 chandransh 22109
    public changeQuantity_args deepCopy() {
22110
      return new changeQuantity_args(this);
48 ashish 22111
    }
22112
 
22113
    @Deprecated
553 chandransh 22114
    public changeQuantity_args clone() {
22115
      return new changeQuantity_args(this);
48 ashish 22116
    }
22117
 
553 chandransh 22118
    public long getCartId() {
22119
      return this.cartId;
48 ashish 22120
    }
22121
 
553 chandransh 22122
    public changeQuantity_args setCartId(long cartId) {
22123
      this.cartId = cartId;
22124
      setCartIdIsSet(true);
48 ashish 22125
      return this;
22126
    }
22127
 
553 chandransh 22128
    public void unsetCartId() {
22129
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22130
    }
22131
 
553 chandransh 22132
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22133
    public boolean isSetCartId() {
22134
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22135
    }
22136
 
553 chandransh 22137
    public void setCartIdIsSet(boolean value) {
22138
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22139
    }
22140
 
553 chandransh 22141
    public long getItemId() {
22142
      return this.itemId;
22143
    }
22144
 
22145
    public changeQuantity_args setItemId(long itemId) {
22146
      this.itemId = itemId;
22147
      setItemIdIsSet(true);
22148
      return this;
22149
    }
22150
 
22151
    public void unsetItemId() {
22152
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
22153
    }
22154
 
22155
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22156
    public boolean isSetItemId() {
22157
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
22158
    }
22159
 
22160
    public void setItemIdIsSet(boolean value) {
22161
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22162
    }
22163
 
22164
    public long getQuantity() {
22165
      return this.quantity;
22166
    }
22167
 
22168
    public changeQuantity_args setQuantity(long quantity) {
22169
      this.quantity = quantity;
22170
      setQuantityIsSet(true);
22171
      return this;
22172
    }
22173
 
22174
    public void unsetQuantity() {
22175
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
22176
    }
22177
 
22178
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
22179
    public boolean isSetQuantity() {
22180
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
22181
    }
22182
 
22183
    public void setQuantityIsSet(boolean value) {
22184
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
22185
    }
22186
 
48 ashish 22187
    public void setFieldValue(_Fields field, Object value) {
22188
      switch (field) {
553 chandransh 22189
      case CART_ID:
48 ashish 22190
        if (value == null) {
553 chandransh 22191
          unsetCartId();
48 ashish 22192
        } else {
553 chandransh 22193
          setCartId((Long)value);
48 ashish 22194
        }
22195
        break;
22196
 
553 chandransh 22197
      case ITEM_ID:
22198
        if (value == null) {
22199
          unsetItemId();
22200
        } else {
22201
          setItemId((Long)value);
22202
        }
22203
        break;
22204
 
22205
      case QUANTITY:
22206
        if (value == null) {
22207
          unsetQuantity();
22208
        } else {
22209
          setQuantity((Long)value);
22210
        }
22211
        break;
22212
 
48 ashish 22213
      }
22214
    }
22215
 
22216
    public void setFieldValue(int fieldID, Object value) {
22217
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22218
    }
22219
 
22220
    public Object getFieldValue(_Fields field) {
22221
      switch (field) {
553 chandransh 22222
      case CART_ID:
22223
        return new Long(getCartId());
48 ashish 22224
 
553 chandransh 22225
      case ITEM_ID:
22226
        return new Long(getItemId());
22227
 
22228
      case QUANTITY:
22229
        return new Long(getQuantity());
22230
 
48 ashish 22231
      }
22232
      throw new IllegalStateException();
22233
    }
22234
 
22235
    public Object getFieldValue(int fieldId) {
22236
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22237
    }
22238
 
22239
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22240
    public boolean isSet(_Fields field) {
22241
      switch (field) {
553 chandransh 22242
      case CART_ID:
22243
        return isSetCartId();
22244
      case ITEM_ID:
22245
        return isSetItemId();
22246
      case QUANTITY:
22247
        return isSetQuantity();
48 ashish 22248
      }
22249
      throw new IllegalStateException();
22250
    }
22251
 
22252
    public boolean isSet(int fieldID) {
22253
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22254
    }
22255
 
22256
    @Override
22257
    public boolean equals(Object that) {
22258
      if (that == null)
22259
        return false;
553 chandransh 22260
      if (that instanceof changeQuantity_args)
22261
        return this.equals((changeQuantity_args)that);
48 ashish 22262
      return false;
22263
    }
22264
 
553 chandransh 22265
    public boolean equals(changeQuantity_args that) {
48 ashish 22266
      if (that == null)
22267
        return false;
22268
 
553 chandransh 22269
      boolean this_present_cartId = true;
22270
      boolean that_present_cartId = true;
22271
      if (this_present_cartId || that_present_cartId) {
22272
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22273
          return false;
553 chandransh 22274
        if (this.cartId != that.cartId)
48 ashish 22275
          return false;
22276
      }
22277
 
553 chandransh 22278
      boolean this_present_itemId = true;
22279
      boolean that_present_itemId = true;
22280
      if (this_present_itemId || that_present_itemId) {
22281
        if (!(this_present_itemId && that_present_itemId))
22282
          return false;
22283
        if (this.itemId != that.itemId)
22284
          return false;
22285
      }
22286
 
22287
      boolean this_present_quantity = true;
22288
      boolean that_present_quantity = true;
22289
      if (this_present_quantity || that_present_quantity) {
22290
        if (!(this_present_quantity && that_present_quantity))
22291
          return false;
22292
        if (this.quantity != that.quantity)
22293
          return false;
22294
      }
22295
 
48 ashish 22296
      return true;
22297
    }
22298
 
22299
    @Override
22300
    public int hashCode() {
22301
      return 0;
22302
    }
22303
 
553 chandransh 22304
    public int compareTo(changeQuantity_args other) {
48 ashish 22305
      if (!getClass().equals(other.getClass())) {
22306
        return getClass().getName().compareTo(other.getClass().getName());
22307
      }
22308
 
22309
      int lastComparison = 0;
553 chandransh 22310
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 22311
 
553 chandransh 22312
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22313
      if (lastComparison != 0) {
22314
        return lastComparison;
22315
      }
553 chandransh 22316
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22317
      if (lastComparison != 0) {
22318
        return lastComparison;
22319
      }
553 chandransh 22320
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
22321
      if (lastComparison != 0) {
22322
        return lastComparison;
22323
      }
22324
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
22325
      if (lastComparison != 0) {
22326
        return lastComparison;
22327
      }
22328
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
22329
      if (lastComparison != 0) {
22330
        return lastComparison;
22331
      }
22332
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
22333
      if (lastComparison != 0) {
22334
        return lastComparison;
22335
      }
48 ashish 22336
      return 0;
22337
    }
22338
 
22339
    public void read(TProtocol iprot) throws TException {
22340
      TField field;
22341
      iprot.readStructBegin();
22342
      while (true)
22343
      {
22344
        field = iprot.readFieldBegin();
22345
        if (field.type == TType.STOP) { 
22346
          break;
22347
        }
22348
        _Fields fieldId = _Fields.findByThriftId(field.id);
22349
        if (fieldId == null) {
22350
          TProtocolUtil.skip(iprot, field.type);
22351
        } else {
22352
          switch (fieldId) {
553 chandransh 22353
            case CART_ID:
48 ashish 22354
              if (field.type == TType.I64) {
553 chandransh 22355
                this.cartId = iprot.readI64();
22356
                setCartIdIsSet(true);
48 ashish 22357
              } else { 
22358
                TProtocolUtil.skip(iprot, field.type);
22359
              }
22360
              break;
553 chandransh 22361
            case ITEM_ID:
22362
              if (field.type == TType.I64) {
22363
                this.itemId = iprot.readI64();
22364
                setItemIdIsSet(true);
22365
              } else { 
22366
                TProtocolUtil.skip(iprot, field.type);
22367
              }
22368
              break;
22369
            case QUANTITY:
22370
              if (field.type == TType.I64) {
22371
                this.quantity = iprot.readI64();
22372
                setQuantityIsSet(true);
22373
              } else { 
22374
                TProtocolUtil.skip(iprot, field.type);
22375
              }
22376
              break;
48 ashish 22377
          }
22378
          iprot.readFieldEnd();
22379
        }
22380
      }
22381
      iprot.readStructEnd();
22382
      validate();
22383
    }
22384
 
22385
    public void write(TProtocol oprot) throws TException {
22386
      validate();
22387
 
22388
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22389
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22390
      oprot.writeI64(this.cartId);
48 ashish 22391
      oprot.writeFieldEnd();
553 chandransh 22392
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22393
      oprot.writeI64(this.itemId);
22394
      oprot.writeFieldEnd();
22395
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
22396
      oprot.writeI64(this.quantity);
22397
      oprot.writeFieldEnd();
48 ashish 22398
      oprot.writeFieldStop();
22399
      oprot.writeStructEnd();
22400
    }
22401
 
22402
    @Override
22403
    public String toString() {
553 chandransh 22404
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 22405
      boolean first = true;
22406
 
553 chandransh 22407
      sb.append("cartId:");
22408
      sb.append(this.cartId);
48 ashish 22409
      first = false;
553 chandransh 22410
      if (!first) sb.append(", ");
22411
      sb.append("itemId:");
22412
      sb.append(this.itemId);
22413
      first = false;
22414
      if (!first) sb.append(", ");
22415
      sb.append("quantity:");
22416
      sb.append(this.quantity);
22417
      first = false;
48 ashish 22418
      sb.append(")");
22419
      return sb.toString();
22420
    }
22421
 
22422
    public void validate() throws TException {
22423
      // check for required fields
22424
    }
22425
 
22426
  }
22427
 
553 chandransh 22428
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
22429
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 22430
 
553 chandransh 22431
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22432
 
553 chandransh 22433
    private ShoppingCartException scx;
48 ashish 22434
 
22435
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22436
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22437
      SCX((short)1, "scx");
48 ashish 22438
 
22439
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22440
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22441
 
22442
      static {
22443
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22444
          byId.put((int)field._thriftId, field);
22445
          byName.put(field.getFieldName(), field);
22446
        }
22447
      }
22448
 
22449
      /**
22450
       * Find the _Fields constant that matches fieldId, or null if its not found.
22451
       */
22452
      public static _Fields findByThriftId(int fieldId) {
22453
        return byId.get(fieldId);
22454
      }
22455
 
22456
      /**
22457
       * Find the _Fields constant that matches fieldId, throwing an exception
22458
       * if it is not found.
22459
       */
22460
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22461
        _Fields fields = findByThriftId(fieldId);
22462
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22463
        return fields;
22464
      }
22465
 
22466
      /**
22467
       * Find the _Fields constant that matches name, or null if its not found.
22468
       */
22469
      public static _Fields findByName(String name) {
22470
        return byName.get(name);
22471
      }
22472
 
22473
      private final short _thriftId;
22474
      private final String _fieldName;
22475
 
22476
      _Fields(short thriftId, String fieldName) {
22477
        _thriftId = thriftId;
22478
        _fieldName = fieldName;
22479
      }
22480
 
22481
      public short getThriftFieldId() {
22482
        return _thriftId;
22483
      }
22484
 
22485
      public String getFieldName() {
22486
        return _fieldName;
22487
      }
22488
    }
22489
 
22490
    // isset id assignments
22491
 
22492
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 22493
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 22494
          new FieldValueMetaData(TType.STRUCT)));
22495
    }});
22496
 
22497
    static {
553 chandransh 22498
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 22499
    }
22500
 
553 chandransh 22501
    public changeQuantity_result() {
48 ashish 22502
    }
22503
 
553 chandransh 22504
    public changeQuantity_result(
22505
      ShoppingCartException scx)
48 ashish 22506
    {
22507
      this();
553 chandransh 22508
      this.scx = scx;
48 ashish 22509
    }
22510
 
22511
    /**
22512
     * Performs a deep copy on <i>other</i>.
22513
     */
553 chandransh 22514
    public changeQuantity_result(changeQuantity_result other) {
22515
      if (other.isSetScx()) {
22516
        this.scx = new ShoppingCartException(other.scx);
22517
      }
22518
    }
22519
 
22520
    public changeQuantity_result deepCopy() {
22521
      return new changeQuantity_result(this);
22522
    }
22523
 
22524
    @Deprecated
22525
    public changeQuantity_result clone() {
22526
      return new changeQuantity_result(this);
22527
    }
22528
 
22529
    public ShoppingCartException getScx() {
22530
      return this.scx;
22531
    }
22532
 
22533
    public changeQuantity_result setScx(ShoppingCartException scx) {
22534
      this.scx = scx;
22535
      return this;
22536
    }
22537
 
22538
    public void unsetScx() {
22539
      this.scx = null;
22540
    }
22541
 
22542
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22543
    public boolean isSetScx() {
22544
      return this.scx != null;
22545
    }
22546
 
22547
    public void setScxIsSet(boolean value) {
22548
      if (!value) {
22549
        this.scx = null;
22550
      }
22551
    }
22552
 
22553
    public void setFieldValue(_Fields field, Object value) {
22554
      switch (field) {
22555
      case SCX:
22556
        if (value == null) {
22557
          unsetScx();
22558
        } else {
22559
          setScx((ShoppingCartException)value);
22560
        }
22561
        break;
22562
 
22563
      }
22564
    }
22565
 
22566
    public void setFieldValue(int fieldID, Object value) {
22567
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22568
    }
22569
 
22570
    public Object getFieldValue(_Fields field) {
22571
      switch (field) {
22572
      case SCX:
22573
        return getScx();
22574
 
22575
      }
22576
      throw new IllegalStateException();
22577
    }
22578
 
22579
    public Object getFieldValue(int fieldId) {
22580
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22581
    }
22582
 
22583
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22584
    public boolean isSet(_Fields field) {
22585
      switch (field) {
22586
      case SCX:
22587
        return isSetScx();
22588
      }
22589
      throw new IllegalStateException();
22590
    }
22591
 
22592
    public boolean isSet(int fieldID) {
22593
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22594
    }
22595
 
22596
    @Override
22597
    public boolean equals(Object that) {
22598
      if (that == null)
22599
        return false;
22600
      if (that instanceof changeQuantity_result)
22601
        return this.equals((changeQuantity_result)that);
22602
      return false;
22603
    }
22604
 
22605
    public boolean equals(changeQuantity_result that) {
22606
      if (that == null)
22607
        return false;
22608
 
22609
      boolean this_present_scx = true && this.isSetScx();
22610
      boolean that_present_scx = true && that.isSetScx();
22611
      if (this_present_scx || that_present_scx) {
22612
        if (!(this_present_scx && that_present_scx))
22613
          return false;
22614
        if (!this.scx.equals(that.scx))
22615
          return false;
22616
      }
22617
 
22618
      return true;
22619
    }
22620
 
22621
    @Override
22622
    public int hashCode() {
22623
      return 0;
22624
    }
22625
 
22626
    public int compareTo(changeQuantity_result other) {
22627
      if (!getClass().equals(other.getClass())) {
22628
        return getClass().getName().compareTo(other.getClass().getName());
22629
      }
22630
 
22631
      int lastComparison = 0;
22632
      changeQuantity_result typedOther = (changeQuantity_result)other;
22633
 
22634
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22635
      if (lastComparison != 0) {
22636
        return lastComparison;
22637
      }
22638
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22639
      if (lastComparison != 0) {
22640
        return lastComparison;
22641
      }
22642
      return 0;
22643
    }
22644
 
22645
    public void read(TProtocol iprot) throws TException {
22646
      TField field;
22647
      iprot.readStructBegin();
22648
      while (true)
22649
      {
22650
        field = iprot.readFieldBegin();
22651
        if (field.type == TType.STOP) { 
22652
          break;
22653
        }
22654
        _Fields fieldId = _Fields.findByThriftId(field.id);
22655
        if (fieldId == null) {
22656
          TProtocolUtil.skip(iprot, field.type);
22657
        } else {
22658
          switch (fieldId) {
22659
            case SCX:
22660
              if (field.type == TType.STRUCT) {
22661
                this.scx = new ShoppingCartException();
22662
                this.scx.read(iprot);
22663
              } else { 
22664
                TProtocolUtil.skip(iprot, field.type);
22665
              }
22666
              break;
22667
          }
22668
          iprot.readFieldEnd();
22669
        }
22670
      }
22671
      iprot.readStructEnd();
22672
      validate();
22673
    }
22674
 
22675
    public void write(TProtocol oprot) throws TException {
22676
      oprot.writeStructBegin(STRUCT_DESC);
22677
 
22678
      if (this.isSetScx()) {
22679
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22680
        this.scx.write(oprot);
22681
        oprot.writeFieldEnd();
22682
      }
22683
      oprot.writeFieldStop();
22684
      oprot.writeStructEnd();
22685
    }
22686
 
22687
    @Override
22688
    public String toString() {
22689
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
22690
      boolean first = true;
22691
 
22692
      sb.append("scx:");
22693
      if (this.scx == null) {
22694
        sb.append("null");
22695
      } else {
22696
        sb.append(this.scx);
22697
      }
22698
      first = false;
22699
      sb.append(")");
22700
      return sb.toString();
22701
    }
22702
 
22703
    public void validate() throws TException {
22704
      // check for required fields
22705
    }
22706
 
22707
  }
22708
 
22709
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
22710
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
22711
 
22712
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22713
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
22714
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
22715
 
22716
    private long cartId;
22717
    private long itemId;
22718
    private LineStatus status;
22719
 
22720
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22721
    public enum _Fields implements TFieldIdEnum {
22722
      CART_ID((short)1, "cartId"),
22723
      ITEM_ID((short)2, "itemId"),
22724
      /**
22725
       * 
22726
       * @see LineStatus
22727
       */
22728
      STATUS((short)3, "status");
22729
 
22730
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22732
 
22733
      static {
22734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22735
          byId.put((int)field._thriftId, field);
22736
          byName.put(field.getFieldName(), field);
22737
        }
22738
      }
22739
 
22740
      /**
22741
       * Find the _Fields constant that matches fieldId, or null if its not found.
22742
       */
22743
      public static _Fields findByThriftId(int fieldId) {
22744
        return byId.get(fieldId);
22745
      }
22746
 
22747
      /**
22748
       * Find the _Fields constant that matches fieldId, throwing an exception
22749
       * if it is not found.
22750
       */
22751
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22752
        _Fields fields = findByThriftId(fieldId);
22753
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22754
        return fields;
22755
      }
22756
 
22757
      /**
22758
       * Find the _Fields constant that matches name, or null if its not found.
22759
       */
22760
      public static _Fields findByName(String name) {
22761
        return byName.get(name);
22762
      }
22763
 
22764
      private final short _thriftId;
22765
      private final String _fieldName;
22766
 
22767
      _Fields(short thriftId, String fieldName) {
22768
        _thriftId = thriftId;
22769
        _fieldName = fieldName;
22770
      }
22771
 
22772
      public short getThriftFieldId() {
22773
        return _thriftId;
22774
      }
22775
 
22776
      public String getFieldName() {
22777
        return _fieldName;
22778
      }
22779
    }
22780
 
22781
    // isset id assignments
22782
    private static final int __CARTID_ISSET_ID = 0;
22783
    private static final int __ITEMID_ISSET_ID = 1;
22784
    private BitSet __isset_bit_vector = new BitSet(2);
22785
 
22786
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22787
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22788
          new FieldValueMetaData(TType.I64)));
22789
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22790
          new FieldValueMetaData(TType.I64)));
22791
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
22792
          new EnumMetaData(TType.ENUM, LineStatus.class)));
22793
    }});
22794
 
22795
    static {
22796
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
22797
    }
22798
 
22799
    public changeItemStatus_args() {
22800
    }
22801
 
22802
    public changeItemStatus_args(
22803
      long cartId,
22804
      long itemId,
22805
      LineStatus status)
22806
    {
22807
      this();
22808
      this.cartId = cartId;
22809
      setCartIdIsSet(true);
22810
      this.itemId = itemId;
22811
      setItemIdIsSet(true);
22812
      this.status = status;
22813
    }
22814
 
22815
    /**
22816
     * Performs a deep copy on <i>other</i>.
22817
     */
22818
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 22819
      __isset_bit_vector.clear();
22820
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22821
      this.cartId = other.cartId;
22822
      this.itemId = other.itemId;
22823
      if (other.isSetStatus()) {
22824
        this.status = other.status;
48 ashish 22825
      }
22826
    }
22827
 
553 chandransh 22828
    public changeItemStatus_args deepCopy() {
22829
      return new changeItemStatus_args(this);
48 ashish 22830
    }
22831
 
22832
    @Deprecated
553 chandransh 22833
    public changeItemStatus_args clone() {
22834
      return new changeItemStatus_args(this);
48 ashish 22835
    }
22836
 
553 chandransh 22837
    public long getCartId() {
22838
      return this.cartId;
48 ashish 22839
    }
22840
 
553 chandransh 22841
    public changeItemStatus_args setCartId(long cartId) {
22842
      this.cartId = cartId;
22843
      setCartIdIsSet(true);
48 ashish 22844
      return this;
22845
    }
22846
 
553 chandransh 22847
    public void unsetCartId() {
22848
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22849
    }
22850
 
553 chandransh 22851
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22852
    public boolean isSetCartId() {
22853
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22854
    }
22855
 
553 chandransh 22856
    public void setCartIdIsSet(boolean value) {
22857
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22858
    }
22859
 
553 chandransh 22860
    public long getItemId() {
22861
      return this.itemId;
48 ashish 22862
    }
22863
 
553 chandransh 22864
    public changeItemStatus_args setItemId(long itemId) {
22865
      this.itemId = itemId;
22866
      setItemIdIsSet(true);
48 ashish 22867
      return this;
22868
    }
22869
 
553 chandransh 22870
    public void unsetItemId() {
22871
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22872
    }
22873
 
553 chandransh 22874
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22875
    public boolean isSetItemId() {
22876
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22877
    }
22878
 
553 chandransh 22879
    public void setItemIdIsSet(boolean value) {
22880
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22881
    }
22882
 
22883
    /**
22884
     * 
22885
     * @see LineStatus
22886
     */
22887
    public LineStatus getStatus() {
22888
      return this.status;
22889
    }
22890
 
22891
    /**
22892
     * 
22893
     * @see LineStatus
22894
     */
22895
    public changeItemStatus_args setStatus(LineStatus status) {
22896
      this.status = status;
22897
      return this;
22898
    }
22899
 
22900
    public void unsetStatus() {
22901
      this.status = null;
22902
    }
22903
 
22904
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22905
    public boolean isSetStatus() {
22906
      return this.status != null;
22907
    }
22908
 
22909
    public void setStatusIsSet(boolean value) {
48 ashish 22910
      if (!value) {
553 chandransh 22911
        this.status = null;
48 ashish 22912
      }
22913
    }
22914
 
22915
    public void setFieldValue(_Fields field, Object value) {
22916
      switch (field) {
553 chandransh 22917
      case CART_ID:
48 ashish 22918
        if (value == null) {
553 chandransh 22919
          unsetCartId();
48 ashish 22920
        } else {
553 chandransh 22921
          setCartId((Long)value);
48 ashish 22922
        }
22923
        break;
22924
 
553 chandransh 22925
      case ITEM_ID:
48 ashish 22926
        if (value == null) {
553 chandransh 22927
          unsetItemId();
48 ashish 22928
        } else {
553 chandransh 22929
          setItemId((Long)value);
48 ashish 22930
        }
22931
        break;
22932
 
553 chandransh 22933
      case STATUS:
22934
        if (value == null) {
22935
          unsetStatus();
22936
        } else {
22937
          setStatus((LineStatus)value);
22938
        }
22939
        break;
22940
 
48 ashish 22941
      }
22942
    }
22943
 
22944
    public void setFieldValue(int fieldID, Object value) {
22945
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22946
    }
22947
 
22948
    public Object getFieldValue(_Fields field) {
22949
      switch (field) {
553 chandransh 22950
      case CART_ID:
22951
        return new Long(getCartId());
48 ashish 22952
 
553 chandransh 22953
      case ITEM_ID:
22954
        return new Long(getItemId());
48 ashish 22955
 
553 chandransh 22956
      case STATUS:
22957
        return getStatus();
22958
 
48 ashish 22959
      }
22960
      throw new IllegalStateException();
22961
    }
22962
 
22963
    public Object getFieldValue(int fieldId) {
22964
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22965
    }
22966
 
22967
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22968
    public boolean isSet(_Fields field) {
22969
      switch (field) {
553 chandransh 22970
      case CART_ID:
22971
        return isSetCartId();
22972
      case ITEM_ID:
22973
        return isSetItemId();
22974
      case STATUS:
22975
        return isSetStatus();
48 ashish 22976
      }
22977
      throw new IllegalStateException();
22978
    }
22979
 
22980
    public boolean isSet(int fieldID) {
22981
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22982
    }
22983
 
22984
    @Override
22985
    public boolean equals(Object that) {
22986
      if (that == null)
22987
        return false;
553 chandransh 22988
      if (that instanceof changeItemStatus_args)
22989
        return this.equals((changeItemStatus_args)that);
48 ashish 22990
      return false;
22991
    }
22992
 
553 chandransh 22993
    public boolean equals(changeItemStatus_args that) {
48 ashish 22994
      if (that == null)
22995
        return false;
22996
 
553 chandransh 22997
      boolean this_present_cartId = true;
22998
      boolean that_present_cartId = true;
22999
      if (this_present_cartId || that_present_cartId) {
23000
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23001
          return false;
553 chandransh 23002
        if (this.cartId != that.cartId)
48 ashish 23003
          return false;
23004
      }
23005
 
553 chandransh 23006
      boolean this_present_itemId = true;
23007
      boolean that_present_itemId = true;
23008
      if (this_present_itemId || that_present_itemId) {
23009
        if (!(this_present_itemId && that_present_itemId))
48 ashish 23010
          return false;
553 chandransh 23011
        if (this.itemId != that.itemId)
48 ashish 23012
          return false;
23013
      }
23014
 
553 chandransh 23015
      boolean this_present_status = true && this.isSetStatus();
23016
      boolean that_present_status = true && that.isSetStatus();
23017
      if (this_present_status || that_present_status) {
23018
        if (!(this_present_status && that_present_status))
23019
          return false;
23020
        if (!this.status.equals(that.status))
23021
          return false;
23022
      }
23023
 
48 ashish 23024
      return true;
23025
    }
23026
 
23027
    @Override
23028
    public int hashCode() {
23029
      return 0;
23030
    }
23031
 
553 chandransh 23032
    public int compareTo(changeItemStatus_args other) {
48 ashish 23033
      if (!getClass().equals(other.getClass())) {
23034
        return getClass().getName().compareTo(other.getClass().getName());
23035
      }
23036
 
23037
      int lastComparison = 0;
553 chandransh 23038
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 23039
 
553 chandransh 23040
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23041
      if (lastComparison != 0) {
23042
        return lastComparison;
23043
      }
553 chandransh 23044
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23045
      if (lastComparison != 0) {
23046
        return lastComparison;
23047
      }
553 chandransh 23048
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 23049
      if (lastComparison != 0) {
23050
        return lastComparison;
23051
      }
553 chandransh 23052
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 23053
      if (lastComparison != 0) {
23054
        return lastComparison;
23055
      }
553 chandransh 23056
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
23057
      if (lastComparison != 0) {
23058
        return lastComparison;
23059
      }
23060
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
23061
      if (lastComparison != 0) {
23062
        return lastComparison;
23063
      }
48 ashish 23064
      return 0;
23065
    }
23066
 
23067
    public void read(TProtocol iprot) throws TException {
23068
      TField field;
23069
      iprot.readStructBegin();
23070
      while (true)
23071
      {
23072
        field = iprot.readFieldBegin();
23073
        if (field.type == TType.STOP) { 
23074
          break;
23075
        }
23076
        _Fields fieldId = _Fields.findByThriftId(field.id);
23077
        if (fieldId == null) {
23078
          TProtocolUtil.skip(iprot, field.type);
23079
        } else {
23080
          switch (fieldId) {
553 chandransh 23081
            case CART_ID:
23082
              if (field.type == TType.I64) {
23083
                this.cartId = iprot.readI64();
23084
                setCartIdIsSet(true);
48 ashish 23085
              } else { 
23086
                TProtocolUtil.skip(iprot, field.type);
23087
              }
23088
              break;
553 chandransh 23089
            case ITEM_ID:
23090
              if (field.type == TType.I64) {
23091
                this.itemId = iprot.readI64();
23092
                setItemIdIsSet(true);
48 ashish 23093
              } else { 
23094
                TProtocolUtil.skip(iprot, field.type);
23095
              }
23096
              break;
553 chandransh 23097
            case STATUS:
23098
              if (field.type == TType.I32) {
23099
                this.status = LineStatus.findByValue(iprot.readI32());
23100
              } else { 
23101
                TProtocolUtil.skip(iprot, field.type);
23102
              }
23103
              break;
48 ashish 23104
          }
23105
          iprot.readFieldEnd();
23106
        }
23107
      }
23108
      iprot.readStructEnd();
23109
      validate();
23110
    }
23111
 
23112
    public void write(TProtocol oprot) throws TException {
553 chandransh 23113
      validate();
23114
 
48 ashish 23115
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23116
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23117
      oprot.writeI64(this.cartId);
23118
      oprot.writeFieldEnd();
23119
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
23120
      oprot.writeI64(this.itemId);
23121
      oprot.writeFieldEnd();
23122
      if (this.status != null) {
23123
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
23124
        oprot.writeI32(this.status.getValue());
48 ashish 23125
        oprot.writeFieldEnd();
23126
      }
23127
      oprot.writeFieldStop();
23128
      oprot.writeStructEnd();
23129
    }
23130
 
23131
    @Override
23132
    public String toString() {
553 chandransh 23133
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 23134
      boolean first = true;
23135
 
553 chandransh 23136
      sb.append("cartId:");
23137
      sb.append(this.cartId);
48 ashish 23138
      first = false;
23139
      if (!first) sb.append(", ");
553 chandransh 23140
      sb.append("itemId:");
23141
      sb.append(this.itemId);
23142
      first = false;
23143
      if (!first) sb.append(", ");
23144
      sb.append("status:");
23145
      if (this.status == null) {
48 ashish 23146
        sb.append("null");
23147
      } else {
553 chandransh 23148
        String status_name = status.name();
23149
        if (status_name != null) {
23150
          sb.append(status_name);
23151
          sb.append(" (");
23152
        }
23153
        sb.append(this.status);
23154
        if (status_name != null) {
23155
          sb.append(")");
23156
        }
48 ashish 23157
      }
23158
      first = false;
23159
      sb.append(")");
23160
      return sb.toString();
23161
    }
23162
 
23163
    public void validate() throws TException {
23164
      // check for required fields
23165
    }
23166
 
23167
  }
23168
 
553 chandransh 23169
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
23170
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 23171
 
553 chandransh 23172
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23173
 
553 chandransh 23174
    private ShoppingCartException scx;
48 ashish 23175
 
23176
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23177
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23178
      SCX((short)1, "scx");
48 ashish 23179
 
23180
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23181
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23182
 
23183
      static {
23184
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23185
          byId.put((int)field._thriftId, field);
23186
          byName.put(field.getFieldName(), field);
23187
        }
23188
      }
23189
 
23190
      /**
23191
       * Find the _Fields constant that matches fieldId, or null if its not found.
23192
       */
23193
      public static _Fields findByThriftId(int fieldId) {
23194
        return byId.get(fieldId);
23195
      }
23196
 
23197
      /**
23198
       * Find the _Fields constant that matches fieldId, throwing an exception
23199
       * if it is not found.
23200
       */
23201
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23202
        _Fields fields = findByThriftId(fieldId);
23203
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23204
        return fields;
23205
      }
23206
 
23207
      /**
23208
       * Find the _Fields constant that matches name, or null if its not found.
23209
       */
23210
      public static _Fields findByName(String name) {
23211
        return byName.get(name);
23212
      }
23213
 
23214
      private final short _thriftId;
23215
      private final String _fieldName;
23216
 
23217
      _Fields(short thriftId, String fieldName) {
23218
        _thriftId = thriftId;
23219
        _fieldName = fieldName;
23220
      }
23221
 
23222
      public short getThriftFieldId() {
23223
        return _thriftId;
23224
      }
23225
 
23226
      public String getFieldName() {
23227
        return _fieldName;
23228
      }
23229
    }
23230
 
23231
    // isset id assignments
553 chandransh 23232
 
23233
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23234
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23235
          new FieldValueMetaData(TType.STRUCT)));
23236
    }});
23237
 
23238
    static {
23239
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
23240
    }
23241
 
23242
    public changeItemStatus_result() {
23243
    }
23244
 
23245
    public changeItemStatus_result(
23246
      ShoppingCartException scx)
23247
    {
23248
      this();
23249
      this.scx = scx;
23250
    }
23251
 
23252
    /**
23253
     * Performs a deep copy on <i>other</i>.
23254
     */
23255
    public changeItemStatus_result(changeItemStatus_result other) {
23256
      if (other.isSetScx()) {
23257
        this.scx = new ShoppingCartException(other.scx);
23258
      }
23259
    }
23260
 
23261
    public changeItemStatus_result deepCopy() {
23262
      return new changeItemStatus_result(this);
23263
    }
23264
 
23265
    @Deprecated
23266
    public changeItemStatus_result clone() {
23267
      return new changeItemStatus_result(this);
23268
    }
23269
 
23270
    public ShoppingCartException getScx() {
23271
      return this.scx;
23272
    }
23273
 
23274
    public changeItemStatus_result setScx(ShoppingCartException scx) {
23275
      this.scx = scx;
23276
      return this;
23277
    }
23278
 
23279
    public void unsetScx() {
23280
      this.scx = null;
23281
    }
23282
 
23283
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23284
    public boolean isSetScx() {
23285
      return this.scx != null;
23286
    }
23287
 
23288
    public void setScxIsSet(boolean value) {
23289
      if (!value) {
23290
        this.scx = null;
23291
      }
23292
    }
23293
 
23294
    public void setFieldValue(_Fields field, Object value) {
23295
      switch (field) {
23296
      case SCX:
23297
        if (value == null) {
23298
          unsetScx();
23299
        } else {
23300
          setScx((ShoppingCartException)value);
23301
        }
23302
        break;
23303
 
23304
      }
23305
    }
23306
 
23307
    public void setFieldValue(int fieldID, Object value) {
23308
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23309
    }
23310
 
23311
    public Object getFieldValue(_Fields field) {
23312
      switch (field) {
23313
      case SCX:
23314
        return getScx();
23315
 
23316
      }
23317
      throw new IllegalStateException();
23318
    }
23319
 
23320
    public Object getFieldValue(int fieldId) {
23321
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23322
    }
23323
 
23324
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23325
    public boolean isSet(_Fields field) {
23326
      switch (field) {
23327
      case SCX:
23328
        return isSetScx();
23329
      }
23330
      throw new IllegalStateException();
23331
    }
23332
 
23333
    public boolean isSet(int fieldID) {
23334
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23335
    }
23336
 
23337
    @Override
23338
    public boolean equals(Object that) {
23339
      if (that == null)
23340
        return false;
23341
      if (that instanceof changeItemStatus_result)
23342
        return this.equals((changeItemStatus_result)that);
23343
      return false;
23344
    }
23345
 
23346
    public boolean equals(changeItemStatus_result that) {
23347
      if (that == null)
23348
        return false;
23349
 
23350
      boolean this_present_scx = true && this.isSetScx();
23351
      boolean that_present_scx = true && that.isSetScx();
23352
      if (this_present_scx || that_present_scx) {
23353
        if (!(this_present_scx && that_present_scx))
23354
          return false;
23355
        if (!this.scx.equals(that.scx))
23356
          return false;
23357
      }
23358
 
23359
      return true;
23360
    }
23361
 
23362
    @Override
23363
    public int hashCode() {
23364
      return 0;
23365
    }
23366
 
23367
    public int compareTo(changeItemStatus_result other) {
23368
      if (!getClass().equals(other.getClass())) {
23369
        return getClass().getName().compareTo(other.getClass().getName());
23370
      }
23371
 
23372
      int lastComparison = 0;
23373
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
23374
 
23375
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23376
      if (lastComparison != 0) {
23377
        return lastComparison;
23378
      }
23379
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23380
      if (lastComparison != 0) {
23381
        return lastComparison;
23382
      }
23383
      return 0;
23384
    }
23385
 
23386
    public void read(TProtocol iprot) throws TException {
23387
      TField field;
23388
      iprot.readStructBegin();
23389
      while (true)
23390
      {
23391
        field = iprot.readFieldBegin();
23392
        if (field.type == TType.STOP) { 
23393
          break;
23394
        }
23395
        _Fields fieldId = _Fields.findByThriftId(field.id);
23396
        if (fieldId == null) {
23397
          TProtocolUtil.skip(iprot, field.type);
23398
        } else {
23399
          switch (fieldId) {
23400
            case SCX:
23401
              if (field.type == TType.STRUCT) {
23402
                this.scx = new ShoppingCartException();
23403
                this.scx.read(iprot);
23404
              } else { 
23405
                TProtocolUtil.skip(iprot, field.type);
23406
              }
23407
              break;
23408
          }
23409
          iprot.readFieldEnd();
23410
        }
23411
      }
23412
      iprot.readStructEnd();
23413
      validate();
23414
    }
23415
 
23416
    public void write(TProtocol oprot) throws TException {
23417
      oprot.writeStructBegin(STRUCT_DESC);
23418
 
23419
      if (this.isSetScx()) {
23420
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23421
        this.scx.write(oprot);
23422
        oprot.writeFieldEnd();
23423
      }
23424
      oprot.writeFieldStop();
23425
      oprot.writeStructEnd();
23426
    }
23427
 
23428
    @Override
23429
    public String toString() {
23430
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
23431
      boolean first = true;
23432
 
23433
      sb.append("scx:");
23434
      if (this.scx == null) {
23435
        sb.append("null");
23436
      } else {
23437
        sb.append(this.scx);
23438
      }
23439
      first = false;
23440
      sb.append(")");
23441
      return sb.toString();
23442
    }
23443
 
23444
    public void validate() throws TException {
23445
      // check for required fields
23446
    }
23447
 
23448
  }
23449
 
23450
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
23451
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
23452
 
23453
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23454
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
23455
 
23456
    private long cartId;
23457
    private long addressId;
23458
 
23459
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23460
    public enum _Fields implements TFieldIdEnum {
23461
      CART_ID((short)1, "cartId"),
23462
      ADDRESS_ID((short)2, "addressId");
23463
 
23464
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23465
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23466
 
23467
      static {
23468
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23469
          byId.put((int)field._thriftId, field);
23470
          byName.put(field.getFieldName(), field);
23471
        }
23472
      }
23473
 
23474
      /**
23475
       * Find the _Fields constant that matches fieldId, or null if its not found.
23476
       */
23477
      public static _Fields findByThriftId(int fieldId) {
23478
        return byId.get(fieldId);
23479
      }
23480
 
23481
      /**
23482
       * Find the _Fields constant that matches fieldId, throwing an exception
23483
       * if it is not found.
23484
       */
23485
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23486
        _Fields fields = findByThriftId(fieldId);
23487
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23488
        return fields;
23489
      }
23490
 
23491
      /**
23492
       * Find the _Fields constant that matches name, or null if its not found.
23493
       */
23494
      public static _Fields findByName(String name) {
23495
        return byName.get(name);
23496
      }
23497
 
23498
      private final short _thriftId;
23499
      private final String _fieldName;
23500
 
23501
      _Fields(short thriftId, String fieldName) {
23502
        _thriftId = thriftId;
23503
        _fieldName = fieldName;
23504
      }
23505
 
23506
      public short getThriftFieldId() {
23507
        return _thriftId;
23508
      }
23509
 
23510
      public String getFieldName() {
23511
        return _fieldName;
23512
      }
23513
    }
23514
 
23515
    // isset id assignments
23516
    private static final int __CARTID_ISSET_ID = 0;
23517
    private static final int __ADDRESSID_ISSET_ID = 1;
23518
    private BitSet __isset_bit_vector = new BitSet(2);
23519
 
23520
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23521
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
23522
          new FieldValueMetaData(TType.I64)));
23523
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
23524
          new FieldValueMetaData(TType.I64)));
23525
    }});
23526
 
23527
    static {
23528
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
23529
    }
23530
 
23531
    public addAddressToCart_args() {
23532
    }
23533
 
23534
    public addAddressToCart_args(
23535
      long cartId,
23536
      long addressId)
23537
    {
23538
      this();
23539
      this.cartId = cartId;
23540
      setCartIdIsSet(true);
23541
      this.addressId = addressId;
23542
      setAddressIdIsSet(true);
23543
    }
23544
 
23545
    /**
23546
     * Performs a deep copy on <i>other</i>.
23547
     */
23548
    public addAddressToCart_args(addAddressToCart_args other) {
23549
      __isset_bit_vector.clear();
23550
      __isset_bit_vector.or(other.__isset_bit_vector);
23551
      this.cartId = other.cartId;
23552
      this.addressId = other.addressId;
23553
    }
23554
 
23555
    public addAddressToCart_args deepCopy() {
23556
      return new addAddressToCart_args(this);
23557
    }
23558
 
23559
    @Deprecated
23560
    public addAddressToCart_args clone() {
23561
      return new addAddressToCart_args(this);
23562
    }
23563
 
23564
    public long getCartId() {
23565
      return this.cartId;
23566
    }
23567
 
23568
    public addAddressToCart_args setCartId(long cartId) {
23569
      this.cartId = cartId;
23570
      setCartIdIsSet(true);
23571
      return this;
23572
    }
23573
 
23574
    public void unsetCartId() {
23575
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
23576
    }
23577
 
23578
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23579
    public boolean isSetCartId() {
23580
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
23581
    }
23582
 
23583
    public void setCartIdIsSet(boolean value) {
23584
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
23585
    }
23586
 
23587
    public long getAddressId() {
23588
      return this.addressId;
23589
    }
23590
 
23591
    public addAddressToCart_args setAddressId(long addressId) {
23592
      this.addressId = addressId;
23593
      setAddressIdIsSet(true);
23594
      return this;
23595
    }
23596
 
23597
    public void unsetAddressId() {
23598
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
23599
    }
23600
 
23601
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
23602
    public boolean isSetAddressId() {
23603
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
23604
    }
23605
 
23606
    public void setAddressIdIsSet(boolean value) {
23607
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
23608
    }
23609
 
23610
    public void setFieldValue(_Fields field, Object value) {
23611
      switch (field) {
23612
      case CART_ID:
23613
        if (value == null) {
23614
          unsetCartId();
23615
        } else {
23616
          setCartId((Long)value);
23617
        }
23618
        break;
23619
 
23620
      case ADDRESS_ID:
23621
        if (value == null) {
23622
          unsetAddressId();
23623
        } else {
23624
          setAddressId((Long)value);
23625
        }
23626
        break;
23627
 
23628
      }
23629
    }
23630
 
23631
    public void setFieldValue(int fieldID, Object value) {
23632
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23633
    }
23634
 
23635
    public Object getFieldValue(_Fields field) {
23636
      switch (field) {
23637
      case CART_ID:
23638
        return new Long(getCartId());
23639
 
23640
      case ADDRESS_ID:
23641
        return new Long(getAddressId());
23642
 
23643
      }
23644
      throw new IllegalStateException();
23645
    }
23646
 
23647
    public Object getFieldValue(int fieldId) {
23648
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23649
    }
23650
 
23651
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23652
    public boolean isSet(_Fields field) {
23653
      switch (field) {
23654
      case CART_ID:
23655
        return isSetCartId();
23656
      case ADDRESS_ID:
23657
        return isSetAddressId();
23658
      }
23659
      throw new IllegalStateException();
23660
    }
23661
 
23662
    public boolean isSet(int fieldID) {
23663
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23664
    }
23665
 
23666
    @Override
23667
    public boolean equals(Object that) {
23668
      if (that == null)
23669
        return false;
23670
      if (that instanceof addAddressToCart_args)
23671
        return this.equals((addAddressToCart_args)that);
23672
      return false;
23673
    }
23674
 
23675
    public boolean equals(addAddressToCart_args that) {
23676
      if (that == null)
23677
        return false;
23678
 
23679
      boolean this_present_cartId = true;
23680
      boolean that_present_cartId = true;
23681
      if (this_present_cartId || that_present_cartId) {
23682
        if (!(this_present_cartId && that_present_cartId))
23683
          return false;
23684
        if (this.cartId != that.cartId)
23685
          return false;
23686
      }
23687
 
23688
      boolean this_present_addressId = true;
23689
      boolean that_present_addressId = true;
23690
      if (this_present_addressId || that_present_addressId) {
23691
        if (!(this_present_addressId && that_present_addressId))
23692
          return false;
23693
        if (this.addressId != that.addressId)
23694
          return false;
23695
      }
23696
 
23697
      return true;
23698
    }
23699
 
23700
    @Override
23701
    public int hashCode() {
23702
      return 0;
23703
    }
23704
 
23705
    public int compareTo(addAddressToCart_args other) {
23706
      if (!getClass().equals(other.getClass())) {
23707
        return getClass().getName().compareTo(other.getClass().getName());
23708
      }
23709
 
23710
      int lastComparison = 0;
23711
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
23712
 
23713
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
23714
      if (lastComparison != 0) {
23715
        return lastComparison;
23716
      }
23717
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
23718
      if (lastComparison != 0) {
23719
        return lastComparison;
23720
      }
23721
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
23722
      if (lastComparison != 0) {
23723
        return lastComparison;
23724
      }
23725
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
23726
      if (lastComparison != 0) {
23727
        return lastComparison;
23728
      }
23729
      return 0;
23730
    }
23731
 
23732
    public void read(TProtocol iprot) throws TException {
23733
      TField field;
23734
      iprot.readStructBegin();
23735
      while (true)
23736
      {
23737
        field = iprot.readFieldBegin();
23738
        if (field.type == TType.STOP) { 
23739
          break;
23740
        }
23741
        _Fields fieldId = _Fields.findByThriftId(field.id);
23742
        if (fieldId == null) {
23743
          TProtocolUtil.skip(iprot, field.type);
23744
        } else {
23745
          switch (fieldId) {
23746
            case CART_ID:
23747
              if (field.type == TType.I64) {
23748
                this.cartId = iprot.readI64();
23749
                setCartIdIsSet(true);
23750
              } else { 
23751
                TProtocolUtil.skip(iprot, field.type);
23752
              }
23753
              break;
23754
            case ADDRESS_ID:
23755
              if (field.type == TType.I64) {
23756
                this.addressId = iprot.readI64();
23757
                setAddressIdIsSet(true);
23758
              } else { 
23759
                TProtocolUtil.skip(iprot, field.type);
23760
              }
23761
              break;
23762
          }
23763
          iprot.readFieldEnd();
23764
        }
23765
      }
23766
      iprot.readStructEnd();
23767
      validate();
23768
    }
23769
 
23770
    public void write(TProtocol oprot) throws TException {
23771
      validate();
23772
 
23773
      oprot.writeStructBegin(STRUCT_DESC);
23774
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23775
      oprot.writeI64(this.cartId);
23776
      oprot.writeFieldEnd();
23777
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
23778
      oprot.writeI64(this.addressId);
23779
      oprot.writeFieldEnd();
23780
      oprot.writeFieldStop();
23781
      oprot.writeStructEnd();
23782
    }
23783
 
23784
    @Override
23785
    public String toString() {
23786
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
23787
      boolean first = true;
23788
 
23789
      sb.append("cartId:");
23790
      sb.append(this.cartId);
23791
      first = false;
23792
      if (!first) sb.append(", ");
23793
      sb.append("addressId:");
23794
      sb.append(this.addressId);
23795
      first = false;
23796
      sb.append(")");
23797
      return sb.toString();
23798
    }
23799
 
23800
    public void validate() throws TException {
23801
      // check for required fields
23802
    }
23803
 
23804
  }
23805
 
23806
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
23807
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
23808
 
578 chandransh 23809
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 23810
 
578 chandransh 23811
    private ShoppingCartException scx;
553 chandransh 23812
 
23813
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23814
    public enum _Fields implements TFieldIdEnum {
578 chandransh 23815
      SCX((short)1, "scx");
553 chandransh 23816
 
23817
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23818
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23819
 
23820
      static {
23821
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23822
          byId.put((int)field._thriftId, field);
23823
          byName.put(field.getFieldName(), field);
23824
        }
23825
      }
23826
 
23827
      /**
23828
       * Find the _Fields constant that matches fieldId, or null if its not found.
23829
       */
23830
      public static _Fields findByThriftId(int fieldId) {
23831
        return byId.get(fieldId);
23832
      }
23833
 
23834
      /**
23835
       * Find the _Fields constant that matches fieldId, throwing an exception
23836
       * if it is not found.
23837
       */
23838
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23839
        _Fields fields = findByThriftId(fieldId);
23840
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23841
        return fields;
23842
      }
23843
 
23844
      /**
23845
       * Find the _Fields constant that matches name, or null if its not found.
23846
       */
23847
      public static _Fields findByName(String name) {
23848
        return byName.get(name);
23849
      }
23850
 
23851
      private final short _thriftId;
23852
      private final String _fieldName;
23853
 
23854
      _Fields(short thriftId, String fieldName) {
23855
        _thriftId = thriftId;
23856
        _fieldName = fieldName;
23857
      }
23858
 
23859
      public short getThriftFieldId() {
23860
        return _thriftId;
23861
      }
23862
 
23863
      public String getFieldName() {
23864
        return _fieldName;
23865
      }
23866
    }
578 chandransh 23867
 
23868
    // isset id assignments
23869
 
553 chandransh 23870
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 23871
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23872
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 23873
    }});
23874
 
23875
    static {
23876
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
23877
    }
23878
 
23879
    public addAddressToCart_result() {
23880
    }
23881
 
578 chandransh 23882
    public addAddressToCart_result(
23883
      ShoppingCartException scx)
23884
    {
23885
      this();
23886
      this.scx = scx;
23887
    }
23888
 
553 chandransh 23889
    /**
23890
     * Performs a deep copy on <i>other</i>.
23891
     */
23892
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 23893
      if (other.isSetScx()) {
23894
        this.scx = new ShoppingCartException(other.scx);
23895
      }
553 chandransh 23896
    }
23897
 
23898
    public addAddressToCart_result deepCopy() {
23899
      return new addAddressToCart_result(this);
23900
    }
23901
 
23902
    @Deprecated
23903
    public addAddressToCart_result clone() {
23904
      return new addAddressToCart_result(this);
23905
    }
23906
 
578 chandransh 23907
    public ShoppingCartException getScx() {
23908
      return this.scx;
23909
    }
23910
 
23911
    public addAddressToCart_result setScx(ShoppingCartException scx) {
23912
      this.scx = scx;
23913
      return this;
23914
    }
23915
 
23916
    public void unsetScx() {
23917
      this.scx = null;
23918
    }
23919
 
23920
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23921
    public boolean isSetScx() {
23922
      return this.scx != null;
23923
    }
23924
 
23925
    public void setScxIsSet(boolean value) {
23926
      if (!value) {
23927
        this.scx = null;
23928
      }
23929
    }
23930
 
553 chandransh 23931
    public void setFieldValue(_Fields field, Object value) {
23932
      switch (field) {
578 chandransh 23933
      case SCX:
23934
        if (value == null) {
23935
          unsetScx();
23936
        } else {
23937
          setScx((ShoppingCartException)value);
23938
        }
23939
        break;
23940
 
553 chandransh 23941
      }
23942
    }
23943
 
23944
    public void setFieldValue(int fieldID, Object value) {
23945
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23946
    }
23947
 
23948
    public Object getFieldValue(_Fields field) {
23949
      switch (field) {
578 chandransh 23950
      case SCX:
23951
        return getScx();
23952
 
553 chandransh 23953
      }
23954
      throw new IllegalStateException();
23955
    }
23956
 
23957
    public Object getFieldValue(int fieldId) {
23958
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23959
    }
23960
 
23961
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23962
    public boolean isSet(_Fields field) {
23963
      switch (field) {
578 chandransh 23964
      case SCX:
23965
        return isSetScx();
553 chandransh 23966
      }
23967
      throw new IllegalStateException();
23968
    }
23969
 
23970
    public boolean isSet(int fieldID) {
23971
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23972
    }
23973
 
23974
    @Override
23975
    public boolean equals(Object that) {
23976
      if (that == null)
23977
        return false;
23978
      if (that instanceof addAddressToCart_result)
23979
        return this.equals((addAddressToCart_result)that);
23980
      return false;
23981
    }
23982
 
23983
    public boolean equals(addAddressToCart_result that) {
23984
      if (that == null)
23985
        return false;
23986
 
578 chandransh 23987
      boolean this_present_scx = true && this.isSetScx();
23988
      boolean that_present_scx = true && that.isSetScx();
23989
      if (this_present_scx || that_present_scx) {
23990
        if (!(this_present_scx && that_present_scx))
23991
          return false;
23992
        if (!this.scx.equals(that.scx))
23993
          return false;
23994
      }
23995
 
553 chandransh 23996
      return true;
23997
    }
23998
 
23999
    @Override
24000
    public int hashCode() {
24001
      return 0;
24002
    }
24003
 
24004
    public int compareTo(addAddressToCart_result other) {
24005
      if (!getClass().equals(other.getClass())) {
24006
        return getClass().getName().compareTo(other.getClass().getName());
24007
      }
24008
 
24009
      int lastComparison = 0;
24010
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
24011
 
578 chandransh 24012
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24013
      if (lastComparison != 0) {
24014
        return lastComparison;
24015
      }
24016
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24017
      if (lastComparison != 0) {
24018
        return lastComparison;
24019
      }
553 chandransh 24020
      return 0;
24021
    }
24022
 
24023
    public void read(TProtocol iprot) throws TException {
24024
      TField field;
24025
      iprot.readStructBegin();
24026
      while (true)
24027
      {
24028
        field = iprot.readFieldBegin();
24029
        if (field.type == TType.STOP) { 
24030
          break;
24031
        }
24032
        _Fields fieldId = _Fields.findByThriftId(field.id);
24033
        if (fieldId == null) {
24034
          TProtocolUtil.skip(iprot, field.type);
24035
        } else {
24036
          switch (fieldId) {
578 chandransh 24037
            case SCX:
24038
              if (field.type == TType.STRUCT) {
24039
                this.scx = new ShoppingCartException();
24040
                this.scx.read(iprot);
24041
              } else { 
24042
                TProtocolUtil.skip(iprot, field.type);
24043
              }
24044
              break;
553 chandransh 24045
          }
24046
          iprot.readFieldEnd();
24047
        }
24048
      }
24049
      iprot.readStructEnd();
24050
      validate();
24051
    }
24052
 
24053
    public void write(TProtocol oprot) throws TException {
24054
      oprot.writeStructBegin(STRUCT_DESC);
24055
 
578 chandransh 24056
      if (this.isSetScx()) {
24057
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24058
        this.scx.write(oprot);
24059
        oprot.writeFieldEnd();
24060
      }
553 chandransh 24061
      oprot.writeFieldStop();
24062
      oprot.writeStructEnd();
24063
    }
24064
 
24065
    @Override
24066
    public String toString() {
24067
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
24068
      boolean first = true;
24069
 
578 chandransh 24070
      sb.append("scx:");
24071
      if (this.scx == null) {
24072
        sb.append("null");
24073
      } else {
24074
        sb.append(this.scx);
24075
      }
24076
      first = false;
553 chandransh 24077
      sb.append(")");
24078
      return sb.toString();
24079
    }
24080
 
24081
    public void validate() throws TException {
24082
      // check for required fields
24083
    }
24084
 
24085
  }
24086
 
688 chandransh 24087
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
24088
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 24089
 
24090
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24091
 
24092
    private long cartId;
24093
 
24094
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24095
    public enum _Fields implements TFieldIdEnum {
24096
      CART_ID((short)1, "cartId");
24097
 
24098
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24099
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24100
 
24101
      static {
24102
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24103
          byId.put((int)field._thriftId, field);
24104
          byName.put(field.getFieldName(), field);
24105
        }
24106
      }
24107
 
24108
      /**
24109
       * Find the _Fields constant that matches fieldId, or null if its not found.
24110
       */
24111
      public static _Fields findByThriftId(int fieldId) {
24112
        return byId.get(fieldId);
24113
      }
24114
 
24115
      /**
24116
       * Find the _Fields constant that matches fieldId, throwing an exception
24117
       * if it is not found.
24118
       */
24119
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24120
        _Fields fields = findByThriftId(fieldId);
24121
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24122
        return fields;
24123
      }
24124
 
24125
      /**
24126
       * Find the _Fields constant that matches name, or null if its not found.
24127
       */
24128
      public static _Fields findByName(String name) {
24129
        return byName.get(name);
24130
      }
24131
 
24132
      private final short _thriftId;
24133
      private final String _fieldName;
24134
 
24135
      _Fields(short thriftId, String fieldName) {
24136
        _thriftId = thriftId;
24137
        _fieldName = fieldName;
24138
      }
24139
 
24140
      public short getThriftFieldId() {
24141
        return _thriftId;
24142
      }
24143
 
24144
      public String getFieldName() {
24145
        return _fieldName;
24146
      }
24147
    }
24148
 
24149
    // isset id assignments
24150
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24151
    private BitSet __isset_bit_vector = new BitSet(1);
24152
 
24153
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24154
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24155
          new FieldValueMetaData(TType.I64)));
24156
    }});
24157
 
24158
    static {
688 chandransh 24159
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 24160
    }
24161
 
688 chandransh 24162
    public createOrders_args() {
48 ashish 24163
    }
24164
 
688 chandransh 24165
    public createOrders_args(
553 chandransh 24166
      long cartId)
48 ashish 24167
    {
24168
      this();
553 chandransh 24169
      this.cartId = cartId;
24170
      setCartIdIsSet(true);
48 ashish 24171
    }
24172
 
24173
    /**
24174
     * Performs a deep copy on <i>other</i>.
24175
     */
688 chandransh 24176
    public createOrders_args(createOrders_args other) {
48 ashish 24177
      __isset_bit_vector.clear();
24178
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24179
      this.cartId = other.cartId;
48 ashish 24180
    }
24181
 
688 chandransh 24182
    public createOrders_args deepCopy() {
24183
      return new createOrders_args(this);
48 ashish 24184
    }
24185
 
24186
    @Deprecated
688 chandransh 24187
    public createOrders_args clone() {
24188
      return new createOrders_args(this);
48 ashish 24189
    }
24190
 
553 chandransh 24191
    public long getCartId() {
24192
      return this.cartId;
48 ashish 24193
    }
24194
 
688 chandransh 24195
    public createOrders_args setCartId(long cartId) {
553 chandransh 24196
      this.cartId = cartId;
24197
      setCartIdIsSet(true);
48 ashish 24198
      return this;
24199
    }
24200
 
553 chandransh 24201
    public void unsetCartId() {
24202
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24203
    }
24204
 
553 chandransh 24205
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24206
    public boolean isSetCartId() {
24207
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24208
    }
24209
 
553 chandransh 24210
    public void setCartIdIsSet(boolean value) {
24211
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24212
    }
24213
 
24214
    public void setFieldValue(_Fields field, Object value) {
24215
      switch (field) {
553 chandransh 24216
      case CART_ID:
48 ashish 24217
        if (value == null) {
553 chandransh 24218
          unsetCartId();
48 ashish 24219
        } else {
553 chandransh 24220
          setCartId((Long)value);
48 ashish 24221
        }
24222
        break;
24223
 
24224
      }
24225
    }
24226
 
24227
    public void setFieldValue(int fieldID, Object value) {
24228
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24229
    }
24230
 
24231
    public Object getFieldValue(_Fields field) {
24232
      switch (field) {
553 chandransh 24233
      case CART_ID:
24234
        return new Long(getCartId());
48 ashish 24235
 
24236
      }
24237
      throw new IllegalStateException();
24238
    }
24239
 
24240
    public Object getFieldValue(int fieldId) {
24241
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24242
    }
24243
 
24244
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24245
    public boolean isSet(_Fields field) {
24246
      switch (field) {
553 chandransh 24247
      case CART_ID:
24248
        return isSetCartId();
48 ashish 24249
      }
24250
      throw new IllegalStateException();
24251
    }
24252
 
24253
    public boolean isSet(int fieldID) {
24254
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24255
    }
24256
 
24257
    @Override
24258
    public boolean equals(Object that) {
24259
      if (that == null)
24260
        return false;
688 chandransh 24261
      if (that instanceof createOrders_args)
24262
        return this.equals((createOrders_args)that);
48 ashish 24263
      return false;
24264
    }
24265
 
688 chandransh 24266
    public boolean equals(createOrders_args that) {
48 ashish 24267
      if (that == null)
24268
        return false;
24269
 
553 chandransh 24270
      boolean this_present_cartId = true;
24271
      boolean that_present_cartId = true;
24272
      if (this_present_cartId || that_present_cartId) {
24273
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24274
          return false;
553 chandransh 24275
        if (this.cartId != that.cartId)
48 ashish 24276
          return false;
24277
      }
24278
 
24279
      return true;
24280
    }
24281
 
24282
    @Override
24283
    public int hashCode() {
24284
      return 0;
24285
    }
24286
 
688 chandransh 24287
    public int compareTo(createOrders_args other) {
48 ashish 24288
      if (!getClass().equals(other.getClass())) {
24289
        return getClass().getName().compareTo(other.getClass().getName());
24290
      }
24291
 
24292
      int lastComparison = 0;
688 chandransh 24293
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 24294
 
553 chandransh 24295
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24296
      if (lastComparison != 0) {
24297
        return lastComparison;
24298
      }
553 chandransh 24299
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24300
      if (lastComparison != 0) {
24301
        return lastComparison;
24302
      }
24303
      return 0;
24304
    }
24305
 
24306
    public void read(TProtocol iprot) throws TException {
24307
      TField field;
24308
      iprot.readStructBegin();
24309
      while (true)
24310
      {
24311
        field = iprot.readFieldBegin();
24312
        if (field.type == TType.STOP) { 
24313
          break;
24314
        }
24315
        _Fields fieldId = _Fields.findByThriftId(field.id);
24316
        if (fieldId == null) {
24317
          TProtocolUtil.skip(iprot, field.type);
24318
        } else {
24319
          switch (fieldId) {
553 chandransh 24320
            case CART_ID:
48 ashish 24321
              if (field.type == TType.I64) {
553 chandransh 24322
                this.cartId = iprot.readI64();
24323
                setCartIdIsSet(true);
48 ashish 24324
              } else { 
24325
                TProtocolUtil.skip(iprot, field.type);
24326
              }
24327
              break;
24328
          }
24329
          iprot.readFieldEnd();
24330
        }
24331
      }
24332
      iprot.readStructEnd();
24333
      validate();
24334
    }
24335
 
24336
    public void write(TProtocol oprot) throws TException {
24337
      validate();
24338
 
24339
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24340
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24341
      oprot.writeI64(this.cartId);
48 ashish 24342
      oprot.writeFieldEnd();
24343
      oprot.writeFieldStop();
24344
      oprot.writeStructEnd();
24345
    }
24346
 
24347
    @Override
24348
    public String toString() {
688 chandransh 24349
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 24350
      boolean first = true;
24351
 
553 chandransh 24352
      sb.append("cartId:");
24353
      sb.append(this.cartId);
48 ashish 24354
      first = false;
24355
      sb.append(")");
24356
      return sb.toString();
24357
    }
24358
 
24359
    public void validate() throws TException {
24360
      // check for required fields
24361
    }
24362
 
24363
  }
24364
 
688 chandransh 24365
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
24366
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 24367
 
578 chandransh 24368
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 24369
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24370
 
578 chandransh 24371
    private long success;
553 chandransh 24372
    private ShoppingCartException scx;
48 ashish 24373
 
24374
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24375
    public enum _Fields implements TFieldIdEnum {
24376
      SUCCESS((short)0, "success"),
553 chandransh 24377
      SCX((short)1, "scx");
48 ashish 24378
 
24379
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24380
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24381
 
24382
      static {
24383
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24384
          byId.put((int)field._thriftId, field);
24385
          byName.put(field.getFieldName(), field);
24386
        }
24387
      }
24388
 
24389
      /**
24390
       * Find the _Fields constant that matches fieldId, or null if its not found.
24391
       */
24392
      public static _Fields findByThriftId(int fieldId) {
24393
        return byId.get(fieldId);
24394
      }
24395
 
24396
      /**
24397
       * Find the _Fields constant that matches fieldId, throwing an exception
24398
       * if it is not found.
24399
       */
24400
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24401
        _Fields fields = findByThriftId(fieldId);
24402
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24403
        return fields;
24404
      }
24405
 
24406
      /**
24407
       * Find the _Fields constant that matches name, or null if its not found.
24408
       */
24409
      public static _Fields findByName(String name) {
24410
        return byName.get(name);
24411
      }
24412
 
24413
      private final short _thriftId;
24414
      private final String _fieldName;
24415
 
24416
      _Fields(short thriftId, String fieldName) {
24417
        _thriftId = thriftId;
24418
        _fieldName = fieldName;
24419
      }
24420
 
24421
      public short getThriftFieldId() {
24422
        return _thriftId;
24423
      }
24424
 
24425
      public String getFieldName() {
24426
        return _fieldName;
24427
      }
24428
    }
24429
 
24430
    // isset id assignments
24431
    private static final int __SUCCESS_ISSET_ID = 0;
24432
    private BitSet __isset_bit_vector = new BitSet(1);
24433
 
24434
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24435
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 24436
          new FieldValueMetaData(TType.I64)));
553 chandransh 24437
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 24438
          new FieldValueMetaData(TType.STRUCT)));
24439
    }});
24440
 
24441
    static {
688 chandransh 24442
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 24443
    }
24444
 
688 chandransh 24445
    public createOrders_result() {
48 ashish 24446
    }
24447
 
688 chandransh 24448
    public createOrders_result(
578 chandransh 24449
      long success,
553 chandransh 24450
      ShoppingCartException scx)
48 ashish 24451
    {
24452
      this();
24453
      this.success = success;
24454
      setSuccessIsSet(true);
553 chandransh 24455
      this.scx = scx;
48 ashish 24456
    }
24457
 
24458
    /**
24459
     * Performs a deep copy on <i>other</i>.
24460
     */
688 chandransh 24461
    public createOrders_result(createOrders_result other) {
48 ashish 24462
      __isset_bit_vector.clear();
24463
      __isset_bit_vector.or(other.__isset_bit_vector);
24464
      this.success = other.success;
553 chandransh 24465
      if (other.isSetScx()) {
24466
        this.scx = new ShoppingCartException(other.scx);
48 ashish 24467
      }
24468
    }
24469
 
688 chandransh 24470
    public createOrders_result deepCopy() {
24471
      return new createOrders_result(this);
48 ashish 24472
    }
24473
 
24474
    @Deprecated
688 chandransh 24475
    public createOrders_result clone() {
24476
      return new createOrders_result(this);
48 ashish 24477
    }
24478
 
578 chandransh 24479
    public long getSuccess() {
48 ashish 24480
      return this.success;
24481
    }
24482
 
688 chandransh 24483
    public createOrders_result setSuccess(long success) {
48 ashish 24484
      this.success = success;
24485
      setSuccessIsSet(true);
24486
      return this;
24487
    }
24488
 
24489
    public void unsetSuccess() {
24490
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24491
    }
24492
 
24493
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24494
    public boolean isSetSuccess() {
24495
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24496
    }
24497
 
24498
    public void setSuccessIsSet(boolean value) {
24499
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24500
    }
24501
 
553 chandransh 24502
    public ShoppingCartException getScx() {
24503
      return this.scx;
48 ashish 24504
    }
24505
 
688 chandransh 24506
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 24507
      this.scx = scx;
48 ashish 24508
      return this;
24509
    }
24510
 
553 chandransh 24511
    public void unsetScx() {
24512
      this.scx = null;
48 ashish 24513
    }
24514
 
553 chandransh 24515
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24516
    public boolean isSetScx() {
24517
      return this.scx != null;
48 ashish 24518
    }
24519
 
553 chandransh 24520
    public void setScxIsSet(boolean value) {
48 ashish 24521
      if (!value) {
553 chandransh 24522
        this.scx = null;
48 ashish 24523
      }
24524
    }
24525
 
24526
    public void setFieldValue(_Fields field, Object value) {
24527
      switch (field) {
24528
      case SUCCESS:
24529
        if (value == null) {
24530
          unsetSuccess();
24531
        } else {
578 chandransh 24532
          setSuccess((Long)value);
48 ashish 24533
        }
24534
        break;
24535
 
553 chandransh 24536
      case SCX:
48 ashish 24537
        if (value == null) {
553 chandransh 24538
          unsetScx();
48 ashish 24539
        } else {
553 chandransh 24540
          setScx((ShoppingCartException)value);
48 ashish 24541
        }
24542
        break;
24543
 
24544
      }
24545
    }
24546
 
24547
    public void setFieldValue(int fieldID, Object value) {
24548
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24549
    }
24550
 
24551
    public Object getFieldValue(_Fields field) {
24552
      switch (field) {
24553
      case SUCCESS:
578 chandransh 24554
        return new Long(getSuccess());
48 ashish 24555
 
553 chandransh 24556
      case SCX:
24557
        return getScx();
48 ashish 24558
 
24559
      }
24560
      throw new IllegalStateException();
24561
    }
24562
 
24563
    public Object getFieldValue(int fieldId) {
24564
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24565
    }
24566
 
24567
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24568
    public boolean isSet(_Fields field) {
24569
      switch (field) {
24570
      case SUCCESS:
24571
        return isSetSuccess();
553 chandransh 24572
      case SCX:
24573
        return isSetScx();
48 ashish 24574
      }
24575
      throw new IllegalStateException();
24576
    }
24577
 
24578
    public boolean isSet(int fieldID) {
24579
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24580
    }
24581
 
24582
    @Override
24583
    public boolean equals(Object that) {
24584
      if (that == null)
24585
        return false;
688 chandransh 24586
      if (that instanceof createOrders_result)
24587
        return this.equals((createOrders_result)that);
48 ashish 24588
      return false;
24589
    }
24590
 
688 chandransh 24591
    public boolean equals(createOrders_result that) {
48 ashish 24592
      if (that == null)
24593
        return false;
24594
 
24595
      boolean this_present_success = true;
24596
      boolean that_present_success = true;
24597
      if (this_present_success || that_present_success) {
24598
        if (!(this_present_success && that_present_success))
24599
          return false;
24600
        if (this.success != that.success)
24601
          return false;
24602
      }
24603
 
553 chandransh 24604
      boolean this_present_scx = true && this.isSetScx();
24605
      boolean that_present_scx = true && that.isSetScx();
24606
      if (this_present_scx || that_present_scx) {
24607
        if (!(this_present_scx && that_present_scx))
48 ashish 24608
          return false;
553 chandransh 24609
        if (!this.scx.equals(that.scx))
48 ashish 24610
          return false;
24611
      }
24612
 
24613
      return true;
24614
    }
24615
 
24616
    @Override
24617
    public int hashCode() {
24618
      return 0;
24619
    }
24620
 
688 chandransh 24621
    public int compareTo(createOrders_result other) {
48 ashish 24622
      if (!getClass().equals(other.getClass())) {
24623
        return getClass().getName().compareTo(other.getClass().getName());
24624
      }
24625
 
24626
      int lastComparison = 0;
688 chandransh 24627
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 24628
 
24629
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24630
      if (lastComparison != 0) {
24631
        return lastComparison;
24632
      }
24633
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24634
      if (lastComparison != 0) {
24635
        return lastComparison;
24636
      }
553 chandransh 24637
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 24638
      if (lastComparison != 0) {
24639
        return lastComparison;
24640
      }
553 chandransh 24641
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 24642
      if (lastComparison != 0) {
24643
        return lastComparison;
24644
      }
24645
      return 0;
24646
    }
24647
 
24648
    public void read(TProtocol iprot) throws TException {
24649
      TField field;
24650
      iprot.readStructBegin();
24651
      while (true)
24652
      {
24653
        field = iprot.readFieldBegin();
24654
        if (field.type == TType.STOP) { 
24655
          break;
24656
        }
24657
        _Fields fieldId = _Fields.findByThriftId(field.id);
24658
        if (fieldId == null) {
24659
          TProtocolUtil.skip(iprot, field.type);
24660
        } else {
24661
          switch (fieldId) {
24662
            case SUCCESS:
578 chandransh 24663
              if (field.type == TType.I64) {
24664
                this.success = iprot.readI64();
48 ashish 24665
                setSuccessIsSet(true);
24666
              } else { 
24667
                TProtocolUtil.skip(iprot, field.type);
24668
              }
24669
              break;
553 chandransh 24670
            case SCX:
48 ashish 24671
              if (field.type == TType.STRUCT) {
553 chandransh 24672
                this.scx = new ShoppingCartException();
24673
                this.scx.read(iprot);
48 ashish 24674
              } else { 
24675
                TProtocolUtil.skip(iprot, field.type);
24676
              }
24677
              break;
24678
          }
24679
          iprot.readFieldEnd();
24680
        }
24681
      }
24682
      iprot.readStructEnd();
24683
      validate();
24684
    }
24685
 
24686
    public void write(TProtocol oprot) throws TException {
24687
      oprot.writeStructBegin(STRUCT_DESC);
24688
 
24689
      if (this.isSetSuccess()) {
24690
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 24691
        oprot.writeI64(this.success);
48 ashish 24692
        oprot.writeFieldEnd();
553 chandransh 24693
      } else if (this.isSetScx()) {
24694
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24695
        this.scx.write(oprot);
48 ashish 24696
        oprot.writeFieldEnd();
24697
      }
24698
      oprot.writeFieldStop();
24699
      oprot.writeStructEnd();
24700
    }
24701
 
24702
    @Override
24703
    public String toString() {
688 chandransh 24704
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 24705
      boolean first = true;
24706
 
24707
      sb.append("success:");
24708
      sb.append(this.success);
24709
      first = false;
24710
      if (!first) sb.append(", ");
553 chandransh 24711
      sb.append("scx:");
24712
      if (this.scx == null) {
48 ashish 24713
        sb.append("null");
24714
      } else {
553 chandransh 24715
        sb.append(this.scx);
48 ashish 24716
      }
24717
      first = false;
24718
      sb.append(")");
24719
      return sb.toString();
24720
    }
24721
 
24722
    public void validate() throws TException {
24723
      // check for required fields
24724
    }
24725
 
24726
  }
24727
 
553 chandransh 24728
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
24729
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 24730
 
553 chandransh 24731
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 24732
 
553 chandransh 24733
    private long cartId;
48 ashish 24734
 
24735
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24736
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24737
      CART_ID((short)1, "cartId");
48 ashish 24738
 
24739
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24741
 
24742
      static {
24743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24744
          byId.put((int)field._thriftId, field);
24745
          byName.put(field.getFieldName(), field);
24746
        }
24747
      }
24748
 
24749
      /**
24750
       * Find the _Fields constant that matches fieldId, or null if its not found.
24751
       */
24752
      public static _Fields findByThriftId(int fieldId) {
24753
        return byId.get(fieldId);
24754
      }
24755
 
24756
      /**
24757
       * Find the _Fields constant that matches fieldId, throwing an exception
24758
       * if it is not found.
24759
       */
24760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24761
        _Fields fields = findByThriftId(fieldId);
24762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24763
        return fields;
24764
      }
24765
 
24766
      /**
24767
       * Find the _Fields constant that matches name, or null if its not found.
24768
       */
24769
      public static _Fields findByName(String name) {
24770
        return byName.get(name);
24771
      }
24772
 
24773
      private final short _thriftId;
24774
      private final String _fieldName;
24775
 
24776
      _Fields(short thriftId, String fieldName) {
24777
        _thriftId = thriftId;
24778
        _fieldName = fieldName;
24779
      }
24780
 
24781
      public short getThriftFieldId() {
24782
        return _thriftId;
24783
      }
24784
 
24785
      public String getFieldName() {
24786
        return _fieldName;
24787
      }
24788
    }
24789
 
24790
    // isset id assignments
553 chandransh 24791
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24792
    private BitSet __isset_bit_vector = new BitSet(1);
24793
 
24794
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24795
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24796
          new FieldValueMetaData(TType.I64)));
24797
    }});
24798
 
24799
    static {
553 chandransh 24800
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 24801
    }
24802
 
553 chandransh 24803
    public validateCart_args() {
48 ashish 24804
    }
24805
 
553 chandransh 24806
    public validateCart_args(
24807
      long cartId)
48 ashish 24808
    {
24809
      this();
553 chandransh 24810
      this.cartId = cartId;
24811
      setCartIdIsSet(true);
48 ashish 24812
    }
24813
 
24814
    /**
24815
     * Performs a deep copy on <i>other</i>.
24816
     */
553 chandransh 24817
    public validateCart_args(validateCart_args other) {
48 ashish 24818
      __isset_bit_vector.clear();
24819
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24820
      this.cartId = other.cartId;
48 ashish 24821
    }
24822
 
553 chandransh 24823
    public validateCart_args deepCopy() {
24824
      return new validateCart_args(this);
48 ashish 24825
    }
24826
 
24827
    @Deprecated
553 chandransh 24828
    public validateCart_args clone() {
24829
      return new validateCart_args(this);
48 ashish 24830
    }
24831
 
553 chandransh 24832
    public long getCartId() {
24833
      return this.cartId;
48 ashish 24834
    }
24835
 
553 chandransh 24836
    public validateCart_args setCartId(long cartId) {
24837
      this.cartId = cartId;
24838
      setCartIdIsSet(true);
48 ashish 24839
      return this;
24840
    }
24841
 
553 chandransh 24842
    public void unsetCartId() {
24843
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24844
    }
24845
 
553 chandransh 24846
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24847
    public boolean isSetCartId() {
24848
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24849
    }
24850
 
553 chandransh 24851
    public void setCartIdIsSet(boolean value) {
24852
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24853
    }
24854
 
24855
    public void setFieldValue(_Fields field, Object value) {
24856
      switch (field) {
553 chandransh 24857
      case CART_ID:
48 ashish 24858
        if (value == null) {
553 chandransh 24859
          unsetCartId();
48 ashish 24860
        } else {
553 chandransh 24861
          setCartId((Long)value);
48 ashish 24862
        }
24863
        break;
24864
 
24865
      }
24866
    }
24867
 
24868
    public void setFieldValue(int fieldID, Object value) {
24869
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24870
    }
24871
 
24872
    public Object getFieldValue(_Fields field) {
24873
      switch (field) {
553 chandransh 24874
      case CART_ID:
24875
        return new Long(getCartId());
48 ashish 24876
 
24877
      }
24878
      throw new IllegalStateException();
24879
    }
24880
 
24881
    public Object getFieldValue(int fieldId) {
24882
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24883
    }
24884
 
24885
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24886
    public boolean isSet(_Fields field) {
24887
      switch (field) {
553 chandransh 24888
      case CART_ID:
24889
        return isSetCartId();
48 ashish 24890
      }
24891
      throw new IllegalStateException();
24892
    }
24893
 
24894
    public boolean isSet(int fieldID) {
24895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24896
    }
24897
 
24898
    @Override
24899
    public boolean equals(Object that) {
24900
      if (that == null)
24901
        return false;
553 chandransh 24902
      if (that instanceof validateCart_args)
24903
        return this.equals((validateCart_args)that);
48 ashish 24904
      return false;
24905
    }
24906
 
553 chandransh 24907
    public boolean equals(validateCart_args that) {
48 ashish 24908
      if (that == null)
24909
        return false;
24910
 
553 chandransh 24911
      boolean this_present_cartId = true;
24912
      boolean that_present_cartId = true;
24913
      if (this_present_cartId || that_present_cartId) {
24914
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24915
          return false;
553 chandransh 24916
        if (this.cartId != that.cartId)
48 ashish 24917
          return false;
24918
      }
24919
 
24920
      return true;
24921
    }
24922
 
24923
    @Override
24924
    public int hashCode() {
24925
      return 0;
24926
    }
24927
 
553 chandransh 24928
    public int compareTo(validateCart_args other) {
48 ashish 24929
      if (!getClass().equals(other.getClass())) {
24930
        return getClass().getName().compareTo(other.getClass().getName());
24931
      }
24932
 
24933
      int lastComparison = 0;
553 chandransh 24934
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 24935
 
553 chandransh 24936
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24937
      if (lastComparison != 0) {
24938
        return lastComparison;
24939
      }
553 chandransh 24940
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24941
      if (lastComparison != 0) {
24942
        return lastComparison;
24943
      }
24944
      return 0;
24945
    }
24946
 
24947
    public void read(TProtocol iprot) throws TException {
24948
      TField field;
24949
      iprot.readStructBegin();
24950
      while (true)
24951
      {
24952
        field = iprot.readFieldBegin();
24953
        if (field.type == TType.STOP) { 
24954
          break;
24955
        }
24956
        _Fields fieldId = _Fields.findByThriftId(field.id);
24957
        if (fieldId == null) {
24958
          TProtocolUtil.skip(iprot, field.type);
24959
        } else {
24960
          switch (fieldId) {
553 chandransh 24961
            case CART_ID:
48 ashish 24962
              if (field.type == TType.I64) {
553 chandransh 24963
                this.cartId = iprot.readI64();
24964
                setCartIdIsSet(true);
48 ashish 24965
              } else { 
24966
                TProtocolUtil.skip(iprot, field.type);
24967
              }
24968
              break;
24969
          }
24970
          iprot.readFieldEnd();
24971
        }
24972
      }
24973
      iprot.readStructEnd();
24974
      validate();
24975
    }
24976
 
24977
    public void write(TProtocol oprot) throws TException {
24978
      validate();
24979
 
24980
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24981
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24982
      oprot.writeI64(this.cartId);
48 ashish 24983
      oprot.writeFieldEnd();
24984
      oprot.writeFieldStop();
24985
      oprot.writeStructEnd();
24986
    }
24987
 
24988
    @Override
24989
    public String toString() {
553 chandransh 24990
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 24991
      boolean first = true;
24992
 
553 chandransh 24993
      sb.append("cartId:");
24994
      sb.append(this.cartId);
48 ashish 24995
      first = false;
24996
      sb.append(")");
24997
      return sb.toString();
24998
    }
24999
 
25000
    public void validate() throws TException {
25001
      // check for required fields
25002
    }
25003
 
25004
  }
25005
 
553 chandransh 25006
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
25007
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 25008
 
25009
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 25010
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 25011
 
25012
    private boolean success;
578 chandransh 25013
    private ShoppingCartException scex;
48 ashish 25014
 
25015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25016
    public enum _Fields implements TFieldIdEnum {
578 chandransh 25017
      SUCCESS((short)0, "success"),
25018
      SCEX((short)1, "scex");
48 ashish 25019
 
25020
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25022
 
25023
      static {
25024
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25025
          byId.put((int)field._thriftId, field);
25026
          byName.put(field.getFieldName(), field);
25027
        }
25028
      }
25029
 
25030
      /**
25031
       * Find the _Fields constant that matches fieldId, or null if its not found.
25032
       */
25033
      public static _Fields findByThriftId(int fieldId) {
25034
        return byId.get(fieldId);
25035
      }
25036
 
25037
      /**
25038
       * Find the _Fields constant that matches fieldId, throwing an exception
25039
       * if it is not found.
25040
       */
25041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25042
        _Fields fields = findByThriftId(fieldId);
25043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25044
        return fields;
25045
      }
25046
 
25047
      /**
25048
       * Find the _Fields constant that matches name, or null if its not found.
25049
       */
25050
      public static _Fields findByName(String name) {
25051
        return byName.get(name);
25052
      }
25053
 
25054
      private final short _thriftId;
25055
      private final String _fieldName;
25056
 
25057
      _Fields(short thriftId, String fieldName) {
25058
        _thriftId = thriftId;
25059
        _fieldName = fieldName;
25060
      }
25061
 
25062
      public short getThriftFieldId() {
25063
        return _thriftId;
25064
      }
25065
 
25066
      public String getFieldName() {
25067
        return _fieldName;
25068
      }
25069
    }
25070
 
25071
    // isset id assignments
25072
    private static final int __SUCCESS_ISSET_ID = 0;
25073
    private BitSet __isset_bit_vector = new BitSet(1);
25074
 
25075
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25076
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25077
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 25078
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
25079
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 25080
    }});
25081
 
25082
    static {
553 chandransh 25083
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 25084
    }
25085
 
553 chandransh 25086
    public validateCart_result() {
48 ashish 25087
    }
25088
 
553 chandransh 25089
    public validateCart_result(
578 chandransh 25090
      boolean success,
25091
      ShoppingCartException scex)
48 ashish 25092
    {
25093
      this();
25094
      this.success = success;
25095
      setSuccessIsSet(true);
578 chandransh 25096
      this.scex = scex;
48 ashish 25097
    }
25098
 
25099
    /**
25100
     * Performs a deep copy on <i>other</i>.
25101
     */
553 chandransh 25102
    public validateCart_result(validateCart_result other) {
48 ashish 25103
      __isset_bit_vector.clear();
25104
      __isset_bit_vector.or(other.__isset_bit_vector);
25105
      this.success = other.success;
578 chandransh 25106
      if (other.isSetScex()) {
25107
        this.scex = new ShoppingCartException(other.scex);
25108
      }
48 ashish 25109
    }
25110
 
553 chandransh 25111
    public validateCart_result deepCopy() {
25112
      return new validateCart_result(this);
48 ashish 25113
    }
25114
 
25115
    @Deprecated
553 chandransh 25116
    public validateCart_result clone() {
25117
      return new validateCart_result(this);
48 ashish 25118
    }
25119
 
25120
    public boolean isSuccess() {
25121
      return this.success;
25122
    }
25123
 
553 chandransh 25124
    public validateCart_result setSuccess(boolean success) {
48 ashish 25125
      this.success = success;
25126
      setSuccessIsSet(true);
25127
      return this;
25128
    }
25129
 
25130
    public void unsetSuccess() {
25131
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
25132
    }
25133
 
25134
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25135
    public boolean isSetSuccess() {
25136
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
25137
    }
25138
 
25139
    public void setSuccessIsSet(boolean value) {
25140
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
25141
    }
25142
 
578 chandransh 25143
    public ShoppingCartException getScex() {
25144
      return this.scex;
25145
    }
25146
 
25147
    public validateCart_result setScex(ShoppingCartException scex) {
25148
      this.scex = scex;
25149
      return this;
25150
    }
25151
 
25152
    public void unsetScex() {
25153
      this.scex = null;
25154
    }
25155
 
25156
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
25157
    public boolean isSetScex() {
25158
      return this.scex != null;
25159
    }
25160
 
25161
    public void setScexIsSet(boolean value) {
25162
      if (!value) {
25163
        this.scex = null;
25164
      }
25165
    }
25166
 
553 chandransh 25167
    public void setFieldValue(_Fields field, Object value) {
25168
      switch (field) {
25169
      case SUCCESS:
25170
        if (value == null) {
25171
          unsetSuccess();
25172
        } else {
25173
          setSuccess((Boolean)value);
25174
        }
25175
        break;
25176
 
578 chandransh 25177
      case SCEX:
25178
        if (value == null) {
25179
          unsetScex();
25180
        } else {
25181
          setScex((ShoppingCartException)value);
25182
        }
25183
        break;
25184
 
553 chandransh 25185
      }
48 ashish 25186
    }
25187
 
553 chandransh 25188
    public void setFieldValue(int fieldID, Object value) {
25189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25190
    }
25191
 
25192
    public Object getFieldValue(_Fields field) {
25193
      switch (field) {
25194
      case SUCCESS:
25195
        return new Boolean(isSuccess());
25196
 
578 chandransh 25197
      case SCEX:
25198
        return getScex();
25199
 
553 chandransh 25200
      }
25201
      throw new IllegalStateException();
25202
    }
25203
 
25204
    public Object getFieldValue(int fieldId) {
25205
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25206
    }
25207
 
25208
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25209
    public boolean isSet(_Fields field) {
25210
      switch (field) {
25211
      case SUCCESS:
25212
        return isSetSuccess();
578 chandransh 25213
      case SCEX:
25214
        return isSetScex();
553 chandransh 25215
      }
25216
      throw new IllegalStateException();
25217
    }
25218
 
25219
    public boolean isSet(int fieldID) {
25220
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25221
    }
25222
 
25223
    @Override
25224
    public boolean equals(Object that) {
25225
      if (that == null)
25226
        return false;
25227
      if (that instanceof validateCart_result)
25228
        return this.equals((validateCart_result)that);
25229
      return false;
25230
    }
25231
 
25232
    public boolean equals(validateCart_result that) {
25233
      if (that == null)
25234
        return false;
25235
 
25236
      boolean this_present_success = true;
25237
      boolean that_present_success = true;
25238
      if (this_present_success || that_present_success) {
25239
        if (!(this_present_success && that_present_success))
25240
          return false;
25241
        if (this.success != that.success)
25242
          return false;
25243
      }
25244
 
578 chandransh 25245
      boolean this_present_scex = true && this.isSetScex();
25246
      boolean that_present_scex = true && that.isSetScex();
25247
      if (this_present_scex || that_present_scex) {
25248
        if (!(this_present_scex && that_present_scex))
25249
          return false;
25250
        if (!this.scex.equals(that.scex))
25251
          return false;
25252
      }
25253
 
553 chandransh 25254
      return true;
25255
    }
25256
 
25257
    @Override
25258
    public int hashCode() {
25259
      return 0;
25260
    }
25261
 
25262
    public int compareTo(validateCart_result other) {
25263
      if (!getClass().equals(other.getClass())) {
25264
        return getClass().getName().compareTo(other.getClass().getName());
25265
      }
25266
 
25267
      int lastComparison = 0;
25268
      validateCart_result typedOther = (validateCart_result)other;
25269
 
25270
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25271
      if (lastComparison != 0) {
25272
        return lastComparison;
25273
      }
25274
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25275
      if (lastComparison != 0) {
25276
        return lastComparison;
25277
      }
578 chandransh 25278
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
25279
      if (lastComparison != 0) {
25280
        return lastComparison;
25281
      }
25282
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
25283
      if (lastComparison != 0) {
25284
        return lastComparison;
25285
      }
553 chandransh 25286
      return 0;
25287
    }
25288
 
25289
    public void read(TProtocol iprot) throws TException {
25290
      TField field;
25291
      iprot.readStructBegin();
25292
      while (true)
25293
      {
25294
        field = iprot.readFieldBegin();
25295
        if (field.type == TType.STOP) { 
25296
          break;
25297
        }
25298
        _Fields fieldId = _Fields.findByThriftId(field.id);
25299
        if (fieldId == null) {
25300
          TProtocolUtil.skip(iprot, field.type);
25301
        } else {
25302
          switch (fieldId) {
25303
            case SUCCESS:
25304
              if (field.type == TType.BOOL) {
25305
                this.success = iprot.readBool();
25306
                setSuccessIsSet(true);
25307
              } else { 
25308
                TProtocolUtil.skip(iprot, field.type);
25309
              }
25310
              break;
578 chandransh 25311
            case SCEX:
25312
              if (field.type == TType.STRUCT) {
25313
                this.scex = new ShoppingCartException();
25314
                this.scex.read(iprot);
25315
              } else { 
25316
                TProtocolUtil.skip(iprot, field.type);
25317
              }
25318
              break;
553 chandransh 25319
          }
25320
          iprot.readFieldEnd();
25321
        }
25322
      }
25323
      iprot.readStructEnd();
25324
      validate();
25325
    }
25326
 
25327
    public void write(TProtocol oprot) throws TException {
25328
      oprot.writeStructBegin(STRUCT_DESC);
25329
 
25330
      if (this.isSetSuccess()) {
25331
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25332
        oprot.writeBool(this.success);
25333
        oprot.writeFieldEnd();
578 chandransh 25334
      } else if (this.isSetScex()) {
25335
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
25336
        this.scex.write(oprot);
25337
        oprot.writeFieldEnd();
553 chandransh 25338
      }
25339
      oprot.writeFieldStop();
25340
      oprot.writeStructEnd();
25341
    }
25342
 
25343
    @Override
25344
    public String toString() {
25345
      StringBuilder sb = new StringBuilder("validateCart_result(");
25346
      boolean first = true;
25347
 
25348
      sb.append("success:");
25349
      sb.append(this.success);
25350
      first = false;
578 chandransh 25351
      if (!first) sb.append(", ");
25352
      sb.append("scex:");
25353
      if (this.scex == null) {
25354
        sb.append("null");
25355
      } else {
25356
        sb.append(this.scex);
25357
      }
25358
      first = false;
553 chandransh 25359
      sb.append(")");
25360
      return sb.toString();
25361
    }
25362
 
25363
    public void validate() throws TException {
25364
      // check for required fields
25365
    }
25366
 
25367
  }
25368
 
688 chandransh 25369
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
25370
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 25371
 
688 chandransh 25372
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
25373
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
25374
 
25375
    private long fromCartId;
25376
    private long toCartId;
25377
 
25378
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25379
    public enum _Fields implements TFieldIdEnum {
25380
      FROM_CART_ID((short)1, "fromCartId"),
25381
      TO_CART_ID((short)2, "toCartId");
25382
 
25383
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25384
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25385
 
25386
      static {
25387
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25388
          byId.put((int)field._thriftId, field);
25389
          byName.put(field.getFieldName(), field);
25390
        }
25391
      }
25392
 
25393
      /**
25394
       * Find the _Fields constant that matches fieldId, or null if its not found.
25395
       */
25396
      public static _Fields findByThriftId(int fieldId) {
25397
        return byId.get(fieldId);
25398
      }
25399
 
25400
      /**
25401
       * Find the _Fields constant that matches fieldId, throwing an exception
25402
       * if it is not found.
25403
       */
25404
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25405
        _Fields fields = findByThriftId(fieldId);
25406
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25407
        return fields;
25408
      }
25409
 
25410
      /**
25411
       * Find the _Fields constant that matches name, or null if its not found.
25412
       */
25413
      public static _Fields findByName(String name) {
25414
        return byName.get(name);
25415
      }
25416
 
25417
      private final short _thriftId;
25418
      private final String _fieldName;
25419
 
25420
      _Fields(short thriftId, String fieldName) {
25421
        _thriftId = thriftId;
25422
        _fieldName = fieldName;
25423
      }
25424
 
25425
      public short getThriftFieldId() {
25426
        return _thriftId;
25427
      }
25428
 
25429
      public String getFieldName() {
25430
        return _fieldName;
25431
      }
25432
    }
25433
 
25434
    // isset id assignments
25435
    private static final int __FROMCARTID_ISSET_ID = 0;
25436
    private static final int __TOCARTID_ISSET_ID = 1;
25437
    private BitSet __isset_bit_vector = new BitSet(2);
25438
 
25439
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25440
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
25441
          new FieldValueMetaData(TType.I64)));
25442
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
25443
          new FieldValueMetaData(TType.I64)));
25444
    }});
25445
 
25446
    static {
25447
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
25448
    }
25449
 
25450
    public mergeCart_args() {
25451
    }
25452
 
25453
    public mergeCart_args(
25454
      long fromCartId,
25455
      long toCartId)
25456
    {
25457
      this();
25458
      this.fromCartId = fromCartId;
25459
      setFromCartIdIsSet(true);
25460
      this.toCartId = toCartId;
25461
      setToCartIdIsSet(true);
25462
    }
25463
 
25464
    /**
25465
     * Performs a deep copy on <i>other</i>.
25466
     */
25467
    public mergeCart_args(mergeCart_args other) {
25468
      __isset_bit_vector.clear();
25469
      __isset_bit_vector.or(other.__isset_bit_vector);
25470
      this.fromCartId = other.fromCartId;
25471
      this.toCartId = other.toCartId;
25472
    }
25473
 
25474
    public mergeCart_args deepCopy() {
25475
      return new mergeCart_args(this);
25476
    }
25477
 
25478
    @Deprecated
25479
    public mergeCart_args clone() {
25480
      return new mergeCart_args(this);
25481
    }
25482
 
25483
    public long getFromCartId() {
25484
      return this.fromCartId;
25485
    }
25486
 
25487
    public mergeCart_args setFromCartId(long fromCartId) {
25488
      this.fromCartId = fromCartId;
25489
      setFromCartIdIsSet(true);
25490
      return this;
25491
    }
25492
 
25493
    public void unsetFromCartId() {
25494
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
25495
    }
25496
 
25497
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
25498
    public boolean isSetFromCartId() {
25499
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
25500
    }
25501
 
25502
    public void setFromCartIdIsSet(boolean value) {
25503
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
25504
    }
25505
 
25506
    public long getToCartId() {
25507
      return this.toCartId;
25508
    }
25509
 
25510
    public mergeCart_args setToCartId(long toCartId) {
25511
      this.toCartId = toCartId;
25512
      setToCartIdIsSet(true);
25513
      return this;
25514
    }
25515
 
25516
    public void unsetToCartId() {
25517
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
25518
    }
25519
 
25520
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
25521
    public boolean isSetToCartId() {
25522
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
25523
    }
25524
 
25525
    public void setToCartIdIsSet(boolean value) {
25526
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
25527
    }
25528
 
25529
    public void setFieldValue(_Fields field, Object value) {
25530
      switch (field) {
25531
      case FROM_CART_ID:
25532
        if (value == null) {
25533
          unsetFromCartId();
25534
        } else {
25535
          setFromCartId((Long)value);
25536
        }
25537
        break;
25538
 
25539
      case TO_CART_ID:
25540
        if (value == null) {
25541
          unsetToCartId();
25542
        } else {
25543
          setToCartId((Long)value);
25544
        }
25545
        break;
25546
 
25547
      }
25548
    }
25549
 
25550
    public void setFieldValue(int fieldID, Object value) {
25551
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25552
    }
25553
 
25554
    public Object getFieldValue(_Fields field) {
25555
      switch (field) {
25556
      case FROM_CART_ID:
25557
        return new Long(getFromCartId());
25558
 
25559
      case TO_CART_ID:
25560
        return new Long(getToCartId());
25561
 
25562
      }
25563
      throw new IllegalStateException();
25564
    }
25565
 
25566
    public Object getFieldValue(int fieldId) {
25567
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25568
    }
25569
 
25570
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25571
    public boolean isSet(_Fields field) {
25572
      switch (field) {
25573
      case FROM_CART_ID:
25574
        return isSetFromCartId();
25575
      case TO_CART_ID:
25576
        return isSetToCartId();
25577
      }
25578
      throw new IllegalStateException();
25579
    }
25580
 
25581
    public boolean isSet(int fieldID) {
25582
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25583
    }
25584
 
25585
    @Override
25586
    public boolean equals(Object that) {
25587
      if (that == null)
25588
        return false;
25589
      if (that instanceof mergeCart_args)
25590
        return this.equals((mergeCart_args)that);
25591
      return false;
25592
    }
25593
 
25594
    public boolean equals(mergeCart_args that) {
25595
      if (that == null)
25596
        return false;
25597
 
25598
      boolean this_present_fromCartId = true;
25599
      boolean that_present_fromCartId = true;
25600
      if (this_present_fromCartId || that_present_fromCartId) {
25601
        if (!(this_present_fromCartId && that_present_fromCartId))
25602
          return false;
25603
        if (this.fromCartId != that.fromCartId)
25604
          return false;
25605
      }
25606
 
25607
      boolean this_present_toCartId = true;
25608
      boolean that_present_toCartId = true;
25609
      if (this_present_toCartId || that_present_toCartId) {
25610
        if (!(this_present_toCartId && that_present_toCartId))
25611
          return false;
25612
        if (this.toCartId != that.toCartId)
25613
          return false;
25614
      }
25615
 
25616
      return true;
25617
    }
25618
 
25619
    @Override
25620
    public int hashCode() {
25621
      return 0;
25622
    }
25623
 
25624
    public int compareTo(mergeCart_args other) {
25625
      if (!getClass().equals(other.getClass())) {
25626
        return getClass().getName().compareTo(other.getClass().getName());
25627
      }
25628
 
25629
      int lastComparison = 0;
25630
      mergeCart_args typedOther = (mergeCart_args)other;
25631
 
25632
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
25633
      if (lastComparison != 0) {
25634
        return lastComparison;
25635
      }
25636
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
25637
      if (lastComparison != 0) {
25638
        return lastComparison;
25639
      }
25640
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
25641
      if (lastComparison != 0) {
25642
        return lastComparison;
25643
      }
25644
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
25645
      if (lastComparison != 0) {
25646
        return lastComparison;
25647
      }
25648
      return 0;
25649
    }
25650
 
25651
    public void read(TProtocol iprot) throws TException {
25652
      TField field;
25653
      iprot.readStructBegin();
25654
      while (true)
25655
      {
25656
        field = iprot.readFieldBegin();
25657
        if (field.type == TType.STOP) { 
25658
          break;
25659
        }
25660
        _Fields fieldId = _Fields.findByThriftId(field.id);
25661
        if (fieldId == null) {
25662
          TProtocolUtil.skip(iprot, field.type);
25663
        } else {
25664
          switch (fieldId) {
25665
            case FROM_CART_ID:
25666
              if (field.type == TType.I64) {
25667
                this.fromCartId = iprot.readI64();
25668
                setFromCartIdIsSet(true);
25669
              } else { 
25670
                TProtocolUtil.skip(iprot, field.type);
25671
              }
25672
              break;
25673
            case TO_CART_ID:
25674
              if (field.type == TType.I64) {
25675
                this.toCartId = iprot.readI64();
25676
                setToCartIdIsSet(true);
25677
              } else { 
25678
                TProtocolUtil.skip(iprot, field.type);
25679
              }
25680
              break;
25681
          }
25682
          iprot.readFieldEnd();
25683
        }
25684
      }
25685
      iprot.readStructEnd();
25686
      validate();
25687
    }
25688
 
25689
    public void write(TProtocol oprot) throws TException {
25690
      validate();
25691
 
25692
      oprot.writeStructBegin(STRUCT_DESC);
25693
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
25694
      oprot.writeI64(this.fromCartId);
25695
      oprot.writeFieldEnd();
25696
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
25697
      oprot.writeI64(this.toCartId);
25698
      oprot.writeFieldEnd();
25699
      oprot.writeFieldStop();
25700
      oprot.writeStructEnd();
25701
    }
25702
 
25703
    @Override
25704
    public String toString() {
25705
      StringBuilder sb = new StringBuilder("mergeCart_args(");
25706
      boolean first = true;
25707
 
25708
      sb.append("fromCartId:");
25709
      sb.append(this.fromCartId);
25710
      first = false;
25711
      if (!first) sb.append(", ");
25712
      sb.append("toCartId:");
25713
      sb.append(this.toCartId);
25714
      first = false;
25715
      sb.append(")");
25716
      return sb.toString();
25717
    }
25718
 
25719
    public void validate() throws TException {
25720
      // check for required fields
25721
    }
25722
 
25723
  }
25724
 
25725
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
25726
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
25727
 
25728
 
25729
 
25730
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25731
    public enum _Fields implements TFieldIdEnum {
25732
;
25733
 
25734
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25735
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25736
 
25737
      static {
25738
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25739
          byId.put((int)field._thriftId, field);
25740
          byName.put(field.getFieldName(), field);
25741
        }
25742
      }
25743
 
25744
      /**
25745
       * Find the _Fields constant that matches fieldId, or null if its not found.
25746
       */
25747
      public static _Fields findByThriftId(int fieldId) {
25748
        return byId.get(fieldId);
25749
      }
25750
 
25751
      /**
25752
       * Find the _Fields constant that matches fieldId, throwing an exception
25753
       * if it is not found.
25754
       */
25755
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25756
        _Fields fields = findByThriftId(fieldId);
25757
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25758
        return fields;
25759
      }
25760
 
25761
      /**
25762
       * Find the _Fields constant that matches name, or null if its not found.
25763
       */
25764
      public static _Fields findByName(String name) {
25765
        return byName.get(name);
25766
      }
25767
 
25768
      private final short _thriftId;
25769
      private final String _fieldName;
25770
 
25771
      _Fields(short thriftId, String fieldName) {
25772
        _thriftId = thriftId;
25773
        _fieldName = fieldName;
25774
      }
25775
 
25776
      public short getThriftFieldId() {
25777
        return _thriftId;
25778
      }
25779
 
25780
      public String getFieldName() {
25781
        return _fieldName;
25782
      }
25783
    }
25784
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25785
    }});
25786
 
25787
    static {
25788
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
25789
    }
25790
 
25791
    public mergeCart_result() {
25792
    }
25793
 
25794
    /**
25795
     * Performs a deep copy on <i>other</i>.
25796
     */
25797
    public mergeCart_result(mergeCart_result other) {
25798
    }
25799
 
25800
    public mergeCart_result deepCopy() {
25801
      return new mergeCart_result(this);
25802
    }
25803
 
25804
    @Deprecated
25805
    public mergeCart_result clone() {
25806
      return new mergeCart_result(this);
25807
    }
25808
 
25809
    public void setFieldValue(_Fields field, Object value) {
25810
      switch (field) {
25811
      }
25812
    }
25813
 
25814
    public void setFieldValue(int fieldID, Object value) {
25815
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25816
    }
25817
 
25818
    public Object getFieldValue(_Fields field) {
25819
      switch (field) {
25820
      }
25821
      throw new IllegalStateException();
25822
    }
25823
 
25824
    public Object getFieldValue(int fieldId) {
25825
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25826
    }
25827
 
25828
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25829
    public boolean isSet(_Fields field) {
25830
      switch (field) {
25831
      }
25832
      throw new IllegalStateException();
25833
    }
25834
 
25835
    public boolean isSet(int fieldID) {
25836
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25837
    }
25838
 
25839
    @Override
25840
    public boolean equals(Object that) {
25841
      if (that == null)
25842
        return false;
25843
      if (that instanceof mergeCart_result)
25844
        return this.equals((mergeCart_result)that);
25845
      return false;
25846
    }
25847
 
25848
    public boolean equals(mergeCart_result that) {
25849
      if (that == null)
25850
        return false;
25851
 
25852
      return true;
25853
    }
25854
 
25855
    @Override
25856
    public int hashCode() {
25857
      return 0;
25858
    }
25859
 
25860
    public int compareTo(mergeCart_result other) {
25861
      if (!getClass().equals(other.getClass())) {
25862
        return getClass().getName().compareTo(other.getClass().getName());
25863
      }
25864
 
25865
      int lastComparison = 0;
25866
      mergeCart_result typedOther = (mergeCart_result)other;
25867
 
25868
      return 0;
25869
    }
25870
 
25871
    public void read(TProtocol iprot) throws TException {
25872
      TField field;
25873
      iprot.readStructBegin();
25874
      while (true)
25875
      {
25876
        field = iprot.readFieldBegin();
25877
        if (field.type == TType.STOP) { 
25878
          break;
25879
        }
25880
        _Fields fieldId = _Fields.findByThriftId(field.id);
25881
        if (fieldId == null) {
25882
          TProtocolUtil.skip(iprot, field.type);
25883
        } else {
25884
          switch (fieldId) {
25885
          }
25886
          iprot.readFieldEnd();
25887
        }
25888
      }
25889
      iprot.readStructEnd();
25890
      validate();
25891
    }
25892
 
25893
    public void write(TProtocol oprot) throws TException {
25894
      oprot.writeStructBegin(STRUCT_DESC);
25895
 
25896
      oprot.writeFieldStop();
25897
      oprot.writeStructEnd();
25898
    }
25899
 
25900
    @Override
25901
    public String toString() {
25902
      StringBuilder sb = new StringBuilder("mergeCart_result(");
25903
      boolean first = true;
25904
 
25905
      sb.append(")");
25906
      return sb.toString();
25907
    }
25908
 
25909
    public void validate() throws TException {
25910
      // check for required fields
25911
    }
25912
 
25913
  }
25914
 
25915
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
25916
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
25917
 
578 chandransh 25918
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25919
 
25920
    private long cartId;
25921
 
25922
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25923
    public enum _Fields implements TFieldIdEnum {
25924
      CART_ID((short)1, "cartId");
25925
 
25926
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25927
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25928
 
25929
      static {
25930
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25931
          byId.put((int)field._thriftId, field);
25932
          byName.put(field.getFieldName(), field);
25933
        }
25934
      }
25935
 
25936
      /**
25937
       * Find the _Fields constant that matches fieldId, or null if its not found.
25938
       */
25939
      public static _Fields findByThriftId(int fieldId) {
25940
        return byId.get(fieldId);
25941
      }
25942
 
25943
      /**
25944
       * Find the _Fields constant that matches fieldId, throwing an exception
25945
       * if it is not found.
25946
       */
25947
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25948
        _Fields fields = findByThriftId(fieldId);
25949
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25950
        return fields;
25951
      }
25952
 
25953
      /**
25954
       * Find the _Fields constant that matches name, or null if its not found.
25955
       */
25956
      public static _Fields findByName(String name) {
25957
        return byName.get(name);
25958
      }
25959
 
25960
      private final short _thriftId;
25961
      private final String _fieldName;
25962
 
25963
      _Fields(short thriftId, String fieldName) {
25964
        _thriftId = thriftId;
25965
        _fieldName = fieldName;
25966
      }
25967
 
25968
      public short getThriftFieldId() {
25969
        return _thriftId;
25970
      }
25971
 
25972
      public String getFieldName() {
25973
        return _fieldName;
25974
      }
25975
    }
25976
 
25977
    // isset id assignments
25978
    private static final int __CARTID_ISSET_ID = 0;
25979
    private BitSet __isset_bit_vector = new BitSet(1);
25980
 
25981
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25982
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25983
          new FieldValueMetaData(TType.I64)));
25984
    }});
25985
 
25986
    static {
688 chandransh 25987
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 25988
    }
25989
 
688 chandransh 25990
    public checkOut_args() {
578 chandransh 25991
    }
25992
 
688 chandransh 25993
    public checkOut_args(
578 chandransh 25994
      long cartId)
25995
    {
25996
      this();
25997
      this.cartId = cartId;
25998
      setCartIdIsSet(true);
25999
    }
26000
 
26001
    /**
26002
     * Performs a deep copy on <i>other</i>.
26003
     */
688 chandransh 26004
    public checkOut_args(checkOut_args other) {
578 chandransh 26005
      __isset_bit_vector.clear();
26006
      __isset_bit_vector.or(other.__isset_bit_vector);
26007
      this.cartId = other.cartId;
26008
    }
26009
 
688 chandransh 26010
    public checkOut_args deepCopy() {
26011
      return new checkOut_args(this);
578 chandransh 26012
    }
26013
 
26014
    @Deprecated
688 chandransh 26015
    public checkOut_args clone() {
26016
      return new checkOut_args(this);
578 chandransh 26017
    }
26018
 
26019
    public long getCartId() {
26020
      return this.cartId;
26021
    }
26022
 
688 chandransh 26023
    public checkOut_args setCartId(long cartId) {
578 chandransh 26024
      this.cartId = cartId;
26025
      setCartIdIsSet(true);
26026
      return this;
26027
    }
26028
 
26029
    public void unsetCartId() {
26030
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
26031
    }
26032
 
26033
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26034
    public boolean isSetCartId() {
26035
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
26036
    }
26037
 
26038
    public void setCartIdIsSet(boolean value) {
26039
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
26040
    }
26041
 
26042
    public void setFieldValue(_Fields field, Object value) {
26043
      switch (field) {
26044
      case CART_ID:
26045
        if (value == null) {
26046
          unsetCartId();
26047
        } else {
26048
          setCartId((Long)value);
26049
        }
26050
        break;
26051
 
26052
      }
26053
    }
26054
 
26055
    public void setFieldValue(int fieldID, Object value) {
26056
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26057
    }
26058
 
26059
    public Object getFieldValue(_Fields field) {
26060
      switch (field) {
26061
      case CART_ID:
26062
        return new Long(getCartId());
26063
 
26064
      }
26065
      throw new IllegalStateException();
26066
    }
26067
 
26068
    public Object getFieldValue(int fieldId) {
26069
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26070
    }
26071
 
26072
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26073
    public boolean isSet(_Fields field) {
26074
      switch (field) {
26075
      case CART_ID:
26076
        return isSetCartId();
26077
      }
26078
      throw new IllegalStateException();
26079
    }
26080
 
26081
    public boolean isSet(int fieldID) {
26082
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26083
    }
26084
 
26085
    @Override
26086
    public boolean equals(Object that) {
26087
      if (that == null)
26088
        return false;
688 chandransh 26089
      if (that instanceof checkOut_args)
26090
        return this.equals((checkOut_args)that);
578 chandransh 26091
      return false;
26092
    }
26093
 
688 chandransh 26094
    public boolean equals(checkOut_args that) {
578 chandransh 26095
      if (that == null)
26096
        return false;
26097
 
26098
      boolean this_present_cartId = true;
26099
      boolean that_present_cartId = true;
26100
      if (this_present_cartId || that_present_cartId) {
26101
        if (!(this_present_cartId && that_present_cartId))
26102
          return false;
26103
        if (this.cartId != that.cartId)
26104
          return false;
26105
      }
26106
 
26107
      return true;
26108
    }
26109
 
26110
    @Override
26111
    public int hashCode() {
26112
      return 0;
26113
    }
26114
 
688 chandransh 26115
    public int compareTo(checkOut_args other) {
578 chandransh 26116
      if (!getClass().equals(other.getClass())) {
26117
        return getClass().getName().compareTo(other.getClass().getName());
26118
      }
26119
 
26120
      int lastComparison = 0;
688 chandransh 26121
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 26122
 
26123
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
26124
      if (lastComparison != 0) {
26125
        return lastComparison;
26126
      }
26127
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
26128
      if (lastComparison != 0) {
26129
        return lastComparison;
26130
      }
26131
      return 0;
26132
    }
26133
 
26134
    public void read(TProtocol iprot) throws TException {
26135
      TField field;
26136
      iprot.readStructBegin();
26137
      while (true)
26138
      {
26139
        field = iprot.readFieldBegin();
26140
        if (field.type == TType.STOP) { 
26141
          break;
26142
        }
26143
        _Fields fieldId = _Fields.findByThriftId(field.id);
26144
        if (fieldId == null) {
26145
          TProtocolUtil.skip(iprot, field.type);
26146
        } else {
26147
          switch (fieldId) {
26148
            case CART_ID:
26149
              if (field.type == TType.I64) {
26150
                this.cartId = iprot.readI64();
26151
                setCartIdIsSet(true);
26152
              } else { 
26153
                TProtocolUtil.skip(iprot, field.type);
26154
              }
26155
              break;
26156
          }
26157
          iprot.readFieldEnd();
26158
        }
26159
      }
26160
      iprot.readStructEnd();
26161
      validate();
26162
    }
26163
 
26164
    public void write(TProtocol oprot) throws TException {
26165
      validate();
26166
 
26167
      oprot.writeStructBegin(STRUCT_DESC);
26168
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26169
      oprot.writeI64(this.cartId);
26170
      oprot.writeFieldEnd();
26171
      oprot.writeFieldStop();
26172
      oprot.writeStructEnd();
26173
    }
26174
 
26175
    @Override
26176
    public String toString() {
688 chandransh 26177
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 26178
      boolean first = true;
26179
 
26180
      sb.append("cartId:");
26181
      sb.append(this.cartId);
26182
      first = false;
26183
      sb.append(")");
26184
      return sb.toString();
26185
    }
26186
 
26187
    public void validate() throws TException {
26188
      // check for required fields
26189
    }
26190
 
26191
  }
26192
 
688 chandransh 26193
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
26194
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 26195
 
26196
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
26197
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
26198
 
26199
    private boolean success;
26200
    private ShoppingCartException scex;
26201
 
26202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26203
    public enum _Fields implements TFieldIdEnum {
26204
      SUCCESS((short)0, "success"),
26205
      SCEX((short)1, "scex");
26206
 
26207
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26209
 
26210
      static {
26211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26212
          byId.put((int)field._thriftId, field);
26213
          byName.put(field.getFieldName(), field);
26214
        }
26215
      }
26216
 
26217
      /**
26218
       * Find the _Fields constant that matches fieldId, or null if its not found.
26219
       */
26220
      public static _Fields findByThriftId(int fieldId) {
26221
        return byId.get(fieldId);
26222
      }
26223
 
26224
      /**
26225
       * Find the _Fields constant that matches fieldId, throwing an exception
26226
       * if it is not found.
26227
       */
26228
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26229
        _Fields fields = findByThriftId(fieldId);
26230
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26231
        return fields;
26232
      }
26233
 
26234
      /**
26235
       * Find the _Fields constant that matches name, or null if its not found.
26236
       */
26237
      public static _Fields findByName(String name) {
26238
        return byName.get(name);
26239
      }
26240
 
26241
      private final short _thriftId;
26242
      private final String _fieldName;
26243
 
26244
      _Fields(short thriftId, String fieldName) {
26245
        _thriftId = thriftId;
26246
        _fieldName = fieldName;
26247
      }
26248
 
26249
      public short getThriftFieldId() {
26250
        return _thriftId;
26251
      }
26252
 
26253
      public String getFieldName() {
26254
        return _fieldName;
26255
      }
26256
    }
26257
 
26258
    // isset id assignments
26259
    private static final int __SUCCESS_ISSET_ID = 0;
26260
    private BitSet __isset_bit_vector = new BitSet(1);
26261
 
26262
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26263
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26264
          new FieldValueMetaData(TType.BOOL)));
26265
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26266
          new FieldValueMetaData(TType.STRUCT)));
26267
    }});
26268
 
26269
    static {
688 chandransh 26270
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 26271
    }
26272
 
688 chandransh 26273
    public checkOut_result() {
578 chandransh 26274
    }
26275
 
688 chandransh 26276
    public checkOut_result(
578 chandransh 26277
      boolean success,
26278
      ShoppingCartException scex)
26279
    {
26280
      this();
26281
      this.success = success;
26282
      setSuccessIsSet(true);
26283
      this.scex = scex;
26284
    }
26285
 
26286
    /**
26287
     * Performs a deep copy on <i>other</i>.
26288
     */
688 chandransh 26289
    public checkOut_result(checkOut_result other) {
578 chandransh 26290
      __isset_bit_vector.clear();
26291
      __isset_bit_vector.or(other.__isset_bit_vector);
26292
      this.success = other.success;
26293
      if (other.isSetScex()) {
26294
        this.scex = new ShoppingCartException(other.scex);
26295
      }
26296
    }
26297
 
688 chandransh 26298
    public checkOut_result deepCopy() {
26299
      return new checkOut_result(this);
578 chandransh 26300
    }
26301
 
26302
    @Deprecated
688 chandransh 26303
    public checkOut_result clone() {
26304
      return new checkOut_result(this);
578 chandransh 26305
    }
26306
 
26307
    public boolean isSuccess() {
26308
      return this.success;
26309
    }
26310
 
688 chandransh 26311
    public checkOut_result setSuccess(boolean success) {
578 chandransh 26312
      this.success = success;
26313
      setSuccessIsSet(true);
26314
      return this;
26315
    }
26316
 
26317
    public void unsetSuccess() {
26318
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26319
    }
26320
 
26321
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26322
    public boolean isSetSuccess() {
26323
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26324
    }
26325
 
26326
    public void setSuccessIsSet(boolean value) {
26327
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26328
    }
26329
 
26330
    public ShoppingCartException getScex() {
26331
      return this.scex;
26332
    }
26333
 
688 chandransh 26334
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 26335
      this.scex = scex;
26336
      return this;
26337
    }
26338
 
26339
    public void unsetScex() {
26340
      this.scex = null;
26341
    }
26342
 
26343
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26344
    public boolean isSetScex() {
26345
      return this.scex != null;
26346
    }
26347
 
26348
    public void setScexIsSet(boolean value) {
26349
      if (!value) {
26350
        this.scex = null;
26351
      }
26352
    }
26353
 
26354
    public void setFieldValue(_Fields field, Object value) {
26355
      switch (field) {
26356
      case SUCCESS:
26357
        if (value == null) {
26358
          unsetSuccess();
26359
        } else {
26360
          setSuccess((Boolean)value);
26361
        }
26362
        break;
26363
 
26364
      case SCEX:
26365
        if (value == null) {
26366
          unsetScex();
26367
        } else {
26368
          setScex((ShoppingCartException)value);
26369
        }
26370
        break;
26371
 
26372
      }
26373
    }
26374
 
26375
    public void setFieldValue(int fieldID, Object value) {
26376
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26377
    }
26378
 
26379
    public Object getFieldValue(_Fields field) {
26380
      switch (field) {
26381
      case SUCCESS:
26382
        return new Boolean(isSuccess());
26383
 
26384
      case SCEX:
26385
        return getScex();
26386
 
26387
      }
26388
      throw new IllegalStateException();
26389
    }
26390
 
26391
    public Object getFieldValue(int fieldId) {
26392
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26393
    }
26394
 
26395
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26396
    public boolean isSet(_Fields field) {
26397
      switch (field) {
26398
      case SUCCESS:
26399
        return isSetSuccess();
26400
      case SCEX:
26401
        return isSetScex();
26402
      }
26403
      throw new IllegalStateException();
26404
    }
26405
 
26406
    public boolean isSet(int fieldID) {
26407
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26408
    }
26409
 
26410
    @Override
26411
    public boolean equals(Object that) {
26412
      if (that == null)
26413
        return false;
688 chandransh 26414
      if (that instanceof checkOut_result)
26415
        return this.equals((checkOut_result)that);
578 chandransh 26416
      return false;
26417
    }
26418
 
688 chandransh 26419
    public boolean equals(checkOut_result that) {
578 chandransh 26420
      if (that == null)
26421
        return false;
26422
 
26423
      boolean this_present_success = true;
26424
      boolean that_present_success = true;
26425
      if (this_present_success || that_present_success) {
26426
        if (!(this_present_success && that_present_success))
26427
          return false;
26428
        if (this.success != that.success)
26429
          return false;
26430
      }
26431
 
26432
      boolean this_present_scex = true && this.isSetScex();
26433
      boolean that_present_scex = true && that.isSetScex();
26434
      if (this_present_scex || that_present_scex) {
26435
        if (!(this_present_scex && that_present_scex))
26436
          return false;
26437
        if (!this.scex.equals(that.scex))
26438
          return false;
26439
      }
26440
 
26441
      return true;
26442
    }
26443
 
26444
    @Override
26445
    public int hashCode() {
26446
      return 0;
26447
    }
26448
 
688 chandransh 26449
    public int compareTo(checkOut_result other) {
578 chandransh 26450
      if (!getClass().equals(other.getClass())) {
26451
        return getClass().getName().compareTo(other.getClass().getName());
26452
      }
26453
 
26454
      int lastComparison = 0;
688 chandransh 26455
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 26456
 
26457
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26458
      if (lastComparison != 0) {
26459
        return lastComparison;
26460
      }
26461
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26462
      if (lastComparison != 0) {
26463
        return lastComparison;
26464
      }
26465
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26466
      if (lastComparison != 0) {
26467
        return lastComparison;
26468
      }
26469
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26470
      if (lastComparison != 0) {
26471
        return lastComparison;
26472
      }
26473
      return 0;
26474
    }
26475
 
26476
    public void read(TProtocol iprot) throws TException {
26477
      TField field;
26478
      iprot.readStructBegin();
26479
      while (true)
26480
      {
26481
        field = iprot.readFieldBegin();
26482
        if (field.type == TType.STOP) { 
26483
          break;
26484
        }
26485
        _Fields fieldId = _Fields.findByThriftId(field.id);
26486
        if (fieldId == null) {
26487
          TProtocolUtil.skip(iprot, field.type);
26488
        } else {
26489
          switch (fieldId) {
26490
            case SUCCESS:
26491
              if (field.type == TType.BOOL) {
26492
                this.success = iprot.readBool();
26493
                setSuccessIsSet(true);
26494
              } else { 
26495
                TProtocolUtil.skip(iprot, field.type);
26496
              }
26497
              break;
26498
            case SCEX:
26499
              if (field.type == TType.STRUCT) {
26500
                this.scex = new ShoppingCartException();
26501
                this.scex.read(iprot);
26502
              } else { 
26503
                TProtocolUtil.skip(iprot, field.type);
26504
              }
26505
              break;
26506
          }
26507
          iprot.readFieldEnd();
26508
        }
26509
      }
26510
      iprot.readStructEnd();
26511
      validate();
26512
    }
26513
 
26514
    public void write(TProtocol oprot) throws TException {
26515
      oprot.writeStructBegin(STRUCT_DESC);
26516
 
26517
      if (this.isSetSuccess()) {
26518
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26519
        oprot.writeBool(this.success);
26520
        oprot.writeFieldEnd();
26521
      } else if (this.isSetScex()) {
26522
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26523
        this.scex.write(oprot);
26524
        oprot.writeFieldEnd();
26525
      }
26526
      oprot.writeFieldStop();
26527
      oprot.writeStructEnd();
26528
    }
26529
 
26530
    @Override
26531
    public String toString() {
688 chandransh 26532
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 26533
      boolean first = true;
26534
 
26535
      sb.append("success:");
26536
      sb.append(this.success);
26537
      first = false;
26538
      if (!first) sb.append(", ");
26539
      sb.append("scex:");
26540
      if (this.scex == null) {
26541
        sb.append("null");
26542
      } else {
26543
        sb.append(this.scex);
26544
      }
26545
      first = false;
26546
      sb.append(")");
26547
      return sb.toString();
26548
    }
26549
 
26550
    public void validate() throws TException {
26551
      // check for required fields
26552
    }
26553
 
26554
  }
26555
 
688 chandransh 26556
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
26557
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 26558
 
688 chandransh 26559
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26560
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 26561
 
688 chandransh 26562
    private long cartId;
708 rajveer 26563
    private Map<Long,Double> items;
553 chandransh 26564
 
26565
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26566
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26567
      CART_ID((short)1, "cartId"),
26568
      ITEMS((short)2, "items");
553 chandransh 26569
 
26570
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26571
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26572
 
26573
      static {
26574
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26575
          byId.put((int)field._thriftId, field);
26576
          byName.put(field.getFieldName(), field);
26577
        }
26578
      }
26579
 
26580
      /**
26581
       * Find the _Fields constant that matches fieldId, or null if its not found.
26582
       */
26583
      public static _Fields findByThriftId(int fieldId) {
26584
        return byId.get(fieldId);
26585
      }
26586
 
26587
      /**
26588
       * Find the _Fields constant that matches fieldId, throwing an exception
26589
       * if it is not found.
26590
       */
26591
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26592
        _Fields fields = findByThriftId(fieldId);
26593
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26594
        return fields;
26595
      }
26596
 
26597
      /**
26598
       * Find the _Fields constant that matches name, or null if its not found.
26599
       */
26600
      public static _Fields findByName(String name) {
26601
        return byName.get(name);
26602
      }
26603
 
26604
      private final short _thriftId;
26605
      private final String _fieldName;
26606
 
26607
      _Fields(short thriftId, String fieldName) {
26608
        _thriftId = thriftId;
26609
        _fieldName = fieldName;
26610
      }
26611
 
26612
      public short getThriftFieldId() {
26613
        return _thriftId;
26614
      }
26615
 
26616
      public String getFieldName() {
26617
        return _fieldName;
26618
      }
26619
    }
26620
 
26621
    // isset id assignments
688 chandransh 26622
    private static final int __CARTID_ISSET_ID = 0;
26623
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 26624
 
26625
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 26626
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 26627
          new FieldValueMetaData(TType.I64)));
688 chandransh 26628
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
26629
          new MapMetaData(TType.MAP, 
26630
              new FieldValueMetaData(TType.I64), 
708 rajveer 26631
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 26632
    }});
26633
 
26634
    static {
688 chandransh 26635
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 26636
    }
26637
 
688 chandransh 26638
    public resetCart_args() {
553 chandransh 26639
    }
26640
 
688 chandransh 26641
    public resetCart_args(
26642
      long cartId,
708 rajveer 26643
      Map<Long,Double> items)
553 chandransh 26644
    {
26645
      this();
688 chandransh 26646
      this.cartId = cartId;
26647
      setCartIdIsSet(true);
26648
      this.items = items;
553 chandransh 26649
    }
26650
 
26651
    /**
26652
     * Performs a deep copy on <i>other</i>.
26653
     */
688 chandransh 26654
    public resetCart_args(resetCart_args other) {
553 chandransh 26655
      __isset_bit_vector.clear();
26656
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 26657
      this.cartId = other.cartId;
26658
      if (other.isSetItems()) {
708 rajveer 26659
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
26660
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 26661
 
26662
          Long other_element_key = other_element.getKey();
708 rajveer 26663
          Double other_element_value = other_element.getValue();
688 chandransh 26664
 
26665
          Long __this__items_copy_key = other_element_key;
26666
 
708 rajveer 26667
          Double __this__items_copy_value = other_element_value;
688 chandransh 26668
 
26669
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
26670
        }
26671
        this.items = __this__items;
26672
      }
553 chandransh 26673
    }
26674
 
688 chandransh 26675
    public resetCart_args deepCopy() {
26676
      return new resetCart_args(this);
553 chandransh 26677
    }
26678
 
26679
    @Deprecated
688 chandransh 26680
    public resetCart_args clone() {
26681
      return new resetCart_args(this);
553 chandransh 26682
    }
26683
 
688 chandransh 26684
    public long getCartId() {
26685
      return this.cartId;
553 chandransh 26686
    }
26687
 
688 chandransh 26688
    public resetCart_args setCartId(long cartId) {
26689
      this.cartId = cartId;
26690
      setCartIdIsSet(true);
48 ashish 26691
      return this;
26692
    }
26693
 
688 chandransh 26694
    public void unsetCartId() {
26695
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26696
    }
26697
 
688 chandransh 26698
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26699
    public boolean isSetCartId() {
26700
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26701
    }
26702
 
688 chandransh 26703
    public void setCartIdIsSet(boolean value) {
26704
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 26705
    }
26706
 
688 chandransh 26707
    public int getItemsSize() {
26708
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 26709
    }
26710
 
708 rajveer 26711
    public void putToItems(long key, double val) {
688 chandransh 26712
      if (this.items == null) {
708 rajveer 26713
        this.items = new HashMap<Long,Double>();
688 chandransh 26714
      }
26715
      this.items.put(key, val);
26716
    }
26717
 
708 rajveer 26718
    public Map<Long,Double> getItems() {
688 chandransh 26719
      return this.items;
26720
    }
26721
 
708 rajveer 26722
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 26723
      this.items = items;
553 chandransh 26724
      return this;
26725
    }
26726
 
688 chandransh 26727
    public void unsetItems() {
26728
      this.items = null;
553 chandransh 26729
    }
26730
 
688 chandransh 26731
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
26732
    public boolean isSetItems() {
26733
      return this.items != null;
553 chandransh 26734
    }
26735
 
688 chandransh 26736
    public void setItemsIsSet(boolean value) {
26737
      if (!value) {
26738
        this.items = null;
26739
      }
553 chandransh 26740
    }
26741
 
26742
    public void setFieldValue(_Fields field, Object value) {
26743
      switch (field) {
688 chandransh 26744
      case CART_ID:
553 chandransh 26745
        if (value == null) {
688 chandransh 26746
          unsetCartId();
553 chandransh 26747
        } else {
688 chandransh 26748
          setCartId((Long)value);
553 chandransh 26749
        }
26750
        break;
26751
 
688 chandransh 26752
      case ITEMS:
553 chandransh 26753
        if (value == null) {
688 chandransh 26754
          unsetItems();
553 chandransh 26755
        } else {
708 rajveer 26756
          setItems((Map<Long,Double>)value);
553 chandransh 26757
        }
26758
        break;
26759
 
26760
      }
26761
    }
26762
 
26763
    public void setFieldValue(int fieldID, Object value) {
26764
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26765
    }
26766
 
26767
    public Object getFieldValue(_Fields field) {
26768
      switch (field) {
688 chandransh 26769
      case CART_ID:
26770
        return new Long(getCartId());
553 chandransh 26771
 
688 chandransh 26772
      case ITEMS:
26773
        return getItems();
553 chandransh 26774
 
26775
      }
26776
      throw new IllegalStateException();
26777
    }
26778
 
26779
    public Object getFieldValue(int fieldId) {
26780
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26781
    }
26782
 
26783
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26784
    public boolean isSet(_Fields field) {
26785
      switch (field) {
688 chandransh 26786
      case CART_ID:
26787
        return isSetCartId();
26788
      case ITEMS:
26789
        return isSetItems();
553 chandransh 26790
      }
26791
      throw new IllegalStateException();
26792
    }
26793
 
26794
    public boolean isSet(int fieldID) {
26795
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26796
    }
26797
 
26798
    @Override
26799
    public boolean equals(Object that) {
26800
      if (that == null)
26801
        return false;
688 chandransh 26802
      if (that instanceof resetCart_args)
26803
        return this.equals((resetCart_args)that);
553 chandransh 26804
      return false;
26805
    }
26806
 
688 chandransh 26807
    public boolean equals(resetCart_args that) {
553 chandransh 26808
      if (that == null)
26809
        return false;
26810
 
688 chandransh 26811
      boolean this_present_cartId = true;
26812
      boolean that_present_cartId = true;
26813
      if (this_present_cartId || that_present_cartId) {
26814
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 26815
          return false;
688 chandransh 26816
        if (this.cartId != that.cartId)
553 chandransh 26817
          return false;
26818
      }
26819
 
688 chandransh 26820
      boolean this_present_items = true && this.isSetItems();
26821
      boolean that_present_items = true && that.isSetItems();
26822
      if (this_present_items || that_present_items) {
26823
        if (!(this_present_items && that_present_items))
553 chandransh 26824
          return false;
688 chandransh 26825
        if (!this.items.equals(that.items))
553 chandransh 26826
          return false;
26827
      }
26828
 
26829
      return true;
26830
    }
26831
 
26832
    @Override
26833
    public int hashCode() {
26834
      return 0;
26835
    }
26836
 
26837
    public void read(TProtocol iprot) throws TException {
26838
      TField field;
26839
      iprot.readStructBegin();
26840
      while (true)
26841
      {
26842
        field = iprot.readFieldBegin();
26843
        if (field.type == TType.STOP) { 
26844
          break;
26845
        }
26846
        _Fields fieldId = _Fields.findByThriftId(field.id);
26847
        if (fieldId == null) {
26848
          TProtocolUtil.skip(iprot, field.type);
26849
        } else {
26850
          switch (fieldId) {
688 chandransh 26851
            case CART_ID:
553 chandransh 26852
              if (field.type == TType.I64) {
688 chandransh 26853
                this.cartId = iprot.readI64();
26854
                setCartIdIsSet(true);
553 chandransh 26855
              } else { 
26856
                TProtocolUtil.skip(iprot, field.type);
26857
              }
26858
              break;
688 chandransh 26859
            case ITEMS:
26860
              if (field.type == TType.MAP) {
26861
                {
771 rajveer 26862
                  TMap _map32 = iprot.readMapBegin();
26863
                  this.items = new HashMap<Long,Double>(2*_map32.size);
26864
                  for (int _i33 = 0; _i33 < _map32.size; ++_i33)
688 chandransh 26865
                  {
771 rajveer 26866
                    long _key34;
26867
                    double _val35;
26868
                    _key34 = iprot.readI64();
26869
                    _val35 = iprot.readDouble();
26870
                    this.items.put(_key34, _val35);
688 chandransh 26871
                  }
26872
                  iprot.readMapEnd();
26873
                }
553 chandransh 26874
              } else { 
26875
                TProtocolUtil.skip(iprot, field.type);
26876
              }
26877
              break;
26878
          }
26879
          iprot.readFieldEnd();
26880
        }
26881
      }
26882
      iprot.readStructEnd();
26883
      validate();
26884
    }
26885
 
26886
    public void write(TProtocol oprot) throws TException {
26887
      validate();
26888
 
26889
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 26890
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26891
      oprot.writeI64(this.cartId);
553 chandransh 26892
      oprot.writeFieldEnd();
688 chandransh 26893
      if (this.items != null) {
26894
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
26895
        {
708 rajveer 26896
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
771 rajveer 26897
          for (Map.Entry<Long, Double> _iter36 : this.items.entrySet())
688 chandransh 26898
          {
771 rajveer 26899
            oprot.writeI64(_iter36.getKey());
26900
            oprot.writeDouble(_iter36.getValue());
688 chandransh 26901
          }
26902
          oprot.writeMapEnd();
26903
        }
26904
        oprot.writeFieldEnd();
26905
      }
553 chandransh 26906
      oprot.writeFieldStop();
26907
      oprot.writeStructEnd();
26908
    }
26909
 
26910
    @Override
26911
    public String toString() {
688 chandransh 26912
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 26913
      boolean first = true;
26914
 
688 chandransh 26915
      sb.append("cartId:");
26916
      sb.append(this.cartId);
553 chandransh 26917
      first = false;
26918
      if (!first) sb.append(", ");
688 chandransh 26919
      sb.append("items:");
26920
      if (this.items == null) {
26921
        sb.append("null");
26922
      } else {
26923
        sb.append(this.items);
26924
      }
553 chandransh 26925
      first = false;
26926
      sb.append(")");
26927
      return sb.toString();
26928
    }
26929
 
26930
    public void validate() throws TException {
26931
      // check for required fields
26932
    }
26933
 
26934
  }
26935
 
688 chandransh 26936
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
26937
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 26938
 
688 chandransh 26939
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
26940
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 26941
 
688 chandransh 26942
    private boolean success;
26943
    private ShoppingCartException scex;
553 chandransh 26944
 
26945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26946
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26947
      SUCCESS((short)0, "success"),
26948
      SCEX((short)1, "scex");
553 chandransh 26949
 
26950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26952
 
26953
      static {
26954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26955
          byId.put((int)field._thriftId, field);
26956
          byName.put(field.getFieldName(), field);
26957
        }
26958
      }
26959
 
26960
      /**
26961
       * Find the _Fields constant that matches fieldId, or null if its not found.
26962
       */
26963
      public static _Fields findByThriftId(int fieldId) {
26964
        return byId.get(fieldId);
26965
      }
26966
 
26967
      /**
26968
       * Find the _Fields constant that matches fieldId, throwing an exception
26969
       * if it is not found.
26970
       */
26971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26972
        _Fields fields = findByThriftId(fieldId);
26973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26974
        return fields;
26975
      }
26976
 
26977
      /**
26978
       * Find the _Fields constant that matches name, or null if its not found.
26979
       */
26980
      public static _Fields findByName(String name) {
26981
        return byName.get(name);
26982
      }
26983
 
26984
      private final short _thriftId;
26985
      private final String _fieldName;
26986
 
26987
      _Fields(short thriftId, String fieldName) {
26988
        _thriftId = thriftId;
26989
        _fieldName = fieldName;
26990
      }
26991
 
26992
      public short getThriftFieldId() {
26993
        return _thriftId;
26994
      }
26995
 
26996
      public String getFieldName() {
26997
        return _fieldName;
26998
      }
26999
    }
688 chandransh 27000
 
27001
    // isset id assignments
27002
    private static final int __SUCCESS_ISSET_ID = 0;
27003
    private BitSet __isset_bit_vector = new BitSet(1);
27004
 
553 chandransh 27005
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 27006
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27007
          new FieldValueMetaData(TType.BOOL)));
27008
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
27009
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 27010
    }});
27011
 
27012
    static {
688 chandransh 27013
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 27014
    }
27015
 
688 chandransh 27016
    public resetCart_result() {
553 chandransh 27017
    }
27018
 
688 chandransh 27019
    public resetCart_result(
27020
      boolean success,
27021
      ShoppingCartException scex)
27022
    {
27023
      this();
27024
      this.success = success;
27025
      setSuccessIsSet(true);
27026
      this.scex = scex;
27027
    }
27028
 
553 chandransh 27029
    /**
27030
     * Performs a deep copy on <i>other</i>.
27031
     */
688 chandransh 27032
    public resetCart_result(resetCart_result other) {
27033
      __isset_bit_vector.clear();
27034
      __isset_bit_vector.or(other.__isset_bit_vector);
27035
      this.success = other.success;
27036
      if (other.isSetScex()) {
27037
        this.scex = new ShoppingCartException(other.scex);
27038
      }
553 chandransh 27039
    }
27040
 
688 chandransh 27041
    public resetCart_result deepCopy() {
27042
      return new resetCart_result(this);
553 chandransh 27043
    }
27044
 
27045
    @Deprecated
688 chandransh 27046
    public resetCart_result clone() {
27047
      return new resetCart_result(this);
553 chandransh 27048
    }
27049
 
688 chandransh 27050
    public boolean isSuccess() {
27051
      return this.success;
27052
    }
27053
 
27054
    public resetCart_result setSuccess(boolean success) {
27055
      this.success = success;
27056
      setSuccessIsSet(true);
27057
      return this;
27058
    }
27059
 
27060
    public void unsetSuccess() {
27061
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27062
    }
27063
 
27064
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27065
    public boolean isSetSuccess() {
27066
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27067
    }
27068
 
27069
    public void setSuccessIsSet(boolean value) {
27070
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27071
    }
27072
 
27073
    public ShoppingCartException getScex() {
27074
      return this.scex;
27075
    }
27076
 
27077
    public resetCart_result setScex(ShoppingCartException scex) {
27078
      this.scex = scex;
27079
      return this;
27080
    }
27081
 
27082
    public void unsetScex() {
27083
      this.scex = null;
27084
    }
27085
 
27086
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
27087
    public boolean isSetScex() {
27088
      return this.scex != null;
27089
    }
27090
 
27091
    public void setScexIsSet(boolean value) {
27092
      if (!value) {
27093
        this.scex = null;
27094
      }
27095
    }
27096
 
553 chandransh 27097
    public void setFieldValue(_Fields field, Object value) {
27098
      switch (field) {
688 chandransh 27099
      case SUCCESS:
27100
        if (value == null) {
27101
          unsetSuccess();
27102
        } else {
27103
          setSuccess((Boolean)value);
27104
        }
27105
        break;
27106
 
27107
      case SCEX:
27108
        if (value == null) {
27109
          unsetScex();
27110
        } else {
27111
          setScex((ShoppingCartException)value);
27112
        }
27113
        break;
27114
 
553 chandransh 27115
      }
27116
    }
27117
 
27118
    public void setFieldValue(int fieldID, Object value) {
27119
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27120
    }
27121
 
27122
    public Object getFieldValue(_Fields field) {
27123
      switch (field) {
688 chandransh 27124
      case SUCCESS:
27125
        return new Boolean(isSuccess());
27126
 
27127
      case SCEX:
27128
        return getScex();
27129
 
553 chandransh 27130
      }
27131
      throw new IllegalStateException();
27132
    }
27133
 
27134
    public Object getFieldValue(int fieldId) {
27135
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27136
    }
27137
 
27138
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27139
    public boolean isSet(_Fields field) {
27140
      switch (field) {
688 chandransh 27141
      case SUCCESS:
27142
        return isSetSuccess();
27143
      case SCEX:
27144
        return isSetScex();
553 chandransh 27145
      }
27146
      throw new IllegalStateException();
27147
    }
27148
 
27149
    public boolean isSet(int fieldID) {
27150
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27151
    }
27152
 
27153
    @Override
27154
    public boolean equals(Object that) {
27155
      if (that == null)
27156
        return false;
688 chandransh 27157
      if (that instanceof resetCart_result)
27158
        return this.equals((resetCart_result)that);
553 chandransh 27159
      return false;
27160
    }
27161
 
688 chandransh 27162
    public boolean equals(resetCart_result that) {
553 chandransh 27163
      if (that == null)
27164
        return false;
27165
 
688 chandransh 27166
      boolean this_present_success = true;
27167
      boolean that_present_success = true;
27168
      if (this_present_success || that_present_success) {
27169
        if (!(this_present_success && that_present_success))
27170
          return false;
27171
        if (this.success != that.success)
27172
          return false;
27173
      }
27174
 
27175
      boolean this_present_scex = true && this.isSetScex();
27176
      boolean that_present_scex = true && that.isSetScex();
27177
      if (this_present_scex || that_present_scex) {
27178
        if (!(this_present_scex && that_present_scex))
27179
          return false;
27180
        if (!this.scex.equals(that.scex))
27181
          return false;
27182
      }
27183
 
553 chandransh 27184
      return true;
27185
    }
27186
 
27187
    @Override
27188
    public int hashCode() {
27189
      return 0;
27190
    }
27191
 
688 chandransh 27192
    public int compareTo(resetCart_result other) {
553 chandransh 27193
      if (!getClass().equals(other.getClass())) {
27194
        return getClass().getName().compareTo(other.getClass().getName());
27195
      }
27196
 
27197
      int lastComparison = 0;
688 chandransh 27198
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 27199
 
688 chandransh 27200
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27201
      if (lastComparison != 0) {
27202
        return lastComparison;
27203
      }
27204
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27205
      if (lastComparison != 0) {
27206
        return lastComparison;
27207
      }
27208
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
27209
      if (lastComparison != 0) {
27210
        return lastComparison;
27211
      }
27212
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
27213
      if (lastComparison != 0) {
27214
        return lastComparison;
27215
      }
553 chandransh 27216
      return 0;
27217
    }
27218
 
27219
    public void read(TProtocol iprot) throws TException {
27220
      TField field;
27221
      iprot.readStructBegin();
27222
      while (true)
27223
      {
27224
        field = iprot.readFieldBegin();
27225
        if (field.type == TType.STOP) { 
27226
          break;
27227
        }
27228
        _Fields fieldId = _Fields.findByThriftId(field.id);
27229
        if (fieldId == null) {
27230
          TProtocolUtil.skip(iprot, field.type);
27231
        } else {
27232
          switch (fieldId) {
688 chandransh 27233
            case SUCCESS:
27234
              if (field.type == TType.BOOL) {
27235
                this.success = iprot.readBool();
27236
                setSuccessIsSet(true);
27237
              } else { 
27238
                TProtocolUtil.skip(iprot, field.type);
27239
              }
27240
              break;
27241
            case SCEX:
27242
              if (field.type == TType.STRUCT) {
27243
                this.scex = new ShoppingCartException();
27244
                this.scex.read(iprot);
27245
              } else { 
27246
                TProtocolUtil.skip(iprot, field.type);
27247
              }
27248
              break;
553 chandransh 27249
          }
27250
          iprot.readFieldEnd();
27251
        }
27252
      }
27253
      iprot.readStructEnd();
27254
      validate();
27255
    }
27256
 
27257
    public void write(TProtocol oprot) throws TException {
27258
      oprot.writeStructBegin(STRUCT_DESC);
27259
 
688 chandransh 27260
      if (this.isSetSuccess()) {
27261
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27262
        oprot.writeBool(this.success);
27263
        oprot.writeFieldEnd();
27264
      } else if (this.isSetScex()) {
27265
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
27266
        this.scex.write(oprot);
27267
        oprot.writeFieldEnd();
27268
      }
553 chandransh 27269
      oprot.writeFieldStop();
27270
      oprot.writeStructEnd();
27271
    }
27272
 
27273
    @Override
27274
    public String toString() {
688 chandransh 27275
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 27276
      boolean first = true;
27277
 
688 chandransh 27278
      sb.append("success:");
27279
      sb.append(this.success);
27280
      first = false;
27281
      if (!first) sb.append(", ");
27282
      sb.append("scex:");
27283
      if (this.scex == null) {
27284
        sb.append("null");
27285
      } else {
27286
        sb.append(this.scex);
27287
      }
27288
      first = false;
553 chandransh 27289
      sb.append(")");
27290
      return sb.toString();
27291
    }
27292
 
27293
    public void validate() throws TException {
27294
      // check for required fields
27295
    }
27296
 
27297
  }
27298
 
771 rajveer 27299
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
27300
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
553 chandransh 27301
 
771 rajveer 27302
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 27303
 
27304
    private long userId;
27305
 
27306
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27307
    public enum _Fields implements TFieldIdEnum {
771 rajveer 27308
      USER_ID((short)1, "userId");
553 chandransh 27309
 
27310
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27311
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27312
 
27313
      static {
27314
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27315
          byId.put((int)field._thriftId, field);
27316
          byName.put(field.getFieldName(), field);
27317
        }
27318
      }
27319
 
27320
      /**
27321
       * Find the _Fields constant that matches fieldId, or null if its not found.
27322
       */
27323
      public static _Fields findByThriftId(int fieldId) {
27324
        return byId.get(fieldId);
27325
      }
27326
 
27327
      /**
27328
       * Find the _Fields constant that matches fieldId, throwing an exception
27329
       * if it is not found.
27330
       */
27331
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27332
        _Fields fields = findByThriftId(fieldId);
27333
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27334
        return fields;
27335
      }
27336
 
27337
      /**
27338
       * Find the _Fields constant that matches name, or null if its not found.
27339
       */
27340
      public static _Fields findByName(String name) {
27341
        return byName.get(name);
27342
      }
27343
 
27344
      private final short _thriftId;
27345
      private final String _fieldName;
27346
 
27347
      _Fields(short thriftId, String fieldName) {
27348
        _thriftId = thriftId;
27349
        _fieldName = fieldName;
27350
      }
27351
 
27352
      public short getThriftFieldId() {
27353
        return _thriftId;
27354
      }
27355
 
27356
      public String getFieldName() {
27357
        return _fieldName;
27358
      }
27359
    }
27360
 
27361
    // isset id assignments
27362
    private static final int __USERID_ISSET_ID = 0;
771 rajveer 27363
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 27364
 
27365
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27366
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
27367
          new FieldValueMetaData(TType.I64)));
27368
    }});
27369
 
27370
    static {
771 rajveer 27371
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
553 chandransh 27372
    }
27373
 
771 rajveer 27374
    public getMyResearch_args() {
553 chandransh 27375
    }
27376
 
771 rajveer 27377
    public getMyResearch_args(
27378
      long userId)
553 chandransh 27379
    {
27380
      this();
27381
      this.userId = userId;
27382
      setUserIdIsSet(true);
27383
    }
27384
 
27385
    /**
27386
     * Performs a deep copy on <i>other</i>.
27387
     */
771 rajveer 27388
    public getMyResearch_args(getMyResearch_args other) {
553 chandransh 27389
      __isset_bit_vector.clear();
27390
      __isset_bit_vector.or(other.__isset_bit_vector);
27391
      this.userId = other.userId;
27392
    }
27393
 
771 rajveer 27394
    public getMyResearch_args deepCopy() {
27395
      return new getMyResearch_args(this);
553 chandransh 27396
    }
27397
 
27398
    @Deprecated
771 rajveer 27399
    public getMyResearch_args clone() {
27400
      return new getMyResearch_args(this);
553 chandransh 27401
    }
27402
 
27403
    public long getUserId() {
27404
      return this.userId;
27405
    }
27406
 
771 rajveer 27407
    public getMyResearch_args setUserId(long userId) {
553 chandransh 27408
      this.userId = userId;
27409
      setUserIdIsSet(true);
27410
      return this;
27411
    }
27412
 
27413
    public void unsetUserId() {
27414
      __isset_bit_vector.clear(__USERID_ISSET_ID);
27415
    }
27416
 
27417
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
27418
    public boolean isSetUserId() {
27419
      return __isset_bit_vector.get(__USERID_ISSET_ID);
27420
    }
27421
 
27422
    public void setUserIdIsSet(boolean value) {
27423
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
27424
    }
27425
 
48 ashish 27426
    public void setFieldValue(_Fields field, Object value) {
27427
      switch (field) {
553 chandransh 27428
      case USER_ID:
48 ashish 27429
        if (value == null) {
553 chandransh 27430
          unsetUserId();
48 ashish 27431
        } else {
553 chandransh 27432
          setUserId((Long)value);
48 ashish 27433
        }
27434
        break;
27435
 
27436
      }
27437
    }
27438
 
27439
    public void setFieldValue(int fieldID, Object value) {
27440
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27441
    }
27442
 
27443
    public Object getFieldValue(_Fields field) {
27444
      switch (field) {
553 chandransh 27445
      case USER_ID:
27446
        return new Long(getUserId());
48 ashish 27447
 
27448
      }
27449
      throw new IllegalStateException();
27450
    }
27451
 
27452
    public Object getFieldValue(int fieldId) {
27453
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27454
    }
27455
 
27456
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27457
    public boolean isSet(_Fields field) {
27458
      switch (field) {
553 chandransh 27459
      case USER_ID:
27460
        return isSetUserId();
48 ashish 27461
      }
27462
      throw new IllegalStateException();
27463
    }
27464
 
27465
    public boolean isSet(int fieldID) {
27466
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27467
    }
27468
 
27469
    @Override
27470
    public boolean equals(Object that) {
27471
      if (that == null)
27472
        return false;
771 rajveer 27473
      if (that instanceof getMyResearch_args)
27474
        return this.equals((getMyResearch_args)that);
48 ashish 27475
      return false;
27476
    }
27477
 
771 rajveer 27478
    public boolean equals(getMyResearch_args that) {
48 ashish 27479
      if (that == null)
27480
        return false;
27481
 
553 chandransh 27482
      boolean this_present_userId = true;
27483
      boolean that_present_userId = true;
27484
      if (this_present_userId || that_present_userId) {
27485
        if (!(this_present_userId && that_present_userId))
48 ashish 27486
          return false;
553 chandransh 27487
        if (this.userId != that.userId)
48 ashish 27488
          return false;
27489
      }
27490
 
27491
      return true;
27492
    }
27493
 
27494
    @Override
27495
    public int hashCode() {
27496
      return 0;
27497
    }
27498
 
771 rajveer 27499
    public int compareTo(getMyResearch_args other) {
48 ashish 27500
      if (!getClass().equals(other.getClass())) {
27501
        return getClass().getName().compareTo(other.getClass().getName());
27502
      }
27503
 
27504
      int lastComparison = 0;
771 rajveer 27505
      getMyResearch_args typedOther = (getMyResearch_args)other;
48 ashish 27506
 
553 chandransh 27507
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 27508
      if (lastComparison != 0) {
27509
        return lastComparison;
27510
      }
553 chandransh 27511
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 27512
      if (lastComparison != 0) {
27513
        return lastComparison;
27514
      }
27515
      return 0;
27516
    }
27517
 
27518
    public void read(TProtocol iprot) throws TException {
27519
      TField field;
27520
      iprot.readStructBegin();
27521
      while (true)
27522
      {
27523
        field = iprot.readFieldBegin();
27524
        if (field.type == TType.STOP) { 
27525
          break;
27526
        }
27527
        _Fields fieldId = _Fields.findByThriftId(field.id);
27528
        if (fieldId == null) {
27529
          TProtocolUtil.skip(iprot, field.type);
27530
        } else {
27531
          switch (fieldId) {
553 chandransh 27532
            case USER_ID:
27533
              if (field.type == TType.I64) {
27534
                this.userId = iprot.readI64();
27535
                setUserIdIsSet(true);
48 ashish 27536
              } else { 
27537
                TProtocolUtil.skip(iprot, field.type);
27538
              }
27539
              break;
27540
          }
27541
          iprot.readFieldEnd();
27542
        }
27543
      }
27544
      iprot.readStructEnd();
27545
      validate();
27546
    }
27547
 
27548
    public void write(TProtocol oprot) throws TException {
27549
      validate();
27550
 
27551
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27552
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
27553
      oprot.writeI64(this.userId);
27554
      oprot.writeFieldEnd();
27555
      oprot.writeFieldStop();
27556
      oprot.writeStructEnd();
27557
    }
27558
 
27559
    @Override
27560
    public String toString() {
771 rajveer 27561
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
553 chandransh 27562
      boolean first = true;
27563
 
27564
      sb.append("userId:");
27565
      sb.append(this.userId);
27566
      first = false;
27567
      sb.append(")");
27568
      return sb.toString();
27569
    }
27570
 
27571
    public void validate() throws TException {
27572
      // check for required fields
27573
    }
27574
 
27575
  }
27576
 
27577
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
27578
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
27579
 
27580
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
27581
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27582
 
27583
    private Widget success;
27584
    private WidgetException scx;
27585
 
27586
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27587
    public enum _Fields implements TFieldIdEnum {
27588
      SUCCESS((short)0, "success"),
27589
      SCX((short)1, "scx");
27590
 
27591
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27592
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27593
 
27594
      static {
27595
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27596
          byId.put((int)field._thriftId, field);
27597
          byName.put(field.getFieldName(), field);
27598
        }
27599
      }
27600
 
27601
      /**
27602
       * Find the _Fields constant that matches fieldId, or null if its not found.
27603
       */
27604
      public static _Fields findByThriftId(int fieldId) {
27605
        return byId.get(fieldId);
27606
      }
27607
 
27608
      /**
27609
       * Find the _Fields constant that matches fieldId, throwing an exception
27610
       * if it is not found.
27611
       */
27612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27613
        _Fields fields = findByThriftId(fieldId);
27614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27615
        return fields;
27616
      }
27617
 
27618
      /**
27619
       * Find the _Fields constant that matches name, or null if its not found.
27620
       */
27621
      public static _Fields findByName(String name) {
27622
        return byName.get(name);
27623
      }
27624
 
27625
      private final short _thriftId;
27626
      private final String _fieldName;
27627
 
27628
      _Fields(short thriftId, String fieldName) {
27629
        _thriftId = thriftId;
27630
        _fieldName = fieldName;
27631
      }
27632
 
27633
      public short getThriftFieldId() {
27634
        return _thriftId;
27635
      }
27636
 
27637
      public String getFieldName() {
27638
        return _fieldName;
27639
      }
27640
    }
27641
 
27642
    // isset id assignments
27643
 
27644
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 27645
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 27646
          new StructMetaData(TType.STRUCT, Widget.class)));
27647
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 27648
          new FieldValueMetaData(TType.STRUCT)));
27649
    }});
27650
 
27651
    static {
553 chandransh 27652
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 27653
    }
27654
 
553 chandransh 27655
    public getMyResearch_result() {
48 ashish 27656
    }
27657
 
553 chandransh 27658
    public getMyResearch_result(
27659
      Widget success,
27660
      WidgetException scx)
48 ashish 27661
    {
27662
      this();
27663
      this.success = success;
553 chandransh 27664
      this.scx = scx;
48 ashish 27665
    }
27666
 
27667
    /**
27668
     * Performs a deep copy on <i>other</i>.
27669
     */
553 chandransh 27670
    public getMyResearch_result(getMyResearch_result other) {
27671
      if (other.isSetSuccess()) {
27672
        this.success = new Widget(other.success);
48 ashish 27673
      }
553 chandransh 27674
      if (other.isSetScx()) {
27675
        this.scx = new WidgetException(other.scx);
27676
      }
48 ashish 27677
    }
27678
 
553 chandransh 27679
    public getMyResearch_result deepCopy() {
27680
      return new getMyResearch_result(this);
48 ashish 27681
    }
27682
 
27683
    @Deprecated
553 chandransh 27684
    public getMyResearch_result clone() {
27685
      return new getMyResearch_result(this);
48 ashish 27686
    }
27687
 
553 chandransh 27688
    public Widget getSuccess() {
48 ashish 27689
      return this.success;
27690
    }
27691
 
553 chandransh 27692
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 27693
      this.success = success;
27694
      return this;
27695
    }
27696
 
27697
    public void unsetSuccess() {
553 chandransh 27698
      this.success = null;
48 ashish 27699
    }
27700
 
27701
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27702
    public boolean isSetSuccess() {
553 chandransh 27703
      return this.success != null;
48 ashish 27704
    }
27705
 
27706
    public void setSuccessIsSet(boolean value) {
553 chandransh 27707
      if (!value) {
27708
        this.success = null;
27709
      }
48 ashish 27710
    }
27711
 
553 chandransh 27712
    public WidgetException getScx() {
27713
      return this.scx;
48 ashish 27714
    }
27715
 
553 chandransh 27716
    public getMyResearch_result setScx(WidgetException scx) {
27717
      this.scx = scx;
48 ashish 27718
      return this;
27719
    }
27720
 
553 chandransh 27721
    public void unsetScx() {
27722
      this.scx = null;
48 ashish 27723
    }
27724
 
553 chandransh 27725
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27726
    public boolean isSetScx() {
27727
      return this.scx != null;
48 ashish 27728
    }
27729
 
553 chandransh 27730
    public void setScxIsSet(boolean value) {
48 ashish 27731
      if (!value) {
553 chandransh 27732
        this.scx = null;
48 ashish 27733
      }
27734
    }
27735
 
27736
    public void setFieldValue(_Fields field, Object value) {
27737
      switch (field) {
27738
      case SUCCESS:
27739
        if (value == null) {
27740
          unsetSuccess();
27741
        } else {
553 chandransh 27742
          setSuccess((Widget)value);
48 ashish 27743
        }
27744
        break;
27745
 
553 chandransh 27746
      case SCX:
48 ashish 27747
        if (value == null) {
553 chandransh 27748
          unsetScx();
48 ashish 27749
        } else {
553 chandransh 27750
          setScx((WidgetException)value);
48 ashish 27751
        }
27752
        break;
27753
 
27754
      }
27755
    }
27756
 
27757
    public void setFieldValue(int fieldID, Object value) {
27758
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27759
    }
27760
 
27761
    public Object getFieldValue(_Fields field) {
27762
      switch (field) {
27763
      case SUCCESS:
553 chandransh 27764
        return getSuccess();
48 ashish 27765
 
553 chandransh 27766
      case SCX:
27767
        return getScx();
48 ashish 27768
 
27769
      }
27770
      throw new IllegalStateException();
27771
    }
27772
 
27773
    public Object getFieldValue(int fieldId) {
27774
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27775
    }
27776
 
27777
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27778
    public boolean isSet(_Fields field) {
27779
      switch (field) {
27780
      case SUCCESS:
27781
        return isSetSuccess();
553 chandransh 27782
      case SCX:
27783
        return isSetScx();
48 ashish 27784
      }
27785
      throw new IllegalStateException();
27786
    }
27787
 
27788
    public boolean isSet(int fieldID) {
27789
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27790
    }
27791
 
27792
    @Override
27793
    public boolean equals(Object that) {
27794
      if (that == null)
27795
        return false;
553 chandransh 27796
      if (that instanceof getMyResearch_result)
27797
        return this.equals((getMyResearch_result)that);
48 ashish 27798
      return false;
27799
    }
27800
 
553 chandransh 27801
    public boolean equals(getMyResearch_result that) {
48 ashish 27802
      if (that == null)
27803
        return false;
27804
 
553 chandransh 27805
      boolean this_present_success = true && this.isSetSuccess();
27806
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 27807
      if (this_present_success || that_present_success) {
27808
        if (!(this_present_success && that_present_success))
27809
          return false;
553 chandransh 27810
        if (!this.success.equals(that.success))
48 ashish 27811
          return false;
27812
      }
27813
 
553 chandransh 27814
      boolean this_present_scx = true && this.isSetScx();
27815
      boolean that_present_scx = true && that.isSetScx();
27816
      if (this_present_scx || that_present_scx) {
27817
        if (!(this_present_scx && that_present_scx))
48 ashish 27818
          return false;
553 chandransh 27819
        if (!this.scx.equals(that.scx))
48 ashish 27820
          return false;
27821
      }
27822
 
27823
      return true;
27824
    }
27825
 
27826
    @Override
27827
    public int hashCode() {
27828
      return 0;
27829
    }
27830
 
553 chandransh 27831
    public int compareTo(getMyResearch_result other) {
48 ashish 27832
      if (!getClass().equals(other.getClass())) {
27833
        return getClass().getName().compareTo(other.getClass().getName());
27834
      }
27835
 
27836
      int lastComparison = 0;
553 chandransh 27837
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 27838
 
27839
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27840
      if (lastComparison != 0) {
27841
        return lastComparison;
27842
      }
27843
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27844
      if (lastComparison != 0) {
27845
        return lastComparison;
27846
      }
553 chandransh 27847
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 27848
      if (lastComparison != 0) {
27849
        return lastComparison;
27850
      }
553 chandransh 27851
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 27852
      if (lastComparison != 0) {
27853
        return lastComparison;
27854
      }
27855
      return 0;
27856
    }
27857
 
27858
    public void read(TProtocol iprot) throws TException {
27859
      TField field;
27860
      iprot.readStructBegin();
27861
      while (true)
27862
      {
27863
        field = iprot.readFieldBegin();
27864
        if (field.type == TType.STOP) { 
27865
          break;
27866
        }
27867
        _Fields fieldId = _Fields.findByThriftId(field.id);
27868
        if (fieldId == null) {
27869
          TProtocolUtil.skip(iprot, field.type);
27870
        } else {
27871
          switch (fieldId) {
27872
            case SUCCESS:
553 chandransh 27873
              if (field.type == TType.STRUCT) {
27874
                this.success = new Widget();
27875
                this.success.read(iprot);
48 ashish 27876
              } else { 
27877
                TProtocolUtil.skip(iprot, field.type);
27878
              }
27879
              break;
553 chandransh 27880
            case SCX:
48 ashish 27881
              if (field.type == TType.STRUCT) {
553 chandransh 27882
                this.scx = new WidgetException();
27883
                this.scx.read(iprot);
48 ashish 27884
              } else { 
27885
                TProtocolUtil.skip(iprot, field.type);
27886
              }
27887
              break;
27888
          }
27889
          iprot.readFieldEnd();
27890
        }
27891
      }
27892
      iprot.readStructEnd();
27893
      validate();
27894
    }
27895
 
27896
    public void write(TProtocol oprot) throws TException {
27897
      oprot.writeStructBegin(STRUCT_DESC);
27898
 
27899
      if (this.isSetSuccess()) {
27900
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 27901
        this.success.write(oprot);
48 ashish 27902
        oprot.writeFieldEnd();
553 chandransh 27903
      } else if (this.isSetScx()) {
27904
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27905
        this.scx.write(oprot);
48 ashish 27906
        oprot.writeFieldEnd();
27907
      }
27908
      oprot.writeFieldStop();
27909
      oprot.writeStructEnd();
27910
    }
27911
 
27912
    @Override
27913
    public String toString() {
553 chandransh 27914
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 27915
      boolean first = true;
27916
 
27917
      sb.append("success:");
553 chandransh 27918
      if (this.success == null) {
27919
        sb.append("null");
27920
      } else {
27921
        sb.append(this.success);
27922
      }
48 ashish 27923
      first = false;
27924
      if (!first) sb.append(", ");
553 chandransh 27925
      sb.append("scx:");
27926
      if (this.scx == null) {
48 ashish 27927
        sb.append("null");
27928
      } else {
553 chandransh 27929
        sb.append(this.scx);
48 ashish 27930
      }
27931
      first = false;
27932
      sb.append(")");
27933
      return sb.toString();
27934
    }
27935
 
27936
    public void validate() throws TException {
27937
      // check for required fields
27938
    }
27939
 
27940
  }
27941
 
553 chandransh 27942
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
27943
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 27944
 
771 rajveer 27945
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
27946
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 27947
 
771 rajveer 27948
    private long userId;
27949
    private long itemId;
130 ashish 27950
 
27951
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27952
    public enum _Fields implements TFieldIdEnum {
771 rajveer 27953
      USER_ID((short)1, "userId"),
27954
      ITEM_ID((short)2, "itemId");
130 ashish 27955
 
27956
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27957
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27958
 
27959
      static {
27960
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27961
          byId.put((int)field._thriftId, field);
27962
          byName.put(field.getFieldName(), field);
27963
        }
27964
      }
27965
 
27966
      /**
27967
       * Find the _Fields constant that matches fieldId, or null if its not found.
27968
       */
27969
      public static _Fields findByThriftId(int fieldId) {
27970
        return byId.get(fieldId);
27971
      }
27972
 
27973
      /**
27974
       * Find the _Fields constant that matches fieldId, throwing an exception
27975
       * if it is not found.
27976
       */
27977
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27978
        _Fields fields = findByThriftId(fieldId);
27979
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27980
        return fields;
27981
      }
27982
 
27983
      /**
27984
       * Find the _Fields constant that matches name, or null if its not found.
27985
       */
27986
      public static _Fields findByName(String name) {
27987
        return byName.get(name);
27988
      }
27989
 
27990
      private final short _thriftId;
27991
      private final String _fieldName;
27992
 
27993
      _Fields(short thriftId, String fieldName) {
27994
        _thriftId = thriftId;
27995
        _fieldName = fieldName;
27996
      }
27997
 
27998
      public short getThriftFieldId() {
27999
        return _thriftId;
28000
      }
28001
 
28002
      public String getFieldName() {
28003
        return _fieldName;
28004
      }
28005
    }
28006
 
28007
    // isset id assignments
771 rajveer 28008
    private static final int __USERID_ISSET_ID = 0;
28009
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 28010
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 28011
 
28012
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 28013
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
130 ashish 28014
          new FieldValueMetaData(TType.I64)));
771 rajveer 28015
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 28016
          new FieldValueMetaData(TType.I64)));
130 ashish 28017
    }});
28018
 
28019
    static {
553 chandransh 28020
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 28021
    }
28022
 
553 chandransh 28023
    public updateMyResearch_args() {
130 ashish 28024
    }
28025
 
553 chandransh 28026
    public updateMyResearch_args(
771 rajveer 28027
      long userId,
28028
      long itemId)
130 ashish 28029
    {
28030
      this();
771 rajveer 28031
      this.userId = userId;
28032
      setUserIdIsSet(true);
28033
      this.itemId = itemId;
28034
      setItemIdIsSet(true);
130 ashish 28035
    }
28036
 
28037
    /**
28038
     * Performs a deep copy on <i>other</i>.
28039
     */
553 chandransh 28040
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 28041
      __isset_bit_vector.clear();
28042
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 28043
      this.userId = other.userId;
28044
      this.itemId = other.itemId;
130 ashish 28045
    }
28046
 
553 chandransh 28047
    public updateMyResearch_args deepCopy() {
28048
      return new updateMyResearch_args(this);
130 ashish 28049
    }
28050
 
28051
    @Deprecated
553 chandransh 28052
    public updateMyResearch_args clone() {
28053
      return new updateMyResearch_args(this);
130 ashish 28054
    }
28055
 
771 rajveer 28056
    public long getUserId() {
28057
      return this.userId;
130 ashish 28058
    }
28059
 
771 rajveer 28060
    public updateMyResearch_args setUserId(long userId) {
28061
      this.userId = userId;
28062
      setUserIdIsSet(true);
130 ashish 28063
      return this;
28064
    }
28065
 
771 rajveer 28066
    public void unsetUserId() {
28067
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 28068
    }
28069
 
771 rajveer 28070
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
28071
    public boolean isSetUserId() {
28072
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 28073
    }
28074
 
771 rajveer 28075
    public void setUserIdIsSet(boolean value) {
28076
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 28077
    }
28078
 
771 rajveer 28079
    public long getItemId() {
28080
      return this.itemId;
553 chandransh 28081
    }
28082
 
771 rajveer 28083
    public updateMyResearch_args setItemId(long itemId) {
28084
      this.itemId = itemId;
28085
      setItemIdIsSet(true);
553 chandransh 28086
      return this;
28087
    }
28088
 
771 rajveer 28089
    public void unsetItemId() {
28090
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 28091
    }
28092
 
771 rajveer 28093
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
28094
    public boolean isSetItemId() {
28095
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 28096
    }
28097
 
771 rajveer 28098
    public void setItemIdIsSet(boolean value) {
28099
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 28100
    }
28101
 
130 ashish 28102
    public void setFieldValue(_Fields field, Object value) {
28103
      switch (field) {
553 chandransh 28104
      case USER_ID:
130 ashish 28105
        if (value == null) {
771 rajveer 28106
          unsetUserId();
130 ashish 28107
        } else {
771 rajveer 28108
          setUserId((Long)value);
130 ashish 28109
        }
28110
        break;
28111
 
553 chandransh 28112
      case ITEM_ID:
28113
        if (value == null) {
771 rajveer 28114
          unsetItemId();
553 chandransh 28115
        } else {
771 rajveer 28116
          setItemId((Long)value);
553 chandransh 28117
        }
28118
        break;
28119
 
130 ashish 28120
      }
28121
    }
28122
 
28123
    public void setFieldValue(int fieldID, Object value) {
28124
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28125
    }
28126
 
28127
    public Object getFieldValue(_Fields field) {
28128
      switch (field) {
553 chandransh 28129
      case USER_ID:
771 rajveer 28130
        return new Long(getUserId());
130 ashish 28131
 
553 chandransh 28132
      case ITEM_ID:
771 rajveer 28133
        return new Long(getItemId());
553 chandransh 28134
 
130 ashish 28135
      }
28136
      throw new IllegalStateException();
28137
    }
28138
 
28139
    public Object getFieldValue(int fieldId) {
28140
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28141
    }
28142
 
28143
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28144
    public boolean isSet(_Fields field) {
28145
      switch (field) {
553 chandransh 28146
      case USER_ID:
771 rajveer 28147
        return isSetUserId();
553 chandransh 28148
      case ITEM_ID:
771 rajveer 28149
        return isSetItemId();
130 ashish 28150
      }
28151
      throw new IllegalStateException();
28152
    }
28153
 
28154
    public boolean isSet(int fieldID) {
28155
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28156
    }
28157
 
28158
    @Override
28159
    public boolean equals(Object that) {
28160
      if (that == null)
28161
        return false;
553 chandransh 28162
      if (that instanceof updateMyResearch_args)
28163
        return this.equals((updateMyResearch_args)that);
130 ashish 28164
      return false;
28165
    }
28166
 
553 chandransh 28167
    public boolean equals(updateMyResearch_args that) {
130 ashish 28168
      if (that == null)
28169
        return false;
28170
 
771 rajveer 28171
      boolean this_present_userId = true;
28172
      boolean that_present_userId = true;
28173
      if (this_present_userId || that_present_userId) {
28174
        if (!(this_present_userId && that_present_userId))
130 ashish 28175
          return false;
771 rajveer 28176
        if (this.userId != that.userId)
130 ashish 28177
          return false;
28178
      }
28179
 
771 rajveer 28180
      boolean this_present_itemId = true;
28181
      boolean that_present_itemId = true;
28182
      if (this_present_itemId || that_present_itemId) {
28183
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 28184
          return false;
771 rajveer 28185
        if (this.itemId != that.itemId)
553 chandransh 28186
          return false;
28187
      }
28188
 
130 ashish 28189
      return true;
28190
    }
28191
 
28192
    @Override
28193
    public int hashCode() {
28194
      return 0;
28195
    }
28196
 
553 chandransh 28197
    public int compareTo(updateMyResearch_args other) {
130 ashish 28198
      if (!getClass().equals(other.getClass())) {
28199
        return getClass().getName().compareTo(other.getClass().getName());
28200
      }
28201
 
28202
      int lastComparison = 0;
553 chandransh 28203
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 28204
 
771 rajveer 28205
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 28206
      if (lastComparison != 0) {
28207
        return lastComparison;
28208
      }
771 rajveer 28209
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 28210
      if (lastComparison != 0) {
28211
        return lastComparison;
28212
      }
771 rajveer 28213
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 28214
      if (lastComparison != 0) {
28215
        return lastComparison;
28216
      }
771 rajveer 28217
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 28218
      if (lastComparison != 0) {
28219
        return lastComparison;
28220
      }
130 ashish 28221
      return 0;
28222
    }
28223
 
28224
    public void read(TProtocol iprot) throws TException {
28225
      TField field;
28226
      iprot.readStructBegin();
28227
      while (true)
28228
      {
28229
        field = iprot.readFieldBegin();
28230
        if (field.type == TType.STOP) { 
28231
          break;
28232
        }
28233
        _Fields fieldId = _Fields.findByThriftId(field.id);
28234
        if (fieldId == null) {
28235
          TProtocolUtil.skip(iprot, field.type);
28236
        } else {
28237
          switch (fieldId) {
553 chandransh 28238
            case USER_ID:
130 ashish 28239
              if (field.type == TType.I64) {
771 rajveer 28240
                this.userId = iprot.readI64();
28241
                setUserIdIsSet(true);
130 ashish 28242
              } else { 
28243
                TProtocolUtil.skip(iprot, field.type);
28244
              }
28245
              break;
553 chandransh 28246
            case ITEM_ID:
28247
              if (field.type == TType.I64) {
771 rajveer 28248
                this.itemId = iprot.readI64();
28249
                setItemIdIsSet(true);
553 chandransh 28250
              } else { 
28251
                TProtocolUtil.skip(iprot, field.type);
28252
              }
28253
              break;
130 ashish 28254
          }
28255
          iprot.readFieldEnd();
28256
        }
28257
      }
28258
      iprot.readStructEnd();
28259
      validate();
28260
    }
28261
 
28262
    public void write(TProtocol oprot) throws TException {
28263
      validate();
28264
 
28265
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 28266
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 28267
      oprot.writeI64(this.userId);
130 ashish 28268
      oprot.writeFieldEnd();
553 chandransh 28269
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 28270
      oprot.writeI64(this.itemId);
553 chandransh 28271
      oprot.writeFieldEnd();
130 ashish 28272
      oprot.writeFieldStop();
28273
      oprot.writeStructEnd();
28274
    }
28275
 
28276
    @Override
28277
    public String toString() {
553 chandransh 28278
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 28279
      boolean first = true;
28280
 
771 rajveer 28281
      sb.append("userId:");
28282
      sb.append(this.userId);
130 ashish 28283
      first = false;
553 chandransh 28284
      if (!first) sb.append(", ");
771 rajveer 28285
      sb.append("itemId:");
28286
      sb.append(this.itemId);
553 chandransh 28287
      first = false;
130 ashish 28288
      sb.append(")");
28289
      return sb.toString();
28290
    }
28291
 
28292
    public void validate() throws TException {
28293
      // check for required fields
28294
    }
28295
 
28296
  }
28297
 
553 chandransh 28298
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
28299
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 28300
 
28301
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 28302
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 28303
 
28304
    private boolean success;
553 chandransh 28305
    private WidgetException scx;
130 ashish 28306
 
28307
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28308
    public enum _Fields implements TFieldIdEnum {
28309
      SUCCESS((short)0, "success"),
553 chandransh 28310
      SCX((short)1, "scx");
130 ashish 28311
 
28312
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28313
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28314
 
28315
      static {
28316
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28317
          byId.put((int)field._thriftId, field);
28318
          byName.put(field.getFieldName(), field);
28319
        }
28320
      }
28321
 
28322
      /**
28323
       * Find the _Fields constant that matches fieldId, or null if its not found.
28324
       */
28325
      public static _Fields findByThriftId(int fieldId) {
28326
        return byId.get(fieldId);
28327
      }
28328
 
28329
      /**
28330
       * Find the _Fields constant that matches fieldId, throwing an exception
28331
       * if it is not found.
28332
       */
28333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28334
        _Fields fields = findByThriftId(fieldId);
28335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28336
        return fields;
28337
      }
28338
 
28339
      /**
28340
       * Find the _Fields constant that matches name, or null if its not found.
28341
       */
28342
      public static _Fields findByName(String name) {
28343
        return byName.get(name);
28344
      }
28345
 
28346
      private final short _thriftId;
28347
      private final String _fieldName;
28348
 
28349
      _Fields(short thriftId, String fieldName) {
28350
        _thriftId = thriftId;
28351
        _fieldName = fieldName;
28352
      }
28353
 
28354
      public short getThriftFieldId() {
28355
        return _thriftId;
28356
      }
28357
 
28358
      public String getFieldName() {
28359
        return _fieldName;
28360
      }
28361
    }
28362
 
28363
    // isset id assignments
28364
    private static final int __SUCCESS_ISSET_ID = 0;
28365
    private BitSet __isset_bit_vector = new BitSet(1);
28366
 
28367
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28368
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28369
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 28370
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 28371
          new FieldValueMetaData(TType.STRUCT)));
28372
    }});
28373
 
28374
    static {
553 chandransh 28375
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 28376
    }
28377
 
553 chandransh 28378
    public updateMyResearch_result() {
130 ashish 28379
    }
28380
 
553 chandransh 28381
    public updateMyResearch_result(
130 ashish 28382
      boolean success,
553 chandransh 28383
      WidgetException scx)
130 ashish 28384
    {
28385
      this();
28386
      this.success = success;
28387
      setSuccessIsSet(true);
553 chandransh 28388
      this.scx = scx;
130 ashish 28389
    }
28390
 
28391
    /**
28392
     * Performs a deep copy on <i>other</i>.
28393
     */
553 chandransh 28394
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 28395
      __isset_bit_vector.clear();
28396
      __isset_bit_vector.or(other.__isset_bit_vector);
28397
      this.success = other.success;
553 chandransh 28398
      if (other.isSetScx()) {
28399
        this.scx = new WidgetException(other.scx);
130 ashish 28400
      }
28401
    }
28402
 
553 chandransh 28403
    public updateMyResearch_result deepCopy() {
28404
      return new updateMyResearch_result(this);
130 ashish 28405
    }
28406
 
28407
    @Deprecated
553 chandransh 28408
    public updateMyResearch_result clone() {
28409
      return new updateMyResearch_result(this);
130 ashish 28410
    }
28411
 
28412
    public boolean isSuccess() {
28413
      return this.success;
28414
    }
28415
 
553 chandransh 28416
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 28417
      this.success = success;
28418
      setSuccessIsSet(true);
28419
      return this;
28420
    }
28421
 
28422
    public void unsetSuccess() {
28423
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28424
    }
28425
 
28426
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28427
    public boolean isSetSuccess() {
28428
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28429
    }
28430
 
28431
    public void setSuccessIsSet(boolean value) {
28432
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28433
    }
28434
 
553 chandransh 28435
    public WidgetException getScx() {
28436
      return this.scx;
130 ashish 28437
    }
28438
 
553 chandransh 28439
    public updateMyResearch_result setScx(WidgetException scx) {
28440
      this.scx = scx;
130 ashish 28441
      return this;
28442
    }
28443
 
553 chandransh 28444
    public void unsetScx() {
28445
      this.scx = null;
130 ashish 28446
    }
28447
 
553 chandransh 28448
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28449
    public boolean isSetScx() {
28450
      return this.scx != null;
130 ashish 28451
    }
28452
 
553 chandransh 28453
    public void setScxIsSet(boolean value) {
130 ashish 28454
      if (!value) {
553 chandransh 28455
        this.scx = null;
130 ashish 28456
      }
28457
    }
28458
 
28459
    public void setFieldValue(_Fields field, Object value) {
28460
      switch (field) {
28461
      case SUCCESS:
28462
        if (value == null) {
28463
          unsetSuccess();
28464
        } else {
28465
          setSuccess((Boolean)value);
28466
        }
28467
        break;
28468
 
553 chandransh 28469
      case SCX:
130 ashish 28470
        if (value == null) {
553 chandransh 28471
          unsetScx();
130 ashish 28472
        } else {
553 chandransh 28473
          setScx((WidgetException)value);
130 ashish 28474
        }
28475
        break;
28476
 
28477
      }
28478
    }
28479
 
28480
    public void setFieldValue(int fieldID, Object value) {
28481
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28482
    }
28483
 
28484
    public Object getFieldValue(_Fields field) {
28485
      switch (field) {
28486
      case SUCCESS:
28487
        return new Boolean(isSuccess());
28488
 
553 chandransh 28489
      case SCX:
28490
        return getScx();
130 ashish 28491
 
28492
      }
28493
      throw new IllegalStateException();
28494
    }
28495
 
28496
    public Object getFieldValue(int fieldId) {
28497
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28498
    }
28499
 
28500
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28501
    public boolean isSet(_Fields field) {
28502
      switch (field) {
28503
      case SUCCESS:
28504
        return isSetSuccess();
553 chandransh 28505
      case SCX:
28506
        return isSetScx();
130 ashish 28507
      }
28508
      throw new IllegalStateException();
28509
    }
28510
 
28511
    public boolean isSet(int fieldID) {
28512
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28513
    }
28514
 
28515
    @Override
28516
    public boolean equals(Object that) {
28517
      if (that == null)
28518
        return false;
553 chandransh 28519
      if (that instanceof updateMyResearch_result)
28520
        return this.equals((updateMyResearch_result)that);
130 ashish 28521
      return false;
28522
    }
28523
 
553 chandransh 28524
    public boolean equals(updateMyResearch_result that) {
130 ashish 28525
      if (that == null)
28526
        return false;
28527
 
28528
      boolean this_present_success = true;
28529
      boolean that_present_success = true;
28530
      if (this_present_success || that_present_success) {
28531
        if (!(this_present_success && that_present_success))
28532
          return false;
28533
        if (this.success != that.success)
28534
          return false;
28535
      }
28536
 
553 chandransh 28537
      boolean this_present_scx = true && this.isSetScx();
28538
      boolean that_present_scx = true && that.isSetScx();
28539
      if (this_present_scx || that_present_scx) {
28540
        if (!(this_present_scx && that_present_scx))
130 ashish 28541
          return false;
553 chandransh 28542
        if (!this.scx.equals(that.scx))
130 ashish 28543
          return false;
28544
      }
28545
 
28546
      return true;
28547
    }
28548
 
28549
    @Override
28550
    public int hashCode() {
28551
      return 0;
28552
    }
28553
 
553 chandransh 28554
    public int compareTo(updateMyResearch_result other) {
130 ashish 28555
      if (!getClass().equals(other.getClass())) {
28556
        return getClass().getName().compareTo(other.getClass().getName());
28557
      }
28558
 
28559
      int lastComparison = 0;
553 chandransh 28560
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 28561
 
28562
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28563
      if (lastComparison != 0) {
28564
        return lastComparison;
28565
      }
28566
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28567
      if (lastComparison != 0) {
28568
        return lastComparison;
28569
      }
553 chandransh 28570
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 28571
      if (lastComparison != 0) {
28572
        return lastComparison;
28573
      }
553 chandransh 28574
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 28575
      if (lastComparison != 0) {
28576
        return lastComparison;
28577
      }
28578
      return 0;
28579
    }
28580
 
28581
    public void read(TProtocol iprot) throws TException {
28582
      TField field;
28583
      iprot.readStructBegin();
28584
      while (true)
28585
      {
28586
        field = iprot.readFieldBegin();
28587
        if (field.type == TType.STOP) { 
28588
          break;
28589
        }
28590
        _Fields fieldId = _Fields.findByThriftId(field.id);
28591
        if (fieldId == null) {
28592
          TProtocolUtil.skip(iprot, field.type);
28593
        } else {
28594
          switch (fieldId) {
28595
            case SUCCESS:
28596
              if (field.type == TType.BOOL) {
28597
                this.success = iprot.readBool();
28598
                setSuccessIsSet(true);
28599
              } else { 
28600
                TProtocolUtil.skip(iprot, field.type);
28601
              }
28602
              break;
553 chandransh 28603
            case SCX:
130 ashish 28604
              if (field.type == TType.STRUCT) {
553 chandransh 28605
                this.scx = new WidgetException();
28606
                this.scx.read(iprot);
130 ashish 28607
              } else { 
28608
                TProtocolUtil.skip(iprot, field.type);
28609
              }
28610
              break;
28611
          }
28612
          iprot.readFieldEnd();
28613
        }
28614
      }
28615
      iprot.readStructEnd();
28616
      validate();
28617
    }
28618
 
28619
    public void write(TProtocol oprot) throws TException {
28620
      oprot.writeStructBegin(STRUCT_DESC);
28621
 
28622
      if (this.isSetSuccess()) {
28623
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28624
        oprot.writeBool(this.success);
28625
        oprot.writeFieldEnd();
553 chandransh 28626
      } else if (this.isSetScx()) {
28627
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28628
        this.scx.write(oprot);
130 ashish 28629
        oprot.writeFieldEnd();
28630
      }
28631
      oprot.writeFieldStop();
28632
      oprot.writeStructEnd();
28633
    }
28634
 
28635
    @Override
28636
    public String toString() {
553 chandransh 28637
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 28638
      boolean first = true;
28639
 
28640
      sb.append("success:");
28641
      sb.append(this.success);
28642
      first = false;
28643
      if (!first) sb.append(", ");
553 chandransh 28644
      sb.append("scx:");
28645
      if (this.scx == null) {
130 ashish 28646
        sb.append("null");
28647
      } else {
553 chandransh 28648
        sb.append(this.scx);
130 ashish 28649
      }
28650
      first = false;
28651
      sb.append(")");
28652
      return sb.toString();
28653
    }
28654
 
28655
    public void validate() throws TException {
28656
      // check for required fields
28657
    }
28658
 
28659
  }
28660
 
553 chandransh 28661
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
28662
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 28663
 
771 rajveer 28664
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
28665
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 28666
 
771 rajveer 28667
    private long userId;
28668
    private long itemId;
130 ashish 28669
 
28670
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28671
    public enum _Fields implements TFieldIdEnum {
771 rajveer 28672
      USER_ID((short)1, "userId"),
28673
      ITEM_ID((short)2, "itemId");
130 ashish 28674
 
28675
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28676
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28677
 
28678
      static {
28679
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28680
          byId.put((int)field._thriftId, field);
28681
          byName.put(field.getFieldName(), field);
28682
        }
28683
      }
28684
 
28685
      /**
28686
       * Find the _Fields constant that matches fieldId, or null if its not found.
28687
       */
28688
      public static _Fields findByThriftId(int fieldId) {
28689
        return byId.get(fieldId);
28690
      }
28691
 
28692
      /**
28693
       * Find the _Fields constant that matches fieldId, throwing an exception
28694
       * if it is not found.
28695
       */
28696
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28697
        _Fields fields = findByThriftId(fieldId);
28698
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28699
        return fields;
28700
      }
28701
 
28702
      /**
28703
       * Find the _Fields constant that matches name, or null if its not found.
28704
       */
28705
      public static _Fields findByName(String name) {
28706
        return byName.get(name);
28707
      }
28708
 
28709
      private final short _thriftId;
28710
      private final String _fieldName;
28711
 
28712
      _Fields(short thriftId, String fieldName) {
28713
        _thriftId = thriftId;
28714
        _fieldName = fieldName;
28715
      }
28716
 
28717
      public short getThriftFieldId() {
28718
        return _thriftId;
28719
      }
28720
 
28721
      public String getFieldName() {
28722
        return _fieldName;
28723
      }
28724
    }
28725
 
28726
    // isset id assignments
771 rajveer 28727
    private static final int __USERID_ISSET_ID = 0;
28728
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 28729
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 28730
 
28731
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 28732
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 28733
          new FieldValueMetaData(TType.I64)));
771 rajveer 28734
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 28735
          new FieldValueMetaData(TType.I64)));
130 ashish 28736
    }});
28737
 
28738
    static {
553 chandransh 28739
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 28740
    }
28741
 
553 chandransh 28742
    public deleteItemFromMyResearch_args() {
130 ashish 28743
    }
28744
 
553 chandransh 28745
    public deleteItemFromMyResearch_args(
771 rajveer 28746
      long userId,
28747
      long itemId)
130 ashish 28748
    {
28749
      this();
771 rajveer 28750
      this.userId = userId;
28751
      setUserIdIsSet(true);
28752
      this.itemId = itemId;
28753
      setItemIdIsSet(true);
130 ashish 28754
    }
28755
 
28756
    /**
28757
     * Performs a deep copy on <i>other</i>.
28758
     */
553 chandransh 28759
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 28760
      __isset_bit_vector.clear();
28761
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 28762
      this.userId = other.userId;
28763
      this.itemId = other.itemId;
553 chandransh 28764
    }
28765
 
28766
    public deleteItemFromMyResearch_args deepCopy() {
28767
      return new deleteItemFromMyResearch_args(this);
28768
    }
28769
 
28770
    @Deprecated
28771
    public deleteItemFromMyResearch_args clone() {
28772
      return new deleteItemFromMyResearch_args(this);
28773
    }
28774
 
771 rajveer 28775
    public long getUserId() {
28776
      return this.userId;
553 chandransh 28777
    }
28778
 
771 rajveer 28779
    public deleteItemFromMyResearch_args setUserId(long userId) {
28780
      this.userId = userId;
28781
      setUserIdIsSet(true);
553 chandransh 28782
      return this;
28783
    }
28784
 
771 rajveer 28785
    public void unsetUserId() {
28786
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 28787
    }
28788
 
771 rajveer 28789
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
28790
    public boolean isSetUserId() {
28791
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 28792
    }
28793
 
771 rajveer 28794
    public void setUserIdIsSet(boolean value) {
28795
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 28796
    }
28797
 
771 rajveer 28798
    public long getItemId() {
28799
      return this.itemId;
553 chandransh 28800
    }
28801
 
771 rajveer 28802
    public deleteItemFromMyResearch_args setItemId(long itemId) {
28803
      this.itemId = itemId;
28804
      setItemIdIsSet(true);
553 chandransh 28805
      return this;
28806
    }
28807
 
771 rajveer 28808
    public void unsetItemId() {
28809
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 28810
    }
28811
 
771 rajveer 28812
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
28813
    public boolean isSetItemId() {
28814
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 28815
    }
28816
 
771 rajveer 28817
    public void setItemIdIsSet(boolean value) {
28818
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 28819
    }
28820
 
28821
    public void setFieldValue(_Fields field, Object value) {
28822
      switch (field) {
28823
      case USER_ID:
28824
        if (value == null) {
771 rajveer 28825
          unsetUserId();
553 chandransh 28826
        } else {
771 rajveer 28827
          setUserId((Long)value);
553 chandransh 28828
        }
28829
        break;
28830
 
28831
      case ITEM_ID:
28832
        if (value == null) {
771 rajveer 28833
          unsetItemId();
553 chandransh 28834
        } else {
771 rajveer 28835
          setItemId((Long)value);
553 chandransh 28836
        }
28837
        break;
28838
 
130 ashish 28839
      }
28840
    }
28841
 
553 chandransh 28842
    public void setFieldValue(int fieldID, Object value) {
28843
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 28844
    }
28845
 
553 chandransh 28846
    public Object getFieldValue(_Fields field) {
28847
      switch (field) {
28848
      case USER_ID:
771 rajveer 28849
        return new Long(getUserId());
553 chandransh 28850
 
28851
      case ITEM_ID:
771 rajveer 28852
        return new Long(getItemId());
553 chandransh 28853
 
28854
      }
28855
      throw new IllegalStateException();
28856
    }
28857
 
28858
    public Object getFieldValue(int fieldId) {
28859
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28860
    }
28861
 
28862
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28863
    public boolean isSet(_Fields field) {
28864
      switch (field) {
28865
      case USER_ID:
771 rajveer 28866
        return isSetUserId();
553 chandransh 28867
      case ITEM_ID:
771 rajveer 28868
        return isSetItemId();
553 chandransh 28869
      }
28870
      throw new IllegalStateException();
28871
    }
28872
 
28873
    public boolean isSet(int fieldID) {
28874
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28875
    }
28876
 
28877
    @Override
28878
    public boolean equals(Object that) {
28879
      if (that == null)
28880
        return false;
28881
      if (that instanceof deleteItemFromMyResearch_args)
28882
        return this.equals((deleteItemFromMyResearch_args)that);
28883
      return false;
28884
    }
28885
 
28886
    public boolean equals(deleteItemFromMyResearch_args that) {
28887
      if (that == null)
28888
        return false;
28889
 
771 rajveer 28890
      boolean this_present_userId = true;
28891
      boolean that_present_userId = true;
28892
      if (this_present_userId || that_present_userId) {
28893
        if (!(this_present_userId && that_present_userId))
553 chandransh 28894
          return false;
771 rajveer 28895
        if (this.userId != that.userId)
553 chandransh 28896
          return false;
28897
      }
28898
 
771 rajveer 28899
      boolean this_present_itemId = true;
28900
      boolean that_present_itemId = true;
28901
      if (this_present_itemId || that_present_itemId) {
28902
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 28903
          return false;
771 rajveer 28904
        if (this.itemId != that.itemId)
553 chandransh 28905
          return false;
28906
      }
28907
 
28908
      return true;
28909
    }
28910
 
28911
    @Override
28912
    public int hashCode() {
28913
      return 0;
28914
    }
28915
 
28916
    public int compareTo(deleteItemFromMyResearch_args other) {
28917
      if (!getClass().equals(other.getClass())) {
28918
        return getClass().getName().compareTo(other.getClass().getName());
28919
      }
28920
 
28921
      int lastComparison = 0;
28922
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
28923
 
771 rajveer 28924
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 28925
      if (lastComparison != 0) {
28926
        return lastComparison;
28927
      }
771 rajveer 28928
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 28929
      if (lastComparison != 0) {
28930
        return lastComparison;
28931
      }
771 rajveer 28932
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 28933
      if (lastComparison != 0) {
28934
        return lastComparison;
28935
      }
771 rajveer 28936
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 28937
      if (lastComparison != 0) {
28938
        return lastComparison;
28939
      }
28940
      return 0;
28941
    }
28942
 
28943
    public void read(TProtocol iprot) throws TException {
28944
      TField field;
28945
      iprot.readStructBegin();
28946
      while (true)
28947
      {
28948
        field = iprot.readFieldBegin();
28949
        if (field.type == TType.STOP) { 
28950
          break;
28951
        }
28952
        _Fields fieldId = _Fields.findByThriftId(field.id);
28953
        if (fieldId == null) {
28954
          TProtocolUtil.skip(iprot, field.type);
28955
        } else {
28956
          switch (fieldId) {
28957
            case USER_ID:
28958
              if (field.type == TType.I64) {
771 rajveer 28959
                this.userId = iprot.readI64();
28960
                setUserIdIsSet(true);
553 chandransh 28961
              } else { 
28962
                TProtocolUtil.skip(iprot, field.type);
28963
              }
28964
              break;
28965
            case ITEM_ID:
28966
              if (field.type == TType.I64) {
771 rajveer 28967
                this.itemId = iprot.readI64();
28968
                setItemIdIsSet(true);
553 chandransh 28969
              } else { 
28970
                TProtocolUtil.skip(iprot, field.type);
28971
              }
28972
              break;
28973
          }
28974
          iprot.readFieldEnd();
28975
        }
28976
      }
28977
      iprot.readStructEnd();
28978
      validate();
28979
    }
28980
 
28981
    public void write(TProtocol oprot) throws TException {
28982
      validate();
28983
 
28984
      oprot.writeStructBegin(STRUCT_DESC);
28985
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 28986
      oprot.writeI64(this.userId);
553 chandransh 28987
      oprot.writeFieldEnd();
28988
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 28989
      oprot.writeI64(this.itemId);
553 chandransh 28990
      oprot.writeFieldEnd();
28991
      oprot.writeFieldStop();
28992
      oprot.writeStructEnd();
28993
    }
28994
 
28995
    @Override
28996
    public String toString() {
28997
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
28998
      boolean first = true;
28999
 
771 rajveer 29000
      sb.append("userId:");
29001
      sb.append(this.userId);
553 chandransh 29002
      first = false;
29003
      if (!first) sb.append(", ");
771 rajveer 29004
      sb.append("itemId:");
29005
      sb.append(this.itemId);
553 chandransh 29006
      first = false;
29007
      sb.append(")");
29008
      return sb.toString();
29009
    }
29010
 
29011
    public void validate() throws TException {
29012
      // check for required fields
29013
    }
29014
 
29015
  }
29016
 
29017
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
29018
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
29019
 
29020
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29021
 
29022
    private WidgetException scx;
29023
 
29024
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29025
    public enum _Fields implements TFieldIdEnum {
29026
      SCX((short)1, "scx");
29027
 
29028
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29029
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29030
 
29031
      static {
29032
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29033
          byId.put((int)field._thriftId, field);
29034
          byName.put(field.getFieldName(), field);
29035
        }
29036
      }
29037
 
29038
      /**
29039
       * Find the _Fields constant that matches fieldId, or null if its not found.
29040
       */
29041
      public static _Fields findByThriftId(int fieldId) {
29042
        return byId.get(fieldId);
29043
      }
29044
 
29045
      /**
29046
       * Find the _Fields constant that matches fieldId, throwing an exception
29047
       * if it is not found.
29048
       */
29049
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29050
        _Fields fields = findByThriftId(fieldId);
29051
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29052
        return fields;
29053
      }
29054
 
29055
      /**
29056
       * Find the _Fields constant that matches name, or null if its not found.
29057
       */
29058
      public static _Fields findByName(String name) {
29059
        return byName.get(name);
29060
      }
29061
 
29062
      private final short _thriftId;
29063
      private final String _fieldName;
29064
 
29065
      _Fields(short thriftId, String fieldName) {
29066
        _thriftId = thriftId;
29067
        _fieldName = fieldName;
29068
      }
29069
 
29070
      public short getThriftFieldId() {
29071
        return _thriftId;
29072
      }
29073
 
29074
      public String getFieldName() {
29075
        return _fieldName;
29076
      }
29077
    }
29078
 
29079
    // isset id assignments
29080
 
29081
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29082
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
29083
          new FieldValueMetaData(TType.STRUCT)));
29084
    }});
29085
 
29086
    static {
29087
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
29088
    }
29089
 
29090
    public deleteItemFromMyResearch_result() {
29091
    }
29092
 
29093
    public deleteItemFromMyResearch_result(
29094
      WidgetException scx)
29095
    {
29096
      this();
29097
      this.scx = scx;
29098
    }
29099
 
29100
    /**
29101
     * Performs a deep copy on <i>other</i>.
29102
     */
29103
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
29104
      if (other.isSetScx()) {
29105
        this.scx = new WidgetException(other.scx);
29106
      }
29107
    }
29108
 
29109
    public deleteItemFromMyResearch_result deepCopy() {
29110
      return new deleteItemFromMyResearch_result(this);
29111
    }
29112
 
130 ashish 29113
    @Deprecated
553 chandransh 29114
    public deleteItemFromMyResearch_result clone() {
29115
      return new deleteItemFromMyResearch_result(this);
130 ashish 29116
    }
29117
 
553 chandransh 29118
    public WidgetException getScx() {
29119
      return this.scx;
130 ashish 29120
    }
29121
 
553 chandransh 29122
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
29123
      this.scx = scx;
130 ashish 29124
      return this;
29125
    }
29126
 
553 chandransh 29127
    public void unsetScx() {
29128
      this.scx = null;
130 ashish 29129
    }
29130
 
553 chandransh 29131
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29132
    public boolean isSetScx() {
29133
      return this.scx != null;
130 ashish 29134
    }
29135
 
553 chandransh 29136
    public void setScxIsSet(boolean value) {
130 ashish 29137
      if (!value) {
553 chandransh 29138
        this.scx = null;
130 ashish 29139
      }
29140
    }
29141
 
553 chandransh 29142
    public void setFieldValue(_Fields field, Object value) {
29143
      switch (field) {
29144
      case SCX:
29145
        if (value == null) {
29146
          unsetScx();
29147
        } else {
29148
          setScx((WidgetException)value);
29149
        }
29150
        break;
29151
 
29152
      }
130 ashish 29153
    }
29154
 
553 chandransh 29155
    public void setFieldValue(int fieldID, Object value) {
29156
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29157
    }
29158
 
29159
    public Object getFieldValue(_Fields field) {
29160
      switch (field) {
29161
      case SCX:
29162
        return getScx();
29163
 
29164
      }
29165
      throw new IllegalStateException();
29166
    }
29167
 
29168
    public Object getFieldValue(int fieldId) {
29169
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29170
    }
29171
 
29172
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29173
    public boolean isSet(_Fields field) {
29174
      switch (field) {
29175
      case SCX:
29176
        return isSetScx();
29177
      }
29178
      throw new IllegalStateException();
29179
    }
29180
 
29181
    public boolean isSet(int fieldID) {
29182
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29183
    }
29184
 
29185
    @Override
29186
    public boolean equals(Object that) {
29187
      if (that == null)
29188
        return false;
29189
      if (that instanceof deleteItemFromMyResearch_result)
29190
        return this.equals((deleteItemFromMyResearch_result)that);
29191
      return false;
29192
    }
29193
 
29194
    public boolean equals(deleteItemFromMyResearch_result that) {
29195
      if (that == null)
29196
        return false;
29197
 
29198
      boolean this_present_scx = true && this.isSetScx();
29199
      boolean that_present_scx = true && that.isSetScx();
29200
      if (this_present_scx || that_present_scx) {
29201
        if (!(this_present_scx && that_present_scx))
29202
          return false;
29203
        if (!this.scx.equals(that.scx))
29204
          return false;
29205
      }
29206
 
29207
      return true;
29208
    }
29209
 
29210
    @Override
29211
    public int hashCode() {
29212
      return 0;
29213
    }
29214
 
29215
    public int compareTo(deleteItemFromMyResearch_result other) {
29216
      if (!getClass().equals(other.getClass())) {
29217
        return getClass().getName().compareTo(other.getClass().getName());
29218
      }
29219
 
29220
      int lastComparison = 0;
29221
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
29222
 
29223
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
29224
      if (lastComparison != 0) {
29225
        return lastComparison;
29226
      }
29227
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
29228
      if (lastComparison != 0) {
29229
        return lastComparison;
29230
      }
29231
      return 0;
29232
    }
29233
 
29234
    public void read(TProtocol iprot) throws TException {
29235
      TField field;
29236
      iprot.readStructBegin();
29237
      while (true)
29238
      {
29239
        field = iprot.readFieldBegin();
29240
        if (field.type == TType.STOP) { 
29241
          break;
29242
        }
29243
        _Fields fieldId = _Fields.findByThriftId(field.id);
29244
        if (fieldId == null) {
29245
          TProtocolUtil.skip(iprot, field.type);
29246
        } else {
29247
          switch (fieldId) {
29248
            case SCX:
29249
              if (field.type == TType.STRUCT) {
29250
                this.scx = new WidgetException();
29251
                this.scx.read(iprot);
29252
              } else { 
29253
                TProtocolUtil.skip(iprot, field.type);
29254
              }
29255
              break;
29256
          }
29257
          iprot.readFieldEnd();
29258
        }
29259
      }
29260
      iprot.readStructEnd();
29261
      validate();
29262
    }
29263
 
29264
    public void write(TProtocol oprot) throws TException {
29265
      oprot.writeStructBegin(STRUCT_DESC);
29266
 
29267
      if (this.isSetScx()) {
29268
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29269
        this.scx.write(oprot);
29270
        oprot.writeFieldEnd();
29271
      }
29272
      oprot.writeFieldStop();
29273
      oprot.writeStructEnd();
29274
    }
29275
 
29276
    @Override
29277
    public String toString() {
29278
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
29279
      boolean first = true;
29280
 
29281
      sb.append("scx:");
29282
      if (this.scx == null) {
29283
        sb.append("null");
29284
      } else {
29285
        sb.append(this.scx);
29286
      }
29287
      first = false;
29288
      sb.append(")");
29289
      return sb.toString();
29290
    }
29291
 
29292
    public void validate() throws TException {
29293
      // check for required fields
29294
    }
29295
 
29296
  }
29297
 
771 rajveer 29298
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
29299
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
553 chandransh 29300
 
771 rajveer 29301
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
29302
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
553 chandransh 29303
 
771 rajveer 29304
    private long userId;
29305
    private long itemId;
553 chandransh 29306
 
29307
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29308
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29309
      USER_ID((short)1, "userId"),
29310
      ITEM_ID((short)2, "itemId");
553 chandransh 29311
 
29312
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29313
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29314
 
29315
      static {
29316
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29317
          byId.put((int)field._thriftId, field);
29318
          byName.put(field.getFieldName(), field);
29319
        }
29320
      }
29321
 
29322
      /**
29323
       * Find the _Fields constant that matches fieldId, or null if its not found.
29324
       */
29325
      public static _Fields findByThriftId(int fieldId) {
29326
        return byId.get(fieldId);
29327
      }
29328
 
29329
      /**
29330
       * Find the _Fields constant that matches fieldId, throwing an exception
29331
       * if it is not found.
29332
       */
29333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29334
        _Fields fields = findByThriftId(fieldId);
29335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29336
        return fields;
29337
      }
29338
 
29339
      /**
29340
       * Find the _Fields constant that matches name, or null if its not found.
29341
       */
29342
      public static _Fields findByName(String name) {
29343
        return byName.get(name);
29344
      }
29345
 
29346
      private final short _thriftId;
29347
      private final String _fieldName;
29348
 
29349
      _Fields(short thriftId, String fieldName) {
29350
        _thriftId = thriftId;
29351
        _fieldName = fieldName;
29352
      }
29353
 
29354
      public short getThriftFieldId() {
29355
        return _thriftId;
29356
      }
29357
 
29358
      public String getFieldName() {
29359
        return _fieldName;
29360
      }
29361
    }
29362
 
29363
    // isset id assignments
771 rajveer 29364
    private static final int __USERID_ISSET_ID = 0;
29365
    private static final int __ITEMID_ISSET_ID = 1;
29366
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 29367
 
29368
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 29369
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 29370
          new FieldValueMetaData(TType.I64)));
771 rajveer 29371
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 29372
          new FieldValueMetaData(TType.I64)));
29373
    }});
29374
 
29375
    static {
771 rajveer 29376
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
553 chandransh 29377
    }
29378
 
771 rajveer 29379
    public updateBrowseHistory_args() {
553 chandransh 29380
    }
29381
 
771 rajveer 29382
    public updateBrowseHistory_args(
29383
      long userId,
29384
      long itemId)
553 chandransh 29385
    {
29386
      this();
771 rajveer 29387
      this.userId = userId;
29388
      setUserIdIsSet(true);
29389
      this.itemId = itemId;
29390
      setItemIdIsSet(true);
553 chandransh 29391
    }
29392
 
29393
    /**
29394
     * Performs a deep copy on <i>other</i>.
29395
     */
771 rajveer 29396
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
553 chandransh 29397
      __isset_bit_vector.clear();
29398
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 29399
      this.userId = other.userId;
29400
      this.itemId = other.itemId;
553 chandransh 29401
    }
29402
 
771 rajveer 29403
    public updateBrowseHistory_args deepCopy() {
29404
      return new updateBrowseHistory_args(this);
553 chandransh 29405
    }
29406
 
29407
    @Deprecated
771 rajveer 29408
    public updateBrowseHistory_args clone() {
29409
      return new updateBrowseHistory_args(this);
553 chandransh 29410
    }
29411
 
771 rajveer 29412
    public long getUserId() {
29413
      return this.userId;
553 chandransh 29414
    }
29415
 
771 rajveer 29416
    public updateBrowseHistory_args setUserId(long userId) {
29417
      this.userId = userId;
29418
      setUserIdIsSet(true);
130 ashish 29419
      return this;
29420
    }
29421
 
771 rajveer 29422
    public void unsetUserId() {
29423
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 29424
    }
29425
 
771 rajveer 29426
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29427
    public boolean isSetUserId() {
29428
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 29429
    }
29430
 
771 rajveer 29431
    public void setUserIdIsSet(boolean value) {
29432
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 29433
    }
29434
 
771 rajveer 29435
    public long getItemId() {
29436
      return this.itemId;
553 chandransh 29437
    }
29438
 
771 rajveer 29439
    public updateBrowseHistory_args setItemId(long itemId) {
29440
      this.itemId = itemId;
29441
      setItemIdIsSet(true);
553 chandransh 29442
      return this;
29443
    }
29444
 
771 rajveer 29445
    public void unsetItemId() {
29446
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 29447
    }
29448
 
771 rajveer 29449
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
29450
    public boolean isSetItemId() {
29451
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 29452
    }
29453
 
771 rajveer 29454
    public void setItemIdIsSet(boolean value) {
29455
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 29456
    }
29457
 
130 ashish 29458
    public void setFieldValue(_Fields field, Object value) {
29459
      switch (field) {
771 rajveer 29460
      case USER_ID:
130 ashish 29461
        if (value == null) {
771 rajveer 29462
          unsetUserId();
130 ashish 29463
        } else {
771 rajveer 29464
          setUserId((Long)value);
130 ashish 29465
        }
29466
        break;
29467
 
771 rajveer 29468
      case ITEM_ID:
130 ashish 29469
        if (value == null) {
771 rajveer 29470
          unsetItemId();
130 ashish 29471
        } else {
771 rajveer 29472
          setItemId((Long)value);
130 ashish 29473
        }
29474
        break;
29475
 
29476
      }
29477
    }
29478
 
29479
    public void setFieldValue(int fieldID, Object value) {
29480
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29481
    }
29482
 
29483
    public Object getFieldValue(_Fields field) {
29484
      switch (field) {
771 rajveer 29485
      case USER_ID:
29486
        return new Long(getUserId());
29487
 
553 chandransh 29488
      case ITEM_ID:
771 rajveer 29489
        return new Long(getItemId());
130 ashish 29490
 
29491
      }
29492
      throw new IllegalStateException();
29493
    }
29494
 
29495
    public Object getFieldValue(int fieldId) {
29496
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29497
    }
29498
 
29499
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29500
    public boolean isSet(_Fields field) {
29501
      switch (field) {
771 rajveer 29502
      case USER_ID:
29503
        return isSetUserId();
553 chandransh 29504
      case ITEM_ID:
771 rajveer 29505
        return isSetItemId();
130 ashish 29506
      }
29507
      throw new IllegalStateException();
29508
    }
29509
 
29510
    public boolean isSet(int fieldID) {
29511
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29512
    }
29513
 
29514
    @Override
29515
    public boolean equals(Object that) {
29516
      if (that == null)
29517
        return false;
771 rajveer 29518
      if (that instanceof updateBrowseHistory_args)
29519
        return this.equals((updateBrowseHistory_args)that);
130 ashish 29520
      return false;
29521
    }
29522
 
771 rajveer 29523
    public boolean equals(updateBrowseHistory_args that) {
130 ashish 29524
      if (that == null)
29525
        return false;
29526
 
771 rajveer 29527
      boolean this_present_userId = true;
29528
      boolean that_present_userId = true;
29529
      if (this_present_userId || that_present_userId) {
29530
        if (!(this_present_userId && that_present_userId))
130 ashish 29531
          return false;
771 rajveer 29532
        if (this.userId != that.userId)
130 ashish 29533
          return false;
29534
      }
29535
 
771 rajveer 29536
      boolean this_present_itemId = true;
29537
      boolean that_present_itemId = true;
29538
      if (this_present_itemId || that_present_itemId) {
29539
        if (!(this_present_itemId && that_present_itemId))
130 ashish 29540
          return false;
771 rajveer 29541
        if (this.itemId != that.itemId)
130 ashish 29542
          return false;
29543
      }
29544
 
29545
      return true;
29546
    }
29547
 
29548
    @Override
29549
    public int hashCode() {
29550
      return 0;
29551
    }
29552
 
771 rajveer 29553
    public int compareTo(updateBrowseHistory_args other) {
130 ashish 29554
      if (!getClass().equals(other.getClass())) {
29555
        return getClass().getName().compareTo(other.getClass().getName());
29556
      }
29557
 
29558
      int lastComparison = 0;
771 rajveer 29559
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
130 ashish 29560
 
771 rajveer 29561
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 29562
      if (lastComparison != 0) {
29563
        return lastComparison;
29564
      }
771 rajveer 29565
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 29566
      if (lastComparison != 0) {
29567
        return lastComparison;
29568
      }
771 rajveer 29569
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
130 ashish 29570
      if (lastComparison != 0) {
29571
        return lastComparison;
29572
      }
771 rajveer 29573
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
130 ashish 29574
      if (lastComparison != 0) {
29575
        return lastComparison;
29576
      }
29577
      return 0;
29578
    }
29579
 
29580
    public void read(TProtocol iprot) throws TException {
29581
      TField field;
29582
      iprot.readStructBegin();
29583
      while (true)
29584
      {
29585
        field = iprot.readFieldBegin();
29586
        if (field.type == TType.STOP) { 
29587
          break;
29588
        }
29589
        _Fields fieldId = _Fields.findByThriftId(field.id);
29590
        if (fieldId == null) {
29591
          TProtocolUtil.skip(iprot, field.type);
29592
        } else {
29593
          switch (fieldId) {
771 rajveer 29594
            case USER_ID:
553 chandransh 29595
              if (field.type == TType.I64) {
771 rajveer 29596
                this.userId = iprot.readI64();
29597
                setUserIdIsSet(true);
130 ashish 29598
              } else { 
29599
                TProtocolUtil.skip(iprot, field.type);
29600
              }
29601
              break;
771 rajveer 29602
            case ITEM_ID:
553 chandransh 29603
              if (field.type == TType.I64) {
771 rajveer 29604
                this.itemId = iprot.readI64();
29605
                setItemIdIsSet(true);
553 chandransh 29606
              } else { 
29607
                TProtocolUtil.skip(iprot, field.type);
29608
              }
29609
              break;
130 ashish 29610
          }
29611
          iprot.readFieldEnd();
29612
        }
29613
      }
29614
      iprot.readStructEnd();
29615
      validate();
29616
    }
29617
 
29618
    public void write(TProtocol oprot) throws TException {
29619
      validate();
29620
 
29621
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 29622
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29623
      oprot.writeI64(this.userId);
29624
      oprot.writeFieldEnd();
553 chandransh 29625
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 29626
      oprot.writeI64(this.itemId);
553 chandransh 29627
      oprot.writeFieldEnd();
130 ashish 29628
      oprot.writeFieldStop();
29629
      oprot.writeStructEnd();
29630
    }
29631
 
29632
    @Override
29633
    public String toString() {
771 rajveer 29634
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
130 ashish 29635
      boolean first = true;
29636
 
771 rajveer 29637
      sb.append("userId:");
29638
      sb.append(this.userId);
553 chandransh 29639
      first = false;
29640
      if (!first) sb.append(", ");
771 rajveer 29641
      sb.append("itemId:");
29642
      sb.append(this.itemId);
130 ashish 29643
      first = false;
29644
      sb.append(")");
29645
      return sb.toString();
29646
    }
29647
 
29648
    public void validate() throws TException {
29649
      // check for required fields
29650
    }
29651
 
29652
  }
29653
 
771 rajveer 29654
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
29655
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
130 ashish 29656
 
29657
 
29658
 
29659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29660
    public enum _Fields implements TFieldIdEnum {
553 chandransh 29661
;
29662
 
29663
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29665
 
29666
      static {
29667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29668
          byId.put((int)field._thriftId, field);
29669
          byName.put(field.getFieldName(), field);
29670
        }
29671
      }
29672
 
29673
      /**
29674
       * Find the _Fields constant that matches fieldId, or null if its not found.
29675
       */
29676
      public static _Fields findByThriftId(int fieldId) {
29677
        return byId.get(fieldId);
29678
      }
29679
 
29680
      /**
29681
       * Find the _Fields constant that matches fieldId, throwing an exception
29682
       * if it is not found.
29683
       */
29684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29685
        _Fields fields = findByThriftId(fieldId);
29686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29687
        return fields;
29688
      }
29689
 
29690
      /**
29691
       * Find the _Fields constant that matches name, or null if its not found.
29692
       */
29693
      public static _Fields findByName(String name) {
29694
        return byName.get(name);
29695
      }
29696
 
29697
      private final short _thriftId;
29698
      private final String _fieldName;
29699
 
29700
      _Fields(short thriftId, String fieldName) {
29701
        _thriftId = thriftId;
29702
        _fieldName = fieldName;
29703
      }
29704
 
29705
      public short getThriftFieldId() {
29706
        return _thriftId;
29707
      }
29708
 
29709
      public String getFieldName() {
29710
        return _fieldName;
29711
      }
29712
    }
29713
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29714
    }});
29715
 
29716
    static {
771 rajveer 29717
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
553 chandransh 29718
    }
29719
 
771 rajveer 29720
    public updateBrowseHistory_result() {
553 chandransh 29721
    }
29722
 
29723
    /**
29724
     * Performs a deep copy on <i>other</i>.
29725
     */
771 rajveer 29726
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
553 chandransh 29727
    }
29728
 
771 rajveer 29729
    public updateBrowseHistory_result deepCopy() {
29730
      return new updateBrowseHistory_result(this);
553 chandransh 29731
    }
29732
 
29733
    @Deprecated
771 rajveer 29734
    public updateBrowseHistory_result clone() {
29735
      return new updateBrowseHistory_result(this);
553 chandransh 29736
    }
29737
 
29738
    public void setFieldValue(_Fields field, Object value) {
29739
      switch (field) {
29740
      }
29741
    }
29742
 
29743
    public void setFieldValue(int fieldID, Object value) {
29744
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29745
    }
29746
 
29747
    public Object getFieldValue(_Fields field) {
29748
      switch (field) {
29749
      }
29750
      throw new IllegalStateException();
29751
    }
29752
 
29753
    public Object getFieldValue(int fieldId) {
29754
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29755
    }
29756
 
29757
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29758
    public boolean isSet(_Fields field) {
29759
      switch (field) {
29760
      }
29761
      throw new IllegalStateException();
29762
    }
29763
 
29764
    public boolean isSet(int fieldID) {
29765
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29766
    }
29767
 
29768
    @Override
29769
    public boolean equals(Object that) {
29770
      if (that == null)
29771
        return false;
771 rajveer 29772
      if (that instanceof updateBrowseHistory_result)
29773
        return this.equals((updateBrowseHistory_result)that);
553 chandransh 29774
      return false;
29775
    }
29776
 
771 rajveer 29777
    public boolean equals(updateBrowseHistory_result that) {
553 chandransh 29778
      if (that == null)
29779
        return false;
29780
 
29781
      return true;
29782
    }
29783
 
29784
    @Override
29785
    public int hashCode() {
29786
      return 0;
29787
    }
29788
 
771 rajveer 29789
    public int compareTo(updateBrowseHistory_result other) {
553 chandransh 29790
      if (!getClass().equals(other.getClass())) {
29791
        return getClass().getName().compareTo(other.getClass().getName());
29792
      }
29793
 
29794
      int lastComparison = 0;
771 rajveer 29795
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
553 chandransh 29796
 
29797
      return 0;
29798
    }
29799
 
29800
    public void read(TProtocol iprot) throws TException {
29801
      TField field;
29802
      iprot.readStructBegin();
29803
      while (true)
29804
      {
29805
        field = iprot.readFieldBegin();
29806
        if (field.type == TType.STOP) { 
29807
          break;
29808
        }
29809
        _Fields fieldId = _Fields.findByThriftId(field.id);
29810
        if (fieldId == null) {
29811
          TProtocolUtil.skip(iprot, field.type);
29812
        } else {
29813
          switch (fieldId) {
29814
          }
29815
          iprot.readFieldEnd();
29816
        }
29817
      }
29818
      iprot.readStructEnd();
29819
      validate();
29820
    }
29821
 
29822
    public void write(TProtocol oprot) throws TException {
29823
      oprot.writeStructBegin(STRUCT_DESC);
29824
 
29825
      oprot.writeFieldStop();
29826
      oprot.writeStructEnd();
29827
    }
29828
 
29829
    @Override
29830
    public String toString() {
771 rajveer 29831
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
553 chandransh 29832
      boolean first = true;
29833
 
29834
      sb.append(")");
29835
      return sb.toString();
29836
    }
29837
 
29838
    public void validate() throws TException {
29839
      // check for required fields
29840
    }
29841
 
29842
  }
29843
 
771 rajveer 29844
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
29845
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
553 chandransh 29846
 
771 rajveer 29847
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 29848
 
771 rajveer 29849
    private long userId;
553 chandransh 29850
 
29851
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29852
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29853
      USER_ID((short)1, "userId");
553 chandransh 29854
 
29855
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29857
 
29858
      static {
29859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29860
          byId.put((int)field._thriftId, field);
29861
          byName.put(field.getFieldName(), field);
29862
        }
29863
      }
29864
 
29865
      /**
29866
       * Find the _Fields constant that matches fieldId, or null if its not found.
29867
       */
29868
      public static _Fields findByThriftId(int fieldId) {
29869
        return byId.get(fieldId);
29870
      }
29871
 
29872
      /**
29873
       * Find the _Fields constant that matches fieldId, throwing an exception
29874
       * if it is not found.
29875
       */
29876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29877
        _Fields fields = findByThriftId(fieldId);
29878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29879
        return fields;
29880
      }
29881
 
29882
      /**
29883
       * Find the _Fields constant that matches name, or null if its not found.
29884
       */
29885
      public static _Fields findByName(String name) {
29886
        return byName.get(name);
29887
      }
29888
 
29889
      private final short _thriftId;
29890
      private final String _fieldName;
29891
 
29892
      _Fields(short thriftId, String fieldName) {
29893
        _thriftId = thriftId;
29894
        _fieldName = fieldName;
29895
      }
29896
 
29897
      public short getThriftFieldId() {
29898
        return _thriftId;
29899
      }
29900
 
29901
      public String getFieldName() {
29902
        return _fieldName;
29903
      }
29904
    }
29905
 
29906
    // isset id assignments
771 rajveer 29907
    private static final int __USERID_ISSET_ID = 0;
29908
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 29909
 
29910
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 29911
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 29912
          new FieldValueMetaData(TType.I64)));
29913
    }});
29914
 
29915
    static {
771 rajveer 29916
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
553 chandransh 29917
    }
29918
 
771 rajveer 29919
    public getBrowseHistory_args() {
553 chandransh 29920
    }
29921
 
771 rajveer 29922
    public getBrowseHistory_args(
29923
      long userId)
553 chandransh 29924
    {
29925
      this();
771 rajveer 29926
      this.userId = userId;
29927
      setUserIdIsSet(true);
553 chandransh 29928
    }
29929
 
29930
    /**
29931
     * Performs a deep copy on <i>other</i>.
29932
     */
771 rajveer 29933
    public getBrowseHistory_args(getBrowseHistory_args other) {
553 chandransh 29934
      __isset_bit_vector.clear();
29935
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 29936
      this.userId = other.userId;
553 chandransh 29937
    }
29938
 
771 rajveer 29939
    public getBrowseHistory_args deepCopy() {
29940
      return new getBrowseHistory_args(this);
553 chandransh 29941
    }
29942
 
29943
    @Deprecated
771 rajveer 29944
    public getBrowseHistory_args clone() {
29945
      return new getBrowseHistory_args(this);
553 chandransh 29946
    }
29947
 
771 rajveer 29948
    public long getUserId() {
29949
      return this.userId;
553 chandransh 29950
    }
29951
 
771 rajveer 29952
    public getBrowseHistory_args setUserId(long userId) {
29953
      this.userId = userId;
29954
      setUserIdIsSet(true);
553 chandransh 29955
      return this;
29956
    }
29957
 
771 rajveer 29958
    public void unsetUserId() {
29959
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 29960
    }
29961
 
771 rajveer 29962
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29963
    public boolean isSetUserId() {
29964
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 29965
    }
29966
 
771 rajveer 29967
    public void setUserIdIsSet(boolean value) {
29968
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 29969
    }
29970
 
29971
    public void setFieldValue(_Fields field, Object value) {
29972
      switch (field) {
29973
      case USER_ID:
29974
        if (value == null) {
771 rajveer 29975
          unsetUserId();
553 chandransh 29976
        } else {
771 rajveer 29977
          setUserId((Long)value);
553 chandransh 29978
        }
29979
        break;
29980
 
29981
      }
29982
    }
29983
 
29984
    public void setFieldValue(int fieldID, Object value) {
29985
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29986
    }
29987
 
29988
    public Object getFieldValue(_Fields field) {
29989
      switch (field) {
29990
      case USER_ID:
771 rajveer 29991
        return new Long(getUserId());
553 chandransh 29992
 
29993
      }
29994
      throw new IllegalStateException();
29995
    }
29996
 
29997
    public Object getFieldValue(int fieldId) {
29998
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29999
    }
30000
 
30001
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30002
    public boolean isSet(_Fields field) {
30003
      switch (field) {
30004
      case USER_ID:
771 rajveer 30005
        return isSetUserId();
553 chandransh 30006
      }
30007
      throw new IllegalStateException();
30008
    }
30009
 
30010
    public boolean isSet(int fieldID) {
30011
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30012
    }
30013
 
30014
    @Override
30015
    public boolean equals(Object that) {
30016
      if (that == null)
30017
        return false;
771 rajveer 30018
      if (that instanceof getBrowseHistory_args)
30019
        return this.equals((getBrowseHistory_args)that);
553 chandransh 30020
      return false;
30021
    }
30022
 
771 rajveer 30023
    public boolean equals(getBrowseHistory_args that) {
553 chandransh 30024
      if (that == null)
30025
        return false;
30026
 
771 rajveer 30027
      boolean this_present_userId = true;
30028
      boolean that_present_userId = true;
30029
      if (this_present_userId || that_present_userId) {
30030
        if (!(this_present_userId && that_present_userId))
553 chandransh 30031
          return false;
771 rajveer 30032
        if (this.userId != that.userId)
553 chandransh 30033
          return false;
30034
      }
30035
 
30036
      return true;
30037
    }
30038
 
30039
    @Override
30040
    public int hashCode() {
30041
      return 0;
30042
    }
30043
 
771 rajveer 30044
    public int compareTo(getBrowseHistory_args other) {
553 chandransh 30045
      if (!getClass().equals(other.getClass())) {
30046
        return getClass().getName().compareTo(other.getClass().getName());
30047
      }
30048
 
30049
      int lastComparison = 0;
771 rajveer 30050
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
553 chandransh 30051
 
771 rajveer 30052
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 30053
      if (lastComparison != 0) {
30054
        return lastComparison;
30055
      }
771 rajveer 30056
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 30057
      if (lastComparison != 0) {
30058
        return lastComparison;
30059
      }
30060
      return 0;
30061
    }
30062
 
30063
    public void read(TProtocol iprot) throws TException {
30064
      TField field;
30065
      iprot.readStructBegin();
30066
      while (true)
30067
      {
30068
        field = iprot.readFieldBegin();
30069
        if (field.type == TType.STOP) { 
30070
          break;
30071
        }
30072
        _Fields fieldId = _Fields.findByThriftId(field.id);
30073
        if (fieldId == null) {
30074
          TProtocolUtil.skip(iprot, field.type);
30075
        } else {
30076
          switch (fieldId) {
30077
            case USER_ID:
30078
              if (field.type == TType.I64) {
771 rajveer 30079
                this.userId = iprot.readI64();
30080
                setUserIdIsSet(true);
553 chandransh 30081
              } else { 
30082
                TProtocolUtil.skip(iprot, field.type);
30083
              }
30084
              break;
30085
          }
30086
          iprot.readFieldEnd();
30087
        }
30088
      }
30089
      iprot.readStructEnd();
30090
      validate();
30091
    }
30092
 
30093
    public void write(TProtocol oprot) throws TException {
30094
      validate();
30095
 
30096
      oprot.writeStructBegin(STRUCT_DESC);
30097
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 30098
      oprot.writeI64(this.userId);
553 chandransh 30099
      oprot.writeFieldEnd();
30100
      oprot.writeFieldStop();
30101
      oprot.writeStructEnd();
30102
    }
30103
 
30104
    @Override
30105
    public String toString() {
771 rajveer 30106
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
553 chandransh 30107
      boolean first = true;
30108
 
771 rajveer 30109
      sb.append("userId:");
30110
      sb.append(this.userId);
553 chandransh 30111
      first = false;
30112
      sb.append(")");
30113
      return sb.toString();
30114
    }
30115
 
30116
    public void validate() throws TException {
30117
      // check for required fields
30118
    }
30119
 
30120
  }
30121
 
771 rajveer 30122
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
30123
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
553 chandransh 30124
 
30125
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
30126
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30127
 
771 rajveer 30128
    private Widget success;
553 chandransh 30129
    private WidgetException scx;
30130
 
30131
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30132
    public enum _Fields implements TFieldIdEnum {
130 ashish 30133
      SUCCESS((short)0, "success"),
553 chandransh 30134
      SCX((short)1, "scx");
130 ashish 30135
 
30136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30138
 
30139
      static {
30140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30141
          byId.put((int)field._thriftId, field);
30142
          byName.put(field.getFieldName(), field);
30143
        }
30144
      }
30145
 
30146
      /**
30147
       * Find the _Fields constant that matches fieldId, or null if its not found.
30148
       */
30149
      public static _Fields findByThriftId(int fieldId) {
30150
        return byId.get(fieldId);
30151
      }
30152
 
30153
      /**
30154
       * Find the _Fields constant that matches fieldId, throwing an exception
30155
       * if it is not found.
30156
       */
30157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30158
        _Fields fields = findByThriftId(fieldId);
30159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30160
        return fields;
30161
      }
30162
 
30163
      /**
30164
       * Find the _Fields constant that matches name, or null if its not found.
30165
       */
30166
      public static _Fields findByName(String name) {
30167
        return byName.get(name);
30168
      }
30169
 
30170
      private final short _thriftId;
30171
      private final String _fieldName;
30172
 
30173
      _Fields(short thriftId, String fieldName) {
30174
        _thriftId = thriftId;
30175
        _fieldName = fieldName;
30176
      }
30177
 
30178
      public short getThriftFieldId() {
30179
        return _thriftId;
30180
      }
30181
 
30182
      public String getFieldName() {
30183
        return _fieldName;
30184
      }
30185
    }
30186
 
30187
    // isset id assignments
30188
 
30189
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30190
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
771 rajveer 30191
          new StructMetaData(TType.STRUCT, Widget.class)));
553 chandransh 30192
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 30193
          new FieldValueMetaData(TType.STRUCT)));
30194
    }});
30195
 
30196
    static {
771 rajveer 30197
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
130 ashish 30198
    }
30199
 
771 rajveer 30200
    public getBrowseHistory_result() {
130 ashish 30201
    }
30202
 
771 rajveer 30203
    public getBrowseHistory_result(
30204
      Widget success,
553 chandransh 30205
      WidgetException scx)
130 ashish 30206
    {
30207
      this();
30208
      this.success = success;
553 chandransh 30209
      this.scx = scx;
130 ashish 30210
    }
30211
 
30212
    /**
30213
     * Performs a deep copy on <i>other</i>.
30214
     */
771 rajveer 30215
    public getBrowseHistory_result(getBrowseHistory_result other) {
553 chandransh 30216
      if (other.isSetSuccess()) {
771 rajveer 30217
        this.success = new Widget(other.success);
553 chandransh 30218
      }
30219
      if (other.isSetScx()) {
30220
        this.scx = new WidgetException(other.scx);
30221
      }
30222
    }
30223
 
771 rajveer 30224
    public getBrowseHistory_result deepCopy() {
30225
      return new getBrowseHistory_result(this);
553 chandransh 30226
    }
30227
 
30228
    @Deprecated
771 rajveer 30229
    public getBrowseHistory_result clone() {
30230
      return new getBrowseHistory_result(this);
553 chandransh 30231
    }
30232
 
771 rajveer 30233
    public Widget getSuccess() {
553 chandransh 30234
      return this.success;
30235
    }
30236
 
771 rajveer 30237
    public getBrowseHistory_result setSuccess(Widget success) {
553 chandransh 30238
      this.success = success;
30239
      return this;
30240
    }
30241
 
30242
    public void unsetSuccess() {
30243
      this.success = null;
30244
    }
30245
 
30246
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30247
    public boolean isSetSuccess() {
30248
      return this.success != null;
30249
    }
30250
 
30251
    public void setSuccessIsSet(boolean value) {
30252
      if (!value) {
30253
        this.success = null;
30254
      }
30255
    }
30256
 
30257
    public WidgetException getScx() {
30258
      return this.scx;
30259
    }
30260
 
771 rajveer 30261
    public getBrowseHistory_result setScx(WidgetException scx) {
553 chandransh 30262
      this.scx = scx;
30263
      return this;
30264
    }
30265
 
30266
    public void unsetScx() {
30267
      this.scx = null;
30268
    }
30269
 
30270
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30271
    public boolean isSetScx() {
30272
      return this.scx != null;
30273
    }
30274
 
30275
    public void setScxIsSet(boolean value) {
30276
      if (!value) {
30277
        this.scx = null;
30278
      }
30279
    }
30280
 
30281
    public void setFieldValue(_Fields field, Object value) {
30282
      switch (field) {
30283
      case SUCCESS:
30284
        if (value == null) {
30285
          unsetSuccess();
30286
        } else {
771 rajveer 30287
          setSuccess((Widget)value);
553 chandransh 30288
        }
30289
        break;
30290
 
30291
      case SCX:
30292
        if (value == null) {
30293
          unsetScx();
30294
        } else {
30295
          setScx((WidgetException)value);
30296
        }
30297
        break;
30298
 
30299
      }
30300
    }
30301
 
30302
    public void setFieldValue(int fieldID, Object value) {
30303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30304
    }
30305
 
30306
    public Object getFieldValue(_Fields field) {
30307
      switch (field) {
30308
      case SUCCESS:
30309
        return getSuccess();
30310
 
30311
      case SCX:
30312
        return getScx();
30313
 
30314
      }
30315
      throw new IllegalStateException();
30316
    }
30317
 
30318
    public Object getFieldValue(int fieldId) {
30319
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30320
    }
30321
 
30322
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30323
    public boolean isSet(_Fields field) {
30324
      switch (field) {
30325
      case SUCCESS:
30326
        return isSetSuccess();
30327
      case SCX:
30328
        return isSetScx();
30329
      }
30330
      throw new IllegalStateException();
30331
    }
30332
 
30333
    public boolean isSet(int fieldID) {
30334
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30335
    }
30336
 
30337
    @Override
30338
    public boolean equals(Object that) {
30339
      if (that == null)
30340
        return false;
771 rajveer 30341
      if (that instanceof getBrowseHistory_result)
30342
        return this.equals((getBrowseHistory_result)that);
553 chandransh 30343
      return false;
30344
    }
30345
 
771 rajveer 30346
    public boolean equals(getBrowseHistory_result that) {
553 chandransh 30347
      if (that == null)
30348
        return false;
30349
 
30350
      boolean this_present_success = true && this.isSetSuccess();
30351
      boolean that_present_success = true && that.isSetSuccess();
30352
      if (this_present_success || that_present_success) {
30353
        if (!(this_present_success && that_present_success))
30354
          return false;
30355
        if (!this.success.equals(that.success))
30356
          return false;
30357
      }
30358
 
30359
      boolean this_present_scx = true && this.isSetScx();
30360
      boolean that_present_scx = true && that.isSetScx();
30361
      if (this_present_scx || that_present_scx) {
30362
        if (!(this_present_scx && that_present_scx))
30363
          return false;
30364
        if (!this.scx.equals(that.scx))
30365
          return false;
30366
      }
30367
 
30368
      return true;
30369
    }
30370
 
30371
    @Override
30372
    public int hashCode() {
30373
      return 0;
30374
    }
30375
 
771 rajveer 30376
    public int compareTo(getBrowseHistory_result other) {
30377
      if (!getClass().equals(other.getClass())) {
30378
        return getClass().getName().compareTo(other.getClass().getName());
30379
      }
30380
 
30381
      int lastComparison = 0;
30382
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
30383
 
30384
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30385
      if (lastComparison != 0) {
30386
        return lastComparison;
30387
      }
30388
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30389
      if (lastComparison != 0) {
30390
        return lastComparison;
30391
      }
30392
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
30393
      if (lastComparison != 0) {
30394
        return lastComparison;
30395
      }
30396
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
30397
      if (lastComparison != 0) {
30398
        return lastComparison;
30399
      }
30400
      return 0;
30401
    }
30402
 
553 chandransh 30403
    public void read(TProtocol iprot) throws TException {
30404
      TField field;
30405
      iprot.readStructBegin();
30406
      while (true)
30407
      {
30408
        field = iprot.readFieldBegin();
30409
        if (field.type == TType.STOP) { 
30410
          break;
30411
        }
30412
        _Fields fieldId = _Fields.findByThriftId(field.id);
30413
        if (fieldId == null) {
30414
          TProtocolUtil.skip(iprot, field.type);
30415
        } else {
30416
          switch (fieldId) {
30417
            case SUCCESS:
30418
              if (field.type == TType.STRUCT) {
771 rajveer 30419
                this.success = new Widget();
553 chandransh 30420
                this.success.read(iprot);
30421
              } else { 
30422
                TProtocolUtil.skip(iprot, field.type);
30423
              }
30424
              break;
30425
            case SCX:
30426
              if (field.type == TType.STRUCT) {
30427
                this.scx = new WidgetException();
30428
                this.scx.read(iprot);
30429
              } else { 
30430
                TProtocolUtil.skip(iprot, field.type);
30431
              }
30432
              break;
30433
          }
30434
          iprot.readFieldEnd();
30435
        }
30436
      }
30437
      iprot.readStructEnd();
30438
      validate();
30439
    }
30440
 
30441
    public void write(TProtocol oprot) throws TException {
30442
      oprot.writeStructBegin(STRUCT_DESC);
30443
 
30444
      if (this.isSetSuccess()) {
30445
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30446
        this.success.write(oprot);
30447
        oprot.writeFieldEnd();
30448
      } else if (this.isSetScx()) {
30449
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30450
        this.scx.write(oprot);
30451
        oprot.writeFieldEnd();
30452
      }
30453
      oprot.writeFieldStop();
30454
      oprot.writeStructEnd();
30455
    }
30456
 
30457
    @Override
30458
    public String toString() {
771 rajveer 30459
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
553 chandransh 30460
      boolean first = true;
30461
 
30462
      sb.append("success:");
30463
      if (this.success == null) {
30464
        sb.append("null");
30465
      } else {
30466
        sb.append(this.success);
30467
      }
30468
      first = false;
30469
      if (!first) sb.append(", ");
30470
      sb.append("scx:");
30471
      if (this.scx == null) {
30472
        sb.append("null");
30473
      } else {
30474
        sb.append(this.scx);
30475
      }
30476
      first = false;
30477
      sb.append(")");
30478
      return sb.toString();
30479
    }
30480
 
30481
    public void validate() throws TException {
30482
      // check for required fields
30483
    }
30484
 
30485
  }
30486
 
771 rajveer 30487
  public static class mergeBrowseHistory_args implements TBase<mergeBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_args>   {
30488
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_args");
553 chandransh 30489
 
771 rajveer 30490
    private static final TField FROM_USER_ID_FIELD_DESC = new TField("fromUserId", TType.I64, (short)1);
30491
    private static final TField TO_USER_ID_FIELD_DESC = new TField("toUserId", TType.I64, (short)2);
553 chandransh 30492
 
771 rajveer 30493
    private long fromUserId;
30494
    private long toUserId;
553 chandransh 30495
 
30496
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30497
    public enum _Fields implements TFieldIdEnum {
771 rajveer 30498
      FROM_USER_ID((short)1, "fromUserId"),
30499
      TO_USER_ID((short)2, "toUserId");
553 chandransh 30500
 
30501
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30502
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30503
 
30504
      static {
30505
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30506
          byId.put((int)field._thriftId, field);
30507
          byName.put(field.getFieldName(), field);
30508
        }
30509
      }
30510
 
30511
      /**
30512
       * Find the _Fields constant that matches fieldId, or null if its not found.
30513
       */
30514
      public static _Fields findByThriftId(int fieldId) {
30515
        return byId.get(fieldId);
30516
      }
30517
 
30518
      /**
30519
       * Find the _Fields constant that matches fieldId, throwing an exception
30520
       * if it is not found.
30521
       */
30522
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30523
        _Fields fields = findByThriftId(fieldId);
30524
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30525
        return fields;
30526
      }
30527
 
30528
      /**
30529
       * Find the _Fields constant that matches name, or null if its not found.
30530
       */
30531
      public static _Fields findByName(String name) {
30532
        return byName.get(name);
30533
      }
30534
 
30535
      private final short _thriftId;
30536
      private final String _fieldName;
30537
 
30538
      _Fields(short thriftId, String fieldName) {
30539
        _thriftId = thriftId;
30540
        _fieldName = fieldName;
30541
      }
30542
 
30543
      public short getThriftFieldId() {
30544
        return _thriftId;
30545
      }
30546
 
30547
      public String getFieldName() {
30548
        return _fieldName;
30549
      }
30550
    }
30551
 
30552
    // isset id assignments
771 rajveer 30553
    private static final int __FROMUSERID_ISSET_ID = 0;
30554
    private static final int __TOUSERID_ISSET_ID = 1;
30555
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 30556
 
30557
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 30558
      put(_Fields.FROM_USER_ID, new FieldMetaData("fromUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 30559
          new FieldValueMetaData(TType.I64)));
771 rajveer 30560
      put(_Fields.TO_USER_ID, new FieldMetaData("toUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 30561
          new FieldValueMetaData(TType.I64)));
30562
    }});
30563
 
30564
    static {
771 rajveer 30565
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_args.class, metaDataMap);
553 chandransh 30566
    }
30567
 
771 rajveer 30568
    public mergeBrowseHistory_args() {
553 chandransh 30569
    }
30570
 
771 rajveer 30571
    public mergeBrowseHistory_args(
30572
      long fromUserId,
30573
      long toUserId)
553 chandransh 30574
    {
30575
      this();
771 rajveer 30576
      this.fromUserId = fromUserId;
30577
      setFromUserIdIsSet(true);
30578
      this.toUserId = toUserId;
30579
      setToUserIdIsSet(true);
553 chandransh 30580
    }
30581
 
30582
    /**
30583
     * Performs a deep copy on <i>other</i>.
30584
     */
771 rajveer 30585
    public mergeBrowseHistory_args(mergeBrowseHistory_args other) {
130 ashish 30586
      __isset_bit_vector.clear();
30587
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 30588
      this.fromUserId = other.fromUserId;
30589
      this.toUserId = other.toUserId;
553 chandransh 30590
    }
30591
 
771 rajveer 30592
    public mergeBrowseHistory_args deepCopy() {
30593
      return new mergeBrowseHistory_args(this);
553 chandransh 30594
    }
30595
 
30596
    @Deprecated
771 rajveer 30597
    public mergeBrowseHistory_args clone() {
30598
      return new mergeBrowseHistory_args(this);
553 chandransh 30599
    }
30600
 
771 rajveer 30601
    public long getFromUserId() {
30602
      return this.fromUserId;
553 chandransh 30603
    }
30604
 
771 rajveer 30605
    public mergeBrowseHistory_args setFromUserId(long fromUserId) {
30606
      this.fromUserId = fromUserId;
30607
      setFromUserIdIsSet(true);
553 chandransh 30608
      return this;
30609
    }
30610
 
771 rajveer 30611
    public void unsetFromUserId() {
30612
      __isset_bit_vector.clear(__FROMUSERID_ISSET_ID);
553 chandransh 30613
    }
30614
 
771 rajveer 30615
    /** Returns true if field fromUserId is set (has been asigned a value) and false otherwise */
30616
    public boolean isSetFromUserId() {
30617
      return __isset_bit_vector.get(__FROMUSERID_ISSET_ID);
553 chandransh 30618
    }
30619
 
771 rajveer 30620
    public void setFromUserIdIsSet(boolean value) {
30621
      __isset_bit_vector.set(__FROMUSERID_ISSET_ID, value);
553 chandransh 30622
    }
30623
 
771 rajveer 30624
    public long getToUserId() {
30625
      return this.toUserId;
553 chandransh 30626
    }
30627
 
771 rajveer 30628
    public mergeBrowseHistory_args setToUserId(long toUserId) {
30629
      this.toUserId = toUserId;
30630
      setToUserIdIsSet(true);
553 chandransh 30631
      return this;
30632
    }
30633
 
771 rajveer 30634
    public void unsetToUserId() {
30635
      __isset_bit_vector.clear(__TOUSERID_ISSET_ID);
553 chandransh 30636
    }
30637
 
771 rajveer 30638
    /** Returns true if field toUserId is set (has been asigned a value) and false otherwise */
30639
    public boolean isSetToUserId() {
30640
      return __isset_bit_vector.get(__TOUSERID_ISSET_ID);
553 chandransh 30641
    }
30642
 
771 rajveer 30643
    public void setToUserIdIsSet(boolean value) {
30644
      __isset_bit_vector.set(__TOUSERID_ISSET_ID, value);
553 chandransh 30645
    }
30646
 
30647
    public void setFieldValue(_Fields field, Object value) {
30648
      switch (field) {
771 rajveer 30649
      case FROM_USER_ID:
553 chandransh 30650
        if (value == null) {
771 rajveer 30651
          unsetFromUserId();
553 chandransh 30652
        } else {
771 rajveer 30653
          setFromUserId((Long)value);
553 chandransh 30654
        }
30655
        break;
30656
 
771 rajveer 30657
      case TO_USER_ID:
553 chandransh 30658
        if (value == null) {
771 rajveer 30659
          unsetToUserId();
553 chandransh 30660
        } else {
771 rajveer 30661
          setToUserId((Long)value);
553 chandransh 30662
        }
30663
        break;
30664
 
130 ashish 30665
      }
30666
    }
30667
 
553 chandransh 30668
    public void setFieldValue(int fieldID, Object value) {
30669
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 30670
    }
30671
 
553 chandransh 30672
    public Object getFieldValue(_Fields field) {
30673
      switch (field) {
771 rajveer 30674
      case FROM_USER_ID:
30675
        return new Long(getFromUserId());
553 chandransh 30676
 
771 rajveer 30677
      case TO_USER_ID:
30678
        return new Long(getToUserId());
553 chandransh 30679
 
30680
      }
30681
      throw new IllegalStateException();
30682
    }
30683
 
30684
    public Object getFieldValue(int fieldId) {
30685
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30686
    }
30687
 
30688
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30689
    public boolean isSet(_Fields field) {
30690
      switch (field) {
771 rajveer 30691
      case FROM_USER_ID:
30692
        return isSetFromUserId();
30693
      case TO_USER_ID:
30694
        return isSetToUserId();
553 chandransh 30695
      }
30696
      throw new IllegalStateException();
30697
    }
30698
 
30699
    public boolean isSet(int fieldID) {
30700
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30701
    }
30702
 
30703
    @Override
30704
    public boolean equals(Object that) {
30705
      if (that == null)
30706
        return false;
771 rajveer 30707
      if (that instanceof mergeBrowseHistory_args)
30708
        return this.equals((mergeBrowseHistory_args)that);
553 chandransh 30709
      return false;
30710
    }
30711
 
771 rajveer 30712
    public boolean equals(mergeBrowseHistory_args that) {
553 chandransh 30713
      if (that == null)
30714
        return false;
30715
 
771 rajveer 30716
      boolean this_present_fromUserId = true;
30717
      boolean that_present_fromUserId = true;
30718
      if (this_present_fromUserId || that_present_fromUserId) {
30719
        if (!(this_present_fromUserId && that_present_fromUserId))
553 chandransh 30720
          return false;
771 rajveer 30721
        if (this.fromUserId != that.fromUserId)
553 chandransh 30722
          return false;
30723
      }
30724
 
771 rajveer 30725
      boolean this_present_toUserId = true;
30726
      boolean that_present_toUserId = true;
30727
      if (this_present_toUserId || that_present_toUserId) {
30728
        if (!(this_present_toUserId && that_present_toUserId))
553 chandransh 30729
          return false;
771 rajveer 30730
        if (this.toUserId != that.toUserId)
553 chandransh 30731
          return false;
30732
      }
30733
 
30734
      return true;
30735
    }
30736
 
30737
    @Override
30738
    public int hashCode() {
30739
      return 0;
30740
    }
30741
 
771 rajveer 30742
    public int compareTo(mergeBrowseHistory_args other) {
553 chandransh 30743
      if (!getClass().equals(other.getClass())) {
30744
        return getClass().getName().compareTo(other.getClass().getName());
30745
      }
30746
 
30747
      int lastComparison = 0;
771 rajveer 30748
      mergeBrowseHistory_args typedOther = (mergeBrowseHistory_args)other;
553 chandransh 30749
 
771 rajveer 30750
      lastComparison = Boolean.valueOf(isSetFromUserId()).compareTo(isSetFromUserId());
553 chandransh 30751
      if (lastComparison != 0) {
30752
        return lastComparison;
30753
      }
771 rajveer 30754
      lastComparison = TBaseHelper.compareTo(fromUserId, typedOther.fromUserId);
553 chandransh 30755
      if (lastComparison != 0) {
30756
        return lastComparison;
30757
      }
771 rajveer 30758
      lastComparison = Boolean.valueOf(isSetToUserId()).compareTo(isSetToUserId());
553 chandransh 30759
      if (lastComparison != 0) {
30760
        return lastComparison;
30761
      }
771 rajveer 30762
      lastComparison = TBaseHelper.compareTo(toUserId, typedOther.toUserId);
553 chandransh 30763
      if (lastComparison != 0) {
30764
        return lastComparison;
30765
      }
30766
      return 0;
30767
    }
30768
 
30769
    public void read(TProtocol iprot) throws TException {
30770
      TField field;
30771
      iprot.readStructBegin();
30772
      while (true)
30773
      {
30774
        field = iprot.readFieldBegin();
30775
        if (field.type == TType.STOP) { 
30776
          break;
30777
        }
30778
        _Fields fieldId = _Fields.findByThriftId(field.id);
30779
        if (fieldId == null) {
30780
          TProtocolUtil.skip(iprot, field.type);
30781
        } else {
30782
          switch (fieldId) {
771 rajveer 30783
            case FROM_USER_ID:
553 chandransh 30784
              if (field.type == TType.I64) {
771 rajveer 30785
                this.fromUserId = iprot.readI64();
30786
                setFromUserIdIsSet(true);
553 chandransh 30787
              } else { 
30788
                TProtocolUtil.skip(iprot, field.type);
30789
              }
30790
              break;
771 rajveer 30791
            case TO_USER_ID:
553 chandransh 30792
              if (field.type == TType.I64) {
771 rajveer 30793
                this.toUserId = iprot.readI64();
30794
                setToUserIdIsSet(true);
553 chandransh 30795
              } else { 
30796
                TProtocolUtil.skip(iprot, field.type);
30797
              }
30798
              break;
30799
          }
30800
          iprot.readFieldEnd();
30801
        }
30802
      }
30803
      iprot.readStructEnd();
30804
      validate();
30805
    }
30806
 
30807
    public void write(TProtocol oprot) throws TException {
30808
      validate();
30809
 
30810
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 30811
      oprot.writeFieldBegin(FROM_USER_ID_FIELD_DESC);
30812
      oprot.writeI64(this.fromUserId);
553 chandransh 30813
      oprot.writeFieldEnd();
771 rajveer 30814
      oprot.writeFieldBegin(TO_USER_ID_FIELD_DESC);
30815
      oprot.writeI64(this.toUserId);
553 chandransh 30816
      oprot.writeFieldEnd();
30817
      oprot.writeFieldStop();
30818
      oprot.writeStructEnd();
30819
    }
30820
 
30821
    @Override
30822
    public String toString() {
771 rajveer 30823
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_args(");
553 chandransh 30824
      boolean first = true;
30825
 
771 rajveer 30826
      sb.append("fromUserId:");
30827
      sb.append(this.fromUserId);
553 chandransh 30828
      first = false;
30829
      if (!first) sb.append(", ");
771 rajveer 30830
      sb.append("toUserId:");
30831
      sb.append(this.toUserId);
553 chandransh 30832
      first = false;
30833
      sb.append(")");
30834
      return sb.toString();
30835
    }
30836
 
30837
    public void validate() throws TException {
30838
      // check for required fields
30839
    }
30840
 
30841
  }
30842
 
771 rajveer 30843
  public static class mergeBrowseHistory_result implements TBase<mergeBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_result>   {
30844
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_result");
553 chandransh 30845
 
30846
 
30847
 
30848
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30849
    public enum _Fields implements TFieldIdEnum {
30850
;
30851
 
30852
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30853
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30854
 
30855
      static {
30856
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30857
          byId.put((int)field._thriftId, field);
30858
          byName.put(field.getFieldName(), field);
30859
        }
30860
      }
30861
 
30862
      /**
30863
       * Find the _Fields constant that matches fieldId, or null if its not found.
30864
       */
30865
      public static _Fields findByThriftId(int fieldId) {
30866
        return byId.get(fieldId);
30867
      }
30868
 
30869
      /**
30870
       * Find the _Fields constant that matches fieldId, throwing an exception
30871
       * if it is not found.
30872
       */
30873
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30874
        _Fields fields = findByThriftId(fieldId);
30875
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30876
        return fields;
30877
      }
30878
 
30879
      /**
30880
       * Find the _Fields constant that matches name, or null if its not found.
30881
       */
30882
      public static _Fields findByName(String name) {
30883
        return byName.get(name);
30884
      }
30885
 
30886
      private final short _thriftId;
30887
      private final String _fieldName;
30888
 
30889
      _Fields(short thriftId, String fieldName) {
30890
        _thriftId = thriftId;
30891
        _fieldName = fieldName;
30892
      }
30893
 
30894
      public short getThriftFieldId() {
30895
        return _thriftId;
30896
      }
30897
 
30898
      public String getFieldName() {
30899
        return _fieldName;
30900
      }
30901
    }
30902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30903
    }});
30904
 
30905
    static {
771 rajveer 30906
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_result.class, metaDataMap);
553 chandransh 30907
    }
30908
 
771 rajveer 30909
    public mergeBrowseHistory_result() {
553 chandransh 30910
    }
30911
 
30912
    /**
30913
     * Performs a deep copy on <i>other</i>.
30914
     */
771 rajveer 30915
    public mergeBrowseHistory_result(mergeBrowseHistory_result other) {
553 chandransh 30916
    }
30917
 
771 rajveer 30918
    public mergeBrowseHistory_result deepCopy() {
30919
      return new mergeBrowseHistory_result(this);
553 chandransh 30920
    }
30921
 
130 ashish 30922
    @Deprecated
771 rajveer 30923
    public mergeBrowseHistory_result clone() {
30924
      return new mergeBrowseHistory_result(this);
130 ashish 30925
    }
30926
 
553 chandransh 30927
    public void setFieldValue(_Fields field, Object value) {
30928
      switch (field) {
30929
      }
30930
    }
30931
 
30932
    public void setFieldValue(int fieldID, Object value) {
30933
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30934
    }
30935
 
30936
    public Object getFieldValue(_Fields field) {
30937
      switch (field) {
30938
      }
30939
      throw new IllegalStateException();
30940
    }
30941
 
30942
    public Object getFieldValue(int fieldId) {
30943
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30944
    }
30945
 
30946
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30947
    public boolean isSet(_Fields field) {
30948
      switch (field) {
30949
      }
30950
      throw new IllegalStateException();
30951
    }
30952
 
30953
    public boolean isSet(int fieldID) {
30954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30955
    }
30956
 
30957
    @Override
30958
    public boolean equals(Object that) {
30959
      if (that == null)
30960
        return false;
771 rajveer 30961
      if (that instanceof mergeBrowseHistory_result)
30962
        return this.equals((mergeBrowseHistory_result)that);
553 chandransh 30963
      return false;
30964
    }
30965
 
771 rajveer 30966
    public boolean equals(mergeBrowseHistory_result that) {
553 chandransh 30967
      if (that == null)
30968
        return false;
30969
 
30970
      return true;
30971
    }
30972
 
30973
    @Override
30974
    public int hashCode() {
30975
      return 0;
30976
    }
30977
 
771 rajveer 30978
    public int compareTo(mergeBrowseHistory_result other) {
553 chandransh 30979
      if (!getClass().equals(other.getClass())) {
30980
        return getClass().getName().compareTo(other.getClass().getName());
30981
      }
30982
 
30983
      int lastComparison = 0;
771 rajveer 30984
      mergeBrowseHistory_result typedOther = (mergeBrowseHistory_result)other;
553 chandransh 30985
 
30986
      return 0;
30987
    }
30988
 
30989
    public void read(TProtocol iprot) throws TException {
30990
      TField field;
30991
      iprot.readStructBegin();
30992
      while (true)
30993
      {
30994
        field = iprot.readFieldBegin();
30995
        if (field.type == TType.STOP) { 
30996
          break;
30997
        }
30998
        _Fields fieldId = _Fields.findByThriftId(field.id);
30999
        if (fieldId == null) {
31000
          TProtocolUtil.skip(iprot, field.type);
31001
        } else {
31002
          switch (fieldId) {
31003
          }
31004
          iprot.readFieldEnd();
31005
        }
31006
      }
31007
      iprot.readStructEnd();
31008
      validate();
31009
    }
31010
 
31011
    public void write(TProtocol oprot) throws TException {
31012
      oprot.writeStructBegin(STRUCT_DESC);
31013
 
31014
      oprot.writeFieldStop();
31015
      oprot.writeStructEnd();
31016
    }
31017
 
31018
    @Override
31019
    public String toString() {
771 rajveer 31020
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_result(");
553 chandransh 31021
      boolean first = true;
31022
 
31023
      sb.append(")");
31024
      return sb.toString();
31025
    }
31026
 
31027
    public void validate() throws TException {
31028
      // check for required fields
31029
    }
31030
 
31031
  }
31032
 
48 ashish 31033
}